1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#ifndef clox_vm_h #define clox_vm_h #include "chunk.h" typedef struct { Chunk *chunk; uint8_t *ip; } VM; typedef enum { INTERPRET_OK, INTERPRET_COMPILE_ERROR, INTERPRET_RUNTIME_ERROR } InterpretResult; void initVM(); void freeVM(); InterpretResult interpret(Chunk *chunk); #endif