[Java] Class SourceCodeTraversal

  • org.codehaus.groovy.antlr.treewalker.SourceCodeTraversal

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
Inherited fields
Fields inherited from class Fields
class TraversalHelper unvisitedNodes

Constructor Summary

Constructors
Constructor and description
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.

Methods Summary

Methods
Type Params Return Type Name and description
protected void accept(GroovySourceAST currentNode)
void setUp(GroovySourceAST t)
gather, sort and process all unvisited nodes

Inherited Methods Summary

Inherited Methods
Methods inherited from class Name
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
class Object wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Constructor Detail

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

protected void accept(GroovySourceAST currentNode)

public void setUp(GroovySourceAST t)

gather, sort and process all unvisited nodes

Parameters:
t - the AST to process

© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.4.21/html/gapi/org/codehaus/groovy/antlr/treewalker/SourceCodeTraversal.html