diff options
| author | Ben Winston | 2023-05-21 20:26:59 -0400 |
|---|---|---|
| committer | Ben Winston | 2023-05-21 20:26:59 -0400 |
| commit | 8e1f84b1369909745859777d07a5e8e74b5df334 (patch) | |
| tree | 460f42755407e9ddf1b3e6dfabea6a09b3d1585d /main.d | |
| parent | a26bfccdc52ab50a83b8f8d170c9e1a3be0164a5 (diff) | |
move disassembly into compiler, preparing for functions
Diffstat (limited to 'main.d')
| -rw-r--r-- | main.d | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -28,18 +28,9 @@ void repl() { Parser parser = new Parser(input); - Compiler compiler = new Compiler(FunctionType.SCRIPT, &parser); + Compiler compiler = new Compiler(ObjType.SCRIPT, &parser); Function func = compiler.compile(); - int cnt = 0; - writeln("== disassembly =="); - while(true) { - if (cnt >= func.chunk.code.length) { - break; - } - cnt = disassemble(func.chunk, cnt); - } - VM vm = new VM(func); vm.run(); |
