[Newcompiler] Changing just a part of a method

Damien Cassou damien.cassou at gmail.com
Sat Jul 28 09:24:06 UTC 2007


2007/7/27, Mathieu Suen <mathieusuen at yahoo.fr>:
> Yes even so how would you do to kept the indentation when you are
> changing  the AST.
> I have roughly think about it and couldn't figure out how to do it.

I thought something like this could be done:

- you search for the expression
- when you find an expression, you note the start position and the end position.
- you modify the part of the tree you are interested in
- you inject the modified tree part between the start position and the
end position.

-- 
Damien Cassou


More information about the Newcompiler mailing list