Class Program

java.lang.Object
org.rumbledb.expressions.Node
org.rumbledb.expressions.scripting.Program

public class Program extends Node
A program is the first-class citizen in JSONiq scripting syntax. A program corresponds to the body of a block expression. The final expression may be omitted. In this case, the final expression is considered the empty expression. The result of a program is the result of executing, if present, an expression. A program forms a tree of statements and possibly an expression.
  • Constructor Details

  • Method Details

    • accept

      public <T> T accept(AbstractNodeVisitor<T> visitor, T argument)
      Description copied from class: Node
      Accept method for the visitor pattern.
      Specified by:
      accept in class Node
      Type Parameters:
      T - the type of the objects returned by the visitor.
      Parameters:
      visitor - the visitor.
      argument - the input from the visitor.
      Returns:
      the object returned by this visitor
    • getChildren

      public List<Node> getChildren()
      Description copied from class: Node
      Returns all children nodes as a list. The list is new and can be modified at will by the caller.
      Specified by:
      getChildren in class Node
      Returns:
      the children nodes as a list.
    • serializeToJSONiq

      public void serializeToJSONiq(StringBuffer sb, int indent)
      Specified by:
      serializeToJSONiq in class Node
    • getStatementsAndOptionalExpr

      public StatementsAndOptionalExpr getStatementsAndOptionalExpr()