Synopsis Node values.
Syntax Exp0 ( Exp1, Exp2, ... )
Exp0 Exp1 Exp2 ... Exp0 ( Exp1, Exp2, ... )
str value value ... node
Usage import Node; (included in prelude)
Description Values of type node represent untyped trees and are constructed as follows:
  • the string value of Exp0 is the node name;
  • zero or more expressions of type value are the node's children.
Nodes can have Annotations.

The following are provided for nodes:
  • Equal: Equal operator on node values.
  • GreaterThan: Greater than operator on node values.
  • GreaterThanOrEqual: Greater than or equal operator on node values.
  • LessThan: Less than operator on node values.
  • LessThanOrEqual: Less than or equal operator on node values.
  • NotEqual: Not equal operator on node values.
  • Slice: Retrieve a slice of a node's argument list.
  • Subscription: Retrieve an argument of a node via its index.
Examples A node with name "my_node" and three arguments
rascal>"my_node"(1, true, "abc");
node: "my_node"(1,true,"abc")
A nested node structure:
rascal>"my_node1"(1, "my_node2"(3.5, ["a", "b", "c"]), true);
node: "my_node1"(
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit