Node
Represents a node in an Abstract Syntax Tree (AST) produced by parsing.
A Node encapsulates the hierarchical structure of parsed input, containing references to child nodes and tokens captured during parsing. Nodes provide methods to access their children, extract tokens, and navigate the parse tree structure.
Custom node types should extend this class to represent specific syntactic constructs in your Grammar.
Inheritors
Types
A ParserCapture subclass produced by AlternationElement.
A mutable container for capturing tokens and nodes during production matching.
A ParserCapture subclass produced by RepeatableElement.
Properties
Returns true if this node is an AlternationCapture.
Returns true if this node is a RepeatableCapture.
The parser stack frames active when this Node was created.
Functions
Executes the block with this node as an AlternationCapture receiver if it is one.
Executes the block with this node as a RepeatableCapture receiver if it is one.
Returns all tokens captured by this Node, and its descendant subnodes, recursively.