Groovy Documentation

## org.codehaus.groovy.antlr.treewalker
[Java] Class SourceCodeTraversal

    java.lang.Object
      org.codehaus.groovy.antlr.treewalker.TraversalHelper
          org.codehaus.groovy.antlr.treewalker.SourceCodeTraversal

    public class SourceCodeTraversal
    extends TraversalHelper

A treewalker for the antlr generated AST that attempts to visit the AST nodes in the order needed to generate valid groovy source code.

Authors:
  Jeremy Rayner

Field Summary

Fields inherited from class TraversalHelper
unvisitedNodes

Constructor Summary
`SourceCodeTraversal(Visitor visitor)` Constructs a treewalker for the antlr generated AST that attempts to visit the AST nodes in the order needed to generate valid groovy source code.

Method Summary
`protected void` | `accept(GroovySourceAST currentNode)`
`void` | `setUp(GroovySourceAST t)` gather, sort and process all unvisited nodes

Methods inherited from class TraversalHelper

accept, acceptChildren, acceptSiblings, accept_FirstChild_v_RestOfTheChildren, accept_FirstChild_v_RestOfTheChildren_v, accept_FirstChild_v_RestOfTheChildren_v_LastChild, accept_FirstChild_v_SecondChild, accept_FirstChild_v_SecondChild_v, accept_FirstChild_v_SecondChild_v_ThirdChild_v, accept_FirstChild_v_SecondChildsChildren_v, accept_FirstSecondAndThirdChild_v_v_ForthChild, accept_SecondChild_v_ThirdChild_v, accept_v_AllChildren_v, accept_v_AllChildren_v_Siblings, accept_v_FirstChild_2ndv_SecondChild_v___LastChild_v, accept_v_FirstChild_SecondChild_v_ThirdChild_v, accept_v_FirstChild_v, accept_v_FirstChild_v_RestOfTheChildren, accept_v_FirstChild_v_RestOfTheChildren_v, accept_v_FirstChild_v_SecondChild_v___LastChild_v, accept_v_FirstChildsFirstChild_v_Child2_Child3_v_Child4_v___v_LastChild, accept_v_FirstChildsFirstChild_v_RestOfTheChildren, accept_v_Siblings_v, closingVisit, openingVisit, pop, process, push, secondVisit, setUp, skip, subsequentVisit, tearDown, visitNode

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Constructor Detail

### SourceCodeTraversal

    public SourceCodeTraversal(Visitor visitor)

  Constructs a treewalker for the antlr generated AST that attempts to visit the AST nodes in the order needed to generate valid groovy source code.
  Parameters:
    `visitor` - the visitor implementation to call for each AST node.

Method Detail

### accept

    protected void accept(GroovySourceAST currentNode)

### setUp

    public void setUp(GroovySourceAST t)

  gather, sort and process all unvisited nodes
  Parameters:
    `t` - the AST to process

Groovy Documentation