aboutsummaryrefslogtreecommitdiff
path: root/main.d
diff options
context:
space:
mode:
authorBen Winston2023-05-22 20:26:27 -0400
committerBen Winston2023-05-22 20:26:27 -0400
commitab6deb5eb1244f566c8a8b22022c68d50d5eb4d7 (patch)
tree58295e80efb472836e8c226f10e00ffd16468b68 /main.d
parentb7fba62e9f1f9f7a5a67fd64d4aed55646d1b58e (diff)
make the REPL actually remember things
Diffstat (limited to 'main.d')
-rw-r--r--main.d5
1 files changed, 3 insertions, 2 deletions
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;
}