aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig
index 3bdf68d..6962c37 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -1,6 +1,7 @@
const std = @import("std");
const field = @import("field.zig");
const interpreter = @import("interpreter.zig");
+const io = @import("io.zig");
const pointer = @import("pointer.zig");
const stackStack = @import("stackStack.zig");
@@ -17,7 +18,7 @@ pub fn main() anyerror!void {
var file = try std.fs.cwd().openFile("mycology/sanity.bf", .{});
defer file.close();
- var i = try interpreter.Interpreter.init(gpa.allocator(), file.reader(), null, args);
+ var i = try interpreter.Interpreter.init(gpa.allocator(), file.reader(), io.defaultFunctions, args);
defer i.deinit();
std.os.exit(@intCast(u8, try i.run()));
@@ -30,7 +31,7 @@ test "sanity" {
var file = try std.fs.cwd().openFile("mycology/sanity.bf", .{});
defer file.close();
const args = [_][]const u8{"sanity"};
- var i = try interpreter.Interpreter.init(std.testing.allocator, file.reader(), null, args[0..]);
+ var i = try interpreter.Interpreter.init(std.testing.allocator, file.reader(), io.defaultFunctions, args[0..]);
defer i.deinit();
try std.testing.expectEqual(try i.run(), 0);
}