[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
| Fields inherited from class | Fields |
|---|---|
class TraversalHelper | unvisitedNodes |
Constructor Summary
| 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
| 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
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