Class ExprNode

  • All Implemented Interfaces:
    IParseNode

    public class ExprNode
    extends ParseNodeBase
    This node represents the root of the parse tree.
    Since:
    7.0
    Author:
    O. Kerpershoek
    • Constructor Detail

      • ExprNode

        public ExprNode​(IParseNode expr)
        Constructs the expression node without any local variables.
        Parameters:
        expr - The node containing the expression parse tree.
      • ExprNode

        public ExprNode​(IParseNode expr,
                        List<LocalVariableNode> localVariableNodes)
        Constructs the expression node with a list of local variables.
        Parameters:
        expr - The node containing the expression parse tree.
        localVariableNodes - List containing local variable definitions.
    • Method Detail

      • getExpression

        public IParseNode getExpression()
        This method returns the main expression parse tree.
        Returns:
        The main expression parse tree.
      • getVariables

        public LocalVariableNode[] getVariables()
        This method returns an array containing the local variable definitions. As local variables are optional, the returned array will usually be empty (but never null).
        Returns:
        An array containing the local variable definitions.