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 Type Method Description
    void evaluate​(Context context)  
    void jjtAddChild​(Node n, int i)
    This method tells the node to add its argument to the node's list of children.
    Node jjtGetChild​(int i)
    This method returns a child node.
    int jjtGetNumChildren()
    Return the number of children the node has.
    Node jjtGetParent()  
    void jjtSetParent​(Node n)
    This pair of methods are used to inform the node of its parent.
  • Method Details

    • jjtSetParent

      void jjtSetParent​(Node n)
      This pair of methods are used to inform the node of its parent.
    • jjtGetParent

      Node jjtGetParent()
    • jjtAddChild

      void jjtAddChild​(Node n, int i)
      This method tells the node to add its argument to the node's list of children.
    • jjtGetChild

      Node jjtGetChild​(int i)
      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

      void evaluate​(Context context)