Expand description
Tree-sitter CST parser integration.
Following LASTMERGE (Duarte, Borba, Cavalcanti — 2025), we parse source code into concrete syntax trees using Tree-sitter. Unlike abstract syntax trees, CSTs preserve all syntactic elements (whitespace, punctuation, comments), enabling faithful source reconstruction.
The parser maps Tree-sitter’s node representation into our CstNode types, classifying nodes as Leaf (terminal), Constructed (fixed-arity non-terminal), or List (variable-length non-terminal with ordering semantics).
Enums§
Functions§
- parse_
to_ cst - Parse source code into a CstNode tree using tree-sitter.
- reset_
ids - Reset the ID counter (for testing determinism).