Interface TopLevelClass.Node

All Known Subinterfaces:
TopLevelClass.Token, TopLevelClass.Type
All Known Implementing Classes:
TopLevelClass.Default.Node, TopLevelClass.Default.Token, TopLevelClass.Default.Type
Enclosing interface:
TopLevelClass

public static interface TopLevelClass.Node

A node of the abstract syntax tree that is the result of parsing.

Since:
notavaCC 1.0
See Also:
TopLevelClass.Type, TopLevelClass.Token, TopLevelClass.parseType(java.io.File)

Method Summary
 void accept(TopLevelClass.Visitor visitor)
          Deprecated. This method will be replaced by TopLevelClass.Visitor.visitAll(TopLevelClass.Node).
 List getChildNodes()
          Returns the list of the child nodes of this.
 

Method Detail

getChildNodes

public List getChildNodes()
Returns the list of the child nodes of this.

For a Node created by the program generated by ¬<><∪∪, the list should be modifiable and the nodes should be ordered by its position in the parsed text. However, the nodes constructed by the users of ¬<><∪∪ are not required to satisfy it.

Returns:
the list of the child nodes of this.
Since:
notavaCC 1.0

accept

public void accept(TopLevelClass.Visitor visitor)
Deprecated. This method will be replaced by TopLevelClass.Visitor.visitAll(TopLevelClass.Node).

Traverses the (sub-)tree whose root is this node.

this node is passed to the visitor, then the child nodes are traversed recursively (preorder traversal). A node is passed to the methods of the visitor, using reflection, that is public, whose name is visit, that have only one argument whose type is compatible with this node, and that have no throws clause.

Parameters:
visitor - a visitor.
Since:
notavacc 1.0