summaryrefslogtreecommitdiff
path: root/core/syntax.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/syntax.zig')
-rw-r--r--core/syntax.zig7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/syntax.zig b/core/syntax.zig
index 00ee497f..1bb8fb52 100644
--- a/core/syntax.zig
+++ b/core/syntax.zig
@@ -37,11 +37,10 @@ const Spec = struct {
capture_styles: [256]u8 = undefined,
};
+/// A grammar is in the build when the build gave its queries (build/core.zig
+/// `treeSitter`): a tier's set, or the languages a package named.
fn grammarSelected(comptime g: grammar_manifest.Grammar) bool {
- return switch (g.tier) {
- .minimal => minimal_grammars,
- .full => full_grammars,
- };
+ return @hasDecl(ts_queries, g.name ++ "_highlights");
}
fn specCount() comptime_int {