Node<T, E> constructor

Node<T, E>(
  1. T nodeValue,
  2. List<Node> children
)

Constructs a new AST node with the given value and children.

Automatically assigns a unique ID to the node for LLVM register generation.

Parameters:

  • nodeValue: The primary value for this node
  • children: List of child nodes (can be empty)

Implementation

Node(this.nodeValue, this.children) {
  id = newId();
}