Interface Node
- All Known Implementing Classes:
ASTArray,ASTBlock,ASTBoolScalar,ASTDirective,ASTExpression,ASTFloatScalar,ASTIfElse,ASTIntScalar,ASTMethod,ASTStringScalar,ASTText,ASTVariable,IdentifierNode,ScalarNode,SimpleNode
public interface Node
All AST nodes must implement this interface. It provides basic
machinery for constructing the parent and child relationships
between nodes.
- Since:
- 4.1
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoidjjtAddChild(Node n, int i) This method tells the node to add its argument to the node's list of children.jjtGetChild(int i) This method returns a child node.intReturn the number of children the node has.voidjjtSetParent(Node n) This pair of methods are used to inform the node of its parent.
-
Method Details
-
jjtSetParent
This pair of methods are used to inform the node of its parent. -
jjtGetParent
Node jjtGetParent() -
jjtAddChild
This method tells the node to add its argument to the node's list of children. -
jjtGetChild
This method returns a child node. The children are numbered from zero, left to right. -
jjtGetNumChildren
int jjtGetNumChildren()Return the number of children the node has. -
evaluate
-