mirror of
https://github.com/tree-sitter/tree-sitter.git
synced 2026-09-10 07:36:22 -04:00
Aliasing a supertype makes the aliased occurrence appear as a regular node in the syntax tree. For example, ``` alias($.expression, $.expression_target) ``` can produce: ``` (expression_target (identifier)) ``` Previously, node-types generation skipped the source supertype entirely. It could reference `expression_target` as a field or child type without emitting a corresponding top-level entry for it. Continue emitting the canonical `expression` entry with its `subtypes`, but pass aliased appearances through regular node generation so their children and fields are recorded and merged normally. |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
Tree-sitter Generate
This helper crate implements the logic for the tree-sitter generate command,
and can be used by external tools to generate a parser from a grammar file.