groovifierTraverser.process(ast);
}
private static void modifyJavaASTintoGroovyAST(String[] tokenNames, AST ast) {
// mutate the tree when in Javaland
Visitor preJava2groovyConverter = new PreJava2GroovyConverter(tokenNames);
AntlrASTProcessor preJava2groovyTraverser = new PreOrderTraversal(preJava2groovyConverter);
preJava2groovyTraverser.process(ast);
// map the nodes to Groovy types
Visitor java2groovyConverter = new Java2GroovyConverter(tokenNames);
AntlrASTProcessor java2groovyTraverser = new PreOrderTraversal(java2groovyConverter);
java2groovyTraverser.process(ast);
}