<div dir="ltr">Hello ,<br><br>I'm writing a source to source tool, according to list prefred way is Rewriter class , but also i can modify list by a series of traversals<br><br>the problem is Rewriter class method is really primitive,, isn't suitable for big changes (esp. in structure )<br>
<br>what i'm asking for is, can i chain ASTConsumer's ,,so i can progressively modify AST and pretty-print it finally<br>but it looks like (from ParseAST) i would have to Parser -> ASTConsumer ->  pretty-print ->Parser ->ASTConsumer -> .. and so on<br>
which is very tedious<br><br>is the there an explicit AST data structure ? can i just parse once and modify resulting AST many times  (traverse,add/delete nodes it not re-parse source) ?<br><br>Thanks,<br>Mohamed Yousef<br>
</div>