protected void accept_v_FirstChildsFirstChild_v_RestOfTheChildren(GroovySourceAST t) { openingVisit(t); GroovySourceAST expr = t.childAt(0); skip(expr); accept(expr.childAt(0)); closingVisit(t); acceptSiblings(expr); }
protected void accept_v_AllChildren_v_Siblings(GroovySourceAST t) { openingVisit(t); acceptChildren(t); closingVisit(t); acceptSiblings(t); }
protected void accept_v_FirstChild_v_RestOfTheChildren(GroovySourceAST t) { accept_v_FirstChild_v(t); acceptSiblings(t.childAt(0)); }
protected void accept_v_AllChildren_v(GroovySourceAST t) { openingVisit(t); acceptChildren(t); closingVisit(t); }
public AST process(AST t) { GroovySourceAST node = (GroovySourceAST) t; // process each node in turn setUp(node); accept(node); acceptSiblings(node); tearDown(node); return null; } }
protected void accept_FirstChild_v_SecondChildsChildren_v(GroovySourceAST t) { accept(t.childAt(0)); openingVisit(t); GroovySourceAST secondChild = t.childAt(1); if (secondChild != null) { acceptChildren(secondChild); } closingVisit(t); }
protected void accept_v_FirstChild_v(GroovySourceAST t) { openingVisit(t); accept(t.childAt(0)); closingVisit(t); }
protected void accept_v_Siblings_v(GroovySourceAST t) { openingVisit(t); acceptSiblings(t); closingVisit(t); }
protected void accept_FirstSecondAndThirdChild_v_v_ForthChild(GroovySourceAST t) { GroovySourceAST child1 = (GroovySourceAST) t.getFirstChild(); if (child1 != null) { accept(child1); GroovySourceAST child2 = (GroovySourceAST) child1.getNextSibling(); if (child2 != null) { accept(child2); GroovySourceAST child3 = (GroovySourceAST) child2.getNextSibling(); if (child3 != null) { accept(child3); openingVisit(t); GroovySourceAST child4 = (GroovySourceAST) child3.getNextSibling(); if (child4 != null) { subsequentVisit(t); accept(child4); } } } } }
protected void accept_FirstChild_v_SecondChild(GroovySourceAST t) { accept(t.childAt(0)); subsequentVisit(t); accept(t.childAt(1)); }
protected void acceptChildren(GroovySourceAST t) { if (t != null) { GroovySourceAST child = (GroovySourceAST) t.getFirstChild(); if (child != null) { accept(child); acceptSiblings(child); } } }
/** * gather, sort and process all unvisited nodes * @param t the AST to process */ public void setUp(GroovySourceAST t) { super.setUp(t); // gather and sort all unvisited AST nodes unvisitedNodes = new ArrayList<GroovySourceAST>(); traverse(t); Collections.sort(unvisitedNodes); }
protected void acceptSiblings(GroovySourceAST t) { if (t != null) { GroovySourceAST sibling = (GroovySourceAST) t.getNextSibling(); while (sibling != null) { accept(sibling); sibling = (GroovySourceAST) sibling.getNextSibling(); } } }
protected void accept_FirstChild_v_SecondChildsChildren_v(GroovySourceAST t) { accept(t.childAt(0)); openingVisit(t); GroovySourceAST secondChild = t.childAt(1); if (secondChild != null) { acceptChildren(secondChild); } closingVisit(t); }
public AST process(AST t) { GroovySourceAST node = (GroovySourceAST) t; // process each node in turn setUp(node); accept(node); acceptSiblings(node); tearDown(node); return null; } }
protected void accept_SecondChild_v_ThirdChild_v(GroovySourceAST t) { accept(t.childAt(1)); openingVisit(t); accept(t.childAt(2)); closingVisit(t); }
protected void accept_v_AllChildren_v(GroovySourceAST t) { openingVisit(t); acceptChildren(t); closingVisit(t); }
protected void accept_v_Siblings_v(GroovySourceAST t) { openingVisit(t); acceptSiblings(t); closingVisit(t); }
protected void accept_FirstSecondAndThirdChild_v_v_ForthChild(GroovySourceAST t) { GroovySourceAST child1 = (GroovySourceAST)t.getFirstChild(); if (child1 != null){ accept(child1); GroovySourceAST child2 = (GroovySourceAST)child1.getNextSibling(); if (child2 != null) { accept(child2); GroovySourceAST child3 = (GroovySourceAST)child2.getNextSibling(); if (child3 != null) { accept(child3); openingVisit(t); GroovySourceAST child4 = (GroovySourceAST)child3.getNextSibling(); if (child4 != null) { subsequentVisit(t); accept(child4); } } } } }
protected void accept_FirstChild_v_SecondChild(GroovySourceAST t) { accept(t.childAt(0)); subsequentVisit(t); accept(t.childAt(1)); } protected void accept_FirstChild_v_SecondChild_v(GroovySourceAST t) {