#type-sitter #tree-sitter

macro type-sitter-proc

procedural macros for type-sitter (generate typed wrappers for tree-sitter grammars from node-types.json and queries)

5 releases

0.2.1 May 16, 2023
0.2.0 May 16, 2023
0.1.2 May 8, 2023
0.1.1 May 8, 2023
0.1.0 May 8, 2023

#148 in Parser tooling

Download history 74/week @ 2023-05-06 42/week @ 2023-05-13 4/week @ 2023-05-20 7/week @ 2023-05-27

127 downloads per month


2.5K SLoC

type-sitter-proc: generate type-sitter wrappers via procedural macros


See type-sitter for more information. This provides procedural macros which will generate typed node wrappers. However, it's highly recommended to use type-sitter-cli instead, as it's more tested and will give your IDE better inference.

If a project depends on this (and as with type-sitter-cli), it must also depend on type-sitter-lib and tree-sitter.

Note that you can't generate multiple node-type or query wrappers in the same module, due to the fact that they will each generate their own submodules with the same name. You have to put the wrapper-generating macros in separate modules and then pub use the generated definitions. Sorry!


~172K SLoC