aboutsummaryrefslogtreecommitdiff
path: root/main.d
diff options
context:
space:
mode:
authorBen Winston2023-05-20 18:58:51 -0400
committerBen Winston2023-05-20 18:58:51 -0400
commit38dc63a67879a42f208b5642a8590e1192e8e2e5 (patch)
treee36a71c752d8d0c89e343ef02e295115d3e19ce7 /main.d
parent0c70372774297272dd14133d48e40e9a3624420a (diff)
global variables
Diffstat (limited to 'main.d')
-rw-r--r--main.d34
1 files changed, 1 insertions, 33 deletions
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();
- */
-
}
}