From 38dc63a67879a42f208b5642a8590e1192e8e2e5 Mon Sep 17 00:00:00 2001 From: Ben Winston Date: Sat, 20 May 2023 18:58:51 -0400 Subject: global variables --- main.d | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) (limited to 'main.d') diff --git a/main.d b/main.d index 0bdc74b..678bfb0 100644 --- a/main.d +++ b/main.d @@ -18,6 +18,7 @@ import vm; void repl() { while(true) { + write("> "); string input = strip(stdin.readln()); @@ -27,45 +28,12 @@ void repl() { Parser parser = new Parser(input); - /* - Chunk chunk = new Chunk(); - Form f; - while (true) { - f = parser.parseForm(); - printForm(f, ""); - - f.compile(chunk); - - - if (f.type == FormType.EOF) { - break; - } - } - */ - Compiler compiler = new Compiler(FunctionType.SCRIPT, &parser); Function func = compiler.compile(); VM vm = new VM(func); vm.run(); - /* - writeln("== disassembling chunk =="); - int off = 0; - while (off < func.chunk.code.length) { - off = disassemble(func.chunk, off); - } - */ - - /* - Compiler compiler = new Compiler(lex); - - ObjFunction func = compiler.compile(); - - VM vm = new VM(func); - vm.run(); - */ - } } -- cgit v1.2.3