diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-01-25 22:23:13 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-01-25 22:23:13 +0900 |
| commit | c524ef71e6e33495ec682558d3e4eb05648a72c9 (patch) | |
| tree | 2d48d7cfb11a5cfce734df384354d4adf0d17c60 /src/jq/execute.zig | |
| parent | 57f06b7309aad18d83e9ecb04d7c59ccea527f17 (diff) | |
| download | zgjq-c524ef71e6e33495ec682558d3e4eb05648a72c9.tar.gz zgjq-c524ef71e6e33495ec682558d3e4eb05648a72c9.tar.zst zgjq-c524ef71e6e33495ec682558d3e4eb05648a72c9.zip | |
refactor code generation
Diffstat (limited to 'src/jq/execute.zig')
| -rw-r--r-- | src/jq/execute.zig | 6 |
1 files changed, 3 insertions, 3 deletions
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| { |
