Asking for code to manipulate the AST is another route. In python it can do absolute magic.