From ab6deb5eb1244f566c8a8b22022c68d50d5eb4d7 Mon Sep 17 00:00:00 2001 From: Ben Winston Date: Mon, 22 May 2023 20:26:27 -0400 Subject: make the REPL actually remember things --- main.d | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'main.d') diff --git a/main.d b/main.d index eeff97d..b540058 100644 --- a/main.d +++ b/main.d @@ -21,6 +21,7 @@ import vm; void repl() { + VM vm = new VM(); while(true) { write("> "); @@ -41,7 +42,7 @@ void repl() { VM vm = new VM(func); vm.run(); */ - interpret(input); + interpret(input, vm); } } @@ -70,7 +71,7 @@ int main(string[] args) { string data = readFile(fname); - interpret(data); + interpret(data, new VM()); } return 0; } -- cgit v1.2.3