diff options
Diffstat (limited to 'main.d')
| -rw-r--r-- | main.d | 34 |
1 files changed, 1 insertions, 33 deletions
@@ -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(); - */ - } } |
