Hello,

I have some AST transformations I use to generate a (builder) class and would like to (try to) move away from using the AST API and strings to build code towards using the new macro.

I can find some simple examples but can't seem to find more thorough documentation and examples.

I've managed to figure out a few things like if statements and constructors but am struggling with e.g. declarations and assignments, like the following :

body.addStatement(declS(varX('binding'), ctorX(ClassHelper.make(Binding))))
body.addStatement(assignS(propX(varX('binding'), 'caller'), varX('this')))

Another thing is when to use and not use $v.

If somebody could point me towards some interesting web pages (or transform the above code to using a macro) I would be very thankful !

Luc Hermans


---
Deze e-mail is gecontroleerd op virussen door AVG.
http://www.avg.com

Reply via email to