public AST process(AST t) { GroovySourceAST node = (GroovySourceAST) t; // fetch all the nodes in this AST into a List NodeCollector collector = new NodeCollector(); AntlrASTProcessor internalTraversal = new PreOrderTraversal(collector); internalTraversal.process(t); List listOfAllNodesInThisAST = collector.getNodes(); // process each node in turn setUp(node); Iterator itr = listOfAllNodesInThisAST.iterator(); while (itr.hasNext()) { GroovySourceAST currentNode = (GroovySourceAST) itr.next(); accept(currentNode); } tearDown(node); return null; }
public AST process(AST t) { GroovySourceAST node = (GroovySourceAST) t; // fetch all the nodes in this AST into a List NodeCollector collector = new NodeCollector(); AntlrASTProcessor internalTraversal = new PreOrderTraversal(collector); internalTraversal.process(t); List listOfAllNodesInThisAST = collector.getNodes(); // process each node in turn setUp(node); Iterator itr = listOfAllNodesInThisAST.iterator(); while (itr.hasNext()) { GroovySourceAST currentNode = (GroovySourceAST) itr.next(); accept(currentNode); } tearDown(node); return null; }
public AST process(AST t) { GroovySourceAST node = (GroovySourceAST) t; // fetch all the nodes in this AST into a List NodeCollector collector = new NodeCollector(); AntlrASTProcessor internalTraversal = new PreOrderTraversal(collector); internalTraversal.process(t); List listOfAllNodesInThisAST = collector.getNodes(); // process each node in turn setUp(node); Iterator itr = listOfAllNodesInThisAST.iterator(); while (itr.hasNext()) { GroovySourceAST currentNode = (GroovySourceAST) itr.next(); accept(currentNode); } tearDown(node); return null; }
public AST process(AST t) { GroovySourceAST node = (GroovySourceAST) t; // fetch all the nodes in this AST into a List NodeCollector collector = new NodeCollector(); AntlrASTProcessor internalTraversal = new PreOrderTraversal(collector); internalTraversal.process(t); List listOfAllNodesInThisAST = collector.getNodes(); // process each node in turn setUp(node); Iterator itr = listOfAllNodesInThisAST.iterator(); while (itr.hasNext()) { GroovySourceAST currentNode = (GroovySourceAST) itr.next(); accept(currentNode); } tearDown(node); return null; }
public AST process(AST t) { GroovySourceAST node = (GroovySourceAST) t; // fetch all the nodes in this AST into a List NodeCollector collector = new NodeCollector(); AntlrASTProcessor internalTraversal = new PreOrderTraversal(collector); internalTraversal.process(t); List listOfAllNodesInThisAST = collector.getNodes(); // process each node in turn setUp(node); Iterator itr = listOfAllNodesInThisAST.iterator(); while (itr.hasNext()) { GroovySourceAST currentNode = (GroovySourceAST) itr.next(); accept(currentNode); } tearDown(node); return null; }