summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/core.zig5
-rw-r--r--build/library.zig4
2 files changed, 3 insertions, 6 deletions
diff --git a/build/core.zig b/build/core.zig
index 903b5602..b668211d 100644
--- a/build/core.zig
+++ b/build/core.zig
@@ -166,10 +166,7 @@ pub fn treeSitter(b: *std.Build, io: std.Io, target: std.Build.ResolvedTarget, c
var ts_libs: std.ArrayList(*std.Build.Step.Compile) = .empty;
const ts_queries = b.addOptions();
inline for (grammar_manifest.all) |g| {
- if (tree_sitter_grammars == .full or
- (tree_sitter_grammars == .minimal and g.tier != .full) or
- (tree_sitter_grammars == .zig and g.tier == .zig))
- grammar: {
+ if (tree_sitter_grammars == .full or (tree_sitter_grammars == .minimal and g.tier == .minimal)) grammar: {
const dep = b.dependencyLazy(g.dep, .{}) catch break :grammar;
const upstream = configureRead(b, io, dep.builder.root, g.query, 0x100000) catch @panic("read " ++ g.name ++ " highlights");
// the patterns that colour, filtered here once and not in
diff --git a/build/library.zig b/build/library.zig
index cabb175b..9a1bfb67 100644
--- a/build/library.zig
+++ b/build/library.zig
@@ -6,13 +6,13 @@ const patches = @import("patches.zig");
/// pardes as a library, all a package that depends on it is given: the
/// `pardes-syntax` module (core/lib_syntax.zig), the grammars, highlighting
/// and themes for a program that draws source text itself. It takes
-/// tree-sitter and the grammars of its `tree-sitter` option and no other
+/// tree-sitter and the grammars of its `grammars` option and no other
/// dependency, so nothing else is fetched (build.zig.zon). test/lib is such
/// a package, which `lib-test` builds.
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
- const tree_sitter_grammars = b.option(TreeSitterGrammars, "tree-sitter", "tree-sitter grammar set: zig, minimal (c/c++/zig), full") orelse .full;
+ const tree_sitter_grammars = b.option(TreeSitterGrammars, "grammars", "the tree-sitter grammars compiled in: none (the runtime alone), minimal (C, C++ and Zig) or full (all of them; the default)") orelse .full;
var threaded: std.Io.Threaded = .init(b.allocator, .{});
defer threaded.deinit();
const io = threaded.io();