Lukas Renggli <reng...@...> writes:

> 
> > Gwenael changed the RBParser and AST to preserve code formatting.
> > He never understood why nobody did look at what he did.
> 
> I looked at it. The code did not work for me at all (it broke
> everything), so I couldn't test it.
> 
> IMHO this is not something that can be just fixed by changing the
> Refactoring Browser. The refactorings are implemented as "arbitrary"
> transformations/re-compositions of the AST. For a machine (e.g. the
> parser, the rewrite-engine, etc.), it is not clear if a space or a
> comment belongs to the AST node before or after.
> 
> Lukas
> 


Hi Lukas. I'm sure for some of the more complicated refactoring tools,
delineating whitespace between tokens is difficult or maybe even impossible, but
I don't see why a renaming tool couldn't parse the source into an AST preserving
whitespace tokens as they were, then simply performing search and replace on the
relevant message send tokens, then outputting the the token sources.


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to