From 11ff1132c8116aef2296cc6ebd3c40b5e7e7b43f Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 25 Jan 2026 18:16:24 +0900 Subject: implement string literals --- src/jq/compile.zig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/jq/compile.zig') diff --git a/src/jq/compile.zig b/src/jq/compile.zig index fb2a691..78512b9 100644 --- a/src/jq/compile.zig +++ b/src/jq/compile.zig @@ -57,7 +57,12 @@ pub const Instr = union(Opcode) { pub fn deinit(self: Self, allocator: std.mem.Allocator) void { switch (self) { .object_key => |key| allocator.free(key), - .literal => |value| allocator.destroy(value), + .literal => |value| { + if (value.* == .string) { + allocator.free(value.string); + } + allocator.destroy(value); + }, else => {}, } } -- cgit v1.3-1-g0d28