diff options
| author | Ben Winston | 2023-05-22 20:26:27 -0400 |
|---|---|---|
| committer | Ben Winston | 2023-05-22 20:26:27 -0400 |
| commit | ab6deb5eb1244f566c8a8b22022c68d50d5eb4d7 (patch) | |
| tree | 58295e80efb472836e8c226f10e00ffd16468b68 /main.d | |
| parent | b7fba62e9f1f9f7a5a67fd64d4aed55646d1b58e (diff) | |
make the REPL actually remember things
Diffstat (limited to 'main.d')
| -rw-r--r-- | main.d | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |
