From 0c5a0db3a33dd784509af2da92c6876009e3a05c Mon Sep 17 00:00:00 2001 From: Will Lillis Date: Sun, 14 Dec 2025 12:55:42 -0500 Subject: [PATCH 1/3] fix: use correct member function to display `Node` kind --- src/node.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node.zig b/src/node.zig index 0bca5fe..1e75a8a 100644 --- a/src/node.zig +++ b/src/node.zig @@ -386,10 +386,10 @@ pub const Node = extern struct { /// Format the node as a string. pub fn format(self: Node, writer: *std.Io.Writer) !void { try writer.print( - "Node(id=0x{x}, type={s}, start={d}, end={d})", + "Node(id=0x{x}, kind={s}, start={d}, end={d})", .{ @intFromPtr(self.id), - self.type(), + self.kind(), self.startByte(), self.endByte(), }, From 11f0792ba3060ecd54f6423ad4574854acd6d005 Mon Sep 17 00:00:00 2001 From: Will Lillis Date: Sun, 14 Dec 2025 12:57:16 -0500 Subject: [PATCH 2/3] fix: pass in new empty slice if capture count is 0 The `QueryMatch.into` function indexes into `self.captures`, which can be null. If this is the case, slicing `[0..0]` is still invalid, so return an empty slice instead. --- src/query_cursor.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/query_cursor.zig b/src/query_cursor.zig index ccb5404..9e540a1 100644 --- a/src/query_cursor.zig +++ b/src/query_cursor.zig @@ -12,7 +12,7 @@ const QueryMatch = extern struct { return .{ .id = self.id, .pattern_index = self.pattern_index, - .captures = self.captures[0..self.capture_count], + .captures = if (self.capture_count == 0) &[_]Query.Capture{} else self.captures[0..self.capture_count], }; } }; From 4613ce13dcedd5558f1224afc19bbc8b725527a8 Mon Sep 17 00:00:00 2001 From: Will Lillis Date: Sun, 14 Dec 2025 13:03:30 -0500 Subject: [PATCH 3/3] fix(ci): remove x86-64-macos-none target --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9545d74..40fcd5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,6 @@ jobs: - x86_64-windows-msvc # - aarch64-windows-gnu - aarch64-macos-none - - x86_64-macos-none wasm: - "true" - "false" @@ -56,8 +55,6 @@ jobs: # target: aarch64-windows-gnu - os: macos-15 target: aarch64-macos-none - - os: macos-13 - target: x86_64-macos-none exclude: # doesn't build - target: x86_64-windows-msvc