mirror of
https://github.com/tree-sitter/tree-sitter.git
synced 2026-09-10 07:26:23 -04:00
In a future feature, `RulePool` nodes can be shared between lexical and syntax roots. No grammars generated by grammar.js/grammra.json are affected by this issue, as they lead to a tree pool rather than a DAG. With a DAG `RulePool` representation, however, rewriting tokens during extraction can destroy a token body before lexical expansion consumes it and can renumber shared syntax nodes more than once. Record terminal rewrites while inspecting the original pool, expand tokens and separators first, then commit the rewrites and renumber each reachable syntax node once. Resolve grammar metadata against the pending rewrites before mutating the pool. |
||
|---|---|---|
| .. | ||
| cli | ||
| config | ||
| generate | ||
| highlight | ||
| language | ||
| loader | ||
| tags | ||
| xtask | ||