diff options
| author | Ben Winston | 2023-05-20 18:58:51 -0400 |
|---|---|---|
| committer | Ben Winston | 2023-05-20 18:58:51 -0400 |
| commit | 38dc63a67879a42f208b5642a8590e1192e8e2e5 (patch) | |
| tree | e36a71c752d8d0c89e343ef02e295115d3e19ce7 /main.d | |
| parent | 0c70372774297272dd14133d48e40e9a3624420a (diff) | |
global variables
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(); - */ - } } |
