summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig11
1 files changed, 11 insertions, 0 deletions
diff --git a/build.zig b/build.zig
index 97d51a51..a78cd442 100644
--- a/build.zig
+++ b/build.zig
@@ -388,6 +388,10 @@ pub fn build(b: *std.Build) void {
const query_path = dep.path(g.query);
const query = std.Io.Dir.cwd().readFileAlloc(io, query_path.getPath(b), b.allocator, .limited(0x100000)) catch @panic("read " ++ g.name ++ " highlights");
ts_queries.addOption([]const u8, g.name ++ "_highlights", query);
+ // helix's textobject queries, vendored (vendor/queries); a
+ // grammar without one gets none
+ const objects = std.Io.Dir.cwd().readFileAlloc(io, b.pathFromRoot("vendor/queries/" ++ g.name ++ "/textobjects.scm"), b.allocator, .limited(0x100000)) catch "";
+ ts_queries.addOption([]const u8, g.name ++ "_textobjects", objects);
const lib = b.addLibrary(.{
.name = "tree-sitter-" ++ g.name,
@@ -1103,6 +1107,13 @@ pub fn build(b: *std.Build) void {
const hxparity_step = b.step("hxparity", "run the file-vs-pty editing parity suite (-- [--waivers w.jsonl] <cases.jsonl>...)");
hxparity_step.dependOn(&run_hxparity.step);
+ // every helix-golf example, one case per step of its walkthrough
+ const run_hxgolf = b.addRunArtifact(hxdiff);
+ run_hxgolf.has_side_effects = true;
+ run_hxgolf.addArgs(&.{ "--strict", "test/hxcases/golf.jsonl", "test/hxcases/golf-goldens.jsonl", "test/hxcases/golf-waivers.jsonl" });
+ run_hxgolf.setCwd(b.path("."));
+ b.step("hxgolf", "compare the helix-golf examples against their Helix results").dependOn(&run_hxgolf.step);
+
const lspbench = b.addExecutable(.{
.name = "pardes-lspbench",
.root_module = b.createModule(.{