Package com.javacc.parser
Class Node.Visitor
java.lang.Object
com.javacc.parser.Node.Visitor
- Direct Known Subclasses:
DeadCodeEliminator,JavaFormatter2,NfaBuilder,SanityChecker.RegexpVisitor,SyntaxConverter
- Enclosing interface:
Node
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidIf there is no specific method to visit this node type, it just uses this method.final voidJust recurses over (i.e.final voidTries to invoke (via reflection) the appropriate visit(...) method defined in a subclass.
-
Field Details
-
visitUnparsedTokens
protected boolean visitUnparsedTokens
-
-
Constructor Details
-
Visitor
public Visitor()
-
-
Method Details
-
visit
Tries to invoke (via reflection) the appropriate visit(...) method defined in a subclass. If there is none, it just calls the fallback() routine.- Parameters:
node- the Node to "visit"
-
recurse
Just recurses over (i.e. visits) node's children- Parameters:
node- the node we are traversing
-
fallback
If there is no specific method to visit this node type, it just uses this method. The default base implementation is just to recurse over the nodes.- Parameters:
node- The node we are currently traversing
-