/** * decorate antlr AST with ending line/col info, and if * possible the snippet of source from the start/end line/col for each node. * @param t the AST to decorate * @return the decorated AST */ public AST process(AST t) { // first visit List l = new ArrayList(); traverse((GroovySourceAST)t,l,null); //System.out.println("l:" + l); // second visit Iterator itr = l.iterator(); if (itr.hasNext()) { itr.next(); /* discard first */ } traverse((GroovySourceAST)t,null,itr); return t; }
traverse(child,l,itr);
/** * decorate antlr AST with ending line/col info, and if * possible the snipppet of source from the start/end line/col for each node. * @param t the AST to decorate * @return the decorated AST */ public AST process(AST t) { // first visit List l = new ArrayList(); traverse((GroovySourceAST)t,l,null); //System.out.println("l:" + l); // second visit Iterator itr = l.iterator(); if (itr.hasNext()) { itr.next(); /* discard first */ } traverse((GroovySourceAST)t,null,itr); return t; }
/** * decorate antlr AST with ending line/col info, and if * possible the snipppet of source from the start/end line/col for each node. * @param t the AST to decorate * @return the decorated AST */ public AST process(AST t) { // first visit List l = new ArrayList(); t = traverse((GroovySourceAST)t,l,null); //System.out.println("l:" + l); // second visit Iterator itr = l.iterator(); if (itr.hasNext()) { itr.next(); /* discard first */ } t = traverse((GroovySourceAST)t,null,itr); return t; }
/** * decorate antlr AST with ending line/col info, and if * possible the snipppet of source from the start/end line/col for each node. * @param t the AST to decorate * @return the decorated AST */ public AST process(AST t) { // first visit List l = new ArrayList(); traverse((GroovySourceAST)t,l,null); //System.out.println("l:" + l); // second visit Iterator itr = l.iterator(); if (itr.hasNext()) { itr.next(); /* discard first */ } traverse((GroovySourceAST)t,null,itr); return t; }
/** * decorate antlr AST with ending line/col info, and if * possible the snipppet of source from the start/end line/col for each node. * @param t the AST to decorate * @return the decorated AST */ public AST process(AST t) { // first visit List l = new ArrayList(); traverse((GroovySourceAST)t,l,null); //System.out.println("l:" + l); // second visit Iterator itr = l.iterator(); if (itr.hasNext()) { itr.next(); /* discard first */ } traverse((GroovySourceAST)t,null,itr); return t; }
traverse(child,l,itr);
traverse(child,l,itr);