generate_nodes!() { /* proc-macro */ }Expand description
Generate typed AST node wrappers.
§Parameters
0: Path to thenode-types.jsonfile of the language, relative to the crate root.
§Note
If you included the tree-sitter language as a dependency that is downloaded from the internet,
you need to vendor it or at least vendor its node-types.json, because this macro needs its
path and I don’t know how to get it from the crate.
§Example
ⓘ
use type_sitter_proc::generate_nodes;
generate_nodes!("vendor/tree-sitter-json/src/node-types.json");