From d9dda59a2b4bb804fcc9a51acc2ff402a16672bd Mon Sep 17 00:00:00 2001 From: Kamva9697 Date: Sun, 5 Nov 2023 10:49:00 +0200 Subject: [PATCH] fix: make the repl work --- src/main.zig | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main.zig b/src/main.zig index e74cd38..09ad8b1 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1,8 +1,16 @@ const std = @import("std"); -const token = @import("./token.zig"); -const lexerTests = @import("./lexerTest.zig"); + const repl = @import("./repl.zig"); -pub fn main() anyerror!void { - try repl.start(); +const print = std.debug.print; + +pub fn main() !void { + print("Hello this is the Monkey-lang, Code your world, one banana at a time\n", .{}); + print("Start typing, Monkey-style :) \n\n", .{}); + + var gpa = std.heap.GeneralPurposeAllocator(.{}){}; + var arena = std.heap.ArenaAllocator.init(gpa.allocator()); + defer arena.deinit(); + + try repl.start(arena.allocator()); }