diff options
author | 2021-07-22 01:09:11 -0700 | |
---|---|---|
committer | 2021-07-22 01:09:11 -0700 | |
commit | 50473e5ab573d85b1a555874332f6aecdd36f659 (patch) | |
tree | 4371889b4ee894a8cb9413def9726896f53e45e2 /clox/src/main.c | |
parent | 7fe0c7f639ca15312f2ed5a77beddfdb0ada1ae6 (diff) | |
download | crafting-interpreters-50473e5ab573d85b1a555874332f6aecdd36f659.tar.gz crafting-interpreters-50473e5ab573d85b1a555874332f6aecdd36f659.zip |
Chapter 15.1
Diffstat (limited to 'clox/src/main.c')
-rw-r--r-- | clox/src/main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/clox/src/main.c b/clox/src/main.c index 9aeb8fd..0f810ba 100644 --- a/clox/src/main.c +++ b/clox/src/main.c @@ -1,8 +1,11 @@ -#include "common.h" #include "chunk.h" +#include "common.h" #include "debug.h" +#include "vm.h" + +int main(int argc, const char *argv[]) { + initVM(); -int main(int argc, const char* argv[]) { Chunk chunk; initChunk(&chunk); @@ -13,6 +16,8 @@ int main(int argc, const char* argv[]) { writeChunk(&chunk, OP_RETURN, 123); disassembleChunk(&chunk, "test chunk"); + interpret(&chunk); + freeVM(); freeChunk(&chunk); return 0; } |