From c524ef71e6e33495ec682558d3e4eb05648a72c9 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 25 Jan 2026 22:23:13 +0900 Subject: refactor code generation --- src/jq/execute.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/jq/execute.zig') diff --git a/src/jq/execute.zig b/src/jq/execute.zig index b30bd3d..f2bfe8c 100644 --- a/src/jq/execute.zig +++ b/src/jq/execute.zig @@ -2,8 +2,8 @@ const std = @import("std"); const jv = @import("../jv.zig"); const tokenize = @import("./tokenize.zig").tokenize; const parse = @import("./parse.zig").parse; -const Instr = @import("./compile.zig").Instr; -const compile = @import("./compile.zig").compile; +const Instr = @import("./codegen.zig").Instr; +const codegen = @import("./codegen.zig").codegen; pub const ExecuteError = error{ Unimplemented, @@ -148,7 +148,7 @@ pub const Runtime = struct { defer compile_allocator.deinit(); const tokens = try tokenize(compile_allocator.allocator(), reader); const ast = try parse(self.allocator, compile_allocator.allocator(), tokens, &self.constants); - const instrs = try compile(self.allocator, compile_allocator.allocator(), ast); + const instrs = try codegen(self.allocator, ast); self.instrs = instrs; // std.debug.print("BEGIN\n", .{}); // for (self.instrs) |instr| { -- cgit v1.3-1-g0d28