aboutsummaryrefslogtreecommitdiff
path: root/src/interpreter.zig
diff options
context:
space:
mode:
authorJulien Dessaux2022-06-12 21:47:52 +0200
committerJulien Dessaux2022-06-12 21:47:52 +0200
commitf7a5e4f52c529a74ca0e4ec5a269c4d594990802 (patch)
treee15a2d8c22aae7efba67904048a121aa1e8cc7e3 /src/interpreter.zig
parentImplemented basic cli (diff)
downloadzigfunge98-f7a5e4f52c529a74ca0e4ec5a269c4d594990802.tar.gz
zigfunge98-f7a5e4f52c529a74ca0e4ec5a269c4d594990802.tar.bz2
zigfunge98-f7a5e4f52c529a74ca0e4ec5a269c4d594990802.zip
Refactored io functions handling
Diffstat (limited to 'src/interpreter.zig')
-rw-r--r--src/interpreter.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interpreter.zig b/src/interpreter.zig
index 1ab07c9..a947d6f 100644
--- a/src/interpreter.zig
+++ b/src/interpreter.zig
@@ -1,5 +1,6 @@
const std = @import("std");
const field = @import("field.zig");
+const io = @import("io.zig");
const pointer = @import("pointer.zig");
pub const Interpreter = struct {
@@ -12,7 +13,7 @@ pub const Interpreter = struct {
self.field.deinit();
self.allocator.destroy(self);
}
- pub fn init(allocator: std.mem.Allocator, reader: anytype, ioFunctions: ?pointer.IOFunctions, args: []const []const u8) !*Interpreter {
+ pub fn init(allocator: std.mem.Allocator, reader: anytype, ioFunctions: io.Functions, args: []const []const u8) !*Interpreter {
var i = try allocator.create(Interpreter);
errdefer allocator.destroy(i);
i.allocator = allocator;