#tree-sitter #generate #type-sitter #wrapper #proc-macro #typed #grammar

macro type-sitter-proc

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

7 unstable releases (3 breaking)

0.4.0 Apr 1, 2024
0.3.1 Apr 1, 2024
0.3.0 Jul 18, 2023
0.2.1 May 16, 2023
0.1.2 May 8, 2023

#882 in Programming languages

Download history 4/week @ 2024-02-26 366/week @ 2024-04-01

366 downloads per month

MIT/Apache

120KB
2.5K SLoC

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

Crates.io

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 at least as good 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!

Dependencies

~7–15MB
~133K SLoC