diff options
author | Julien Dessaux | 2022-12-04 04:06:47 +0100 |
---|---|---|
committer | Julien Dessaux | 2022-12-04 04:06:47 +0100 |
commit | b373cbffa11f5f1f86f15f0be29b21993b42a5d7 (patch) | |
tree | bab595392417cab23148ba46994d3607ca54cebc /src/interpreter.zig | |
parent | Began writing a debugging tui (diff) | |
download | zigfunge98-b373cbffa11f5f1f86f15f0be29b21993b42a5d7.tar.gz zigfunge98-b373cbffa11f5f1f86f15f0be29b21993b42a5d7.tar.bz2 zigfunge98-b373cbffa11f5f1f86f15f0be29b21993b42a5d7.zip |
Improved tui debugger
Diffstat (limited to '')
-rw-r--r-- | src/interpreter.zig | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/interpreter.zig b/src/interpreter.zig index 51a542e..37ebba9 100644 --- a/src/interpreter.zig +++ b/src/interpreter.zig @@ -13,12 +13,6 @@ pub const Interpreter = struct { self.field.deinit(); self.allocator.destroy(self); } - pub inline fn getField(self: *Interpreter) *field.Field { - return self.field; - } - pub inline fn getPointer(self: *Interpreter) *pointer.Pointer { - return self.pointer; - } pub fn init(allocator: std.mem.Allocator, fileReader: anytype, timestamp: ?i64, args: []const []const u8, env: []const [*:0]const u8) !*Interpreter { var i = try allocator.create(Interpreter); errdefer allocator.destroy(i); @@ -31,12 +25,8 @@ pub const Interpreter = struct { } pub fn run(self: *Interpreter, ioContext: anytype) !i64 { while (true) { - if (try self.pointer.exec(ioContext)) |ret| { - if (ret.code) |code| { - return code; - } else { - return 0; - } + if (try self.step(ioContext)) |ret| { + return ret; } } } |