From b373cbffa11f5f1f86f15f0be29b21993b42a5d7 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 4 Dec 2022 04:06:47 +0100 Subject: Improved tui debugger --- src/interpreter.zig | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/interpreter.zig') 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; } } } -- cgit v1.2.3