1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Vendored tree-sitter grammars for the languages Quilt can parse.
//!
//! The generated `parser.c` / `scanner.c` for each language live under
//! `quilt/grammars/<lang>/` and are compiled by `build.rs` (gated on the same
//! Cargo features as the bindings below). They are **generated** — never edit
//! them by hand. Regenerate from the pinned `QuiltLang/tree-sitter-*` forks with
//! `bin/sync-grammars`; the pins (git url + rev) live in the workspace
//! `Cargo.toml` `[workspace.dependencies]`, and CI's `bin/check-grammars` fails
//! if the vendored copies drift from them.
//!
//! Each `LANGUAGE` is the same [`LanguageFn`] the upstream `tree-sitter-<lang>`
//! crate exposes, so callers use it identically:
//! `parser.set_language(&grammars::rust::LANGUAGE.into())`.
//!
//! [`LanguageFn`]: tree_sitter_language::LanguageFn
/// Declare a vendored grammar: a module exposing `$konst: LanguageFn` backed by
/// the generated parser's `extern "C"` entry point (`$func`), gated on `$feat`.
// Host languages: their parsers are tied to the `parse` umbrella feature (see
// `build.rs` and `Cargo.toml`), so they are always present whenever this module
// is compiled.
grammar!;
grammar!;
// Target languages: each behind its own feature (which implies `parse`).
grammar!;
grammar!;
grammar!;
grammar!;
grammar!;