clox/tests/01_main.c
2024-09-01 17:43:28 -05:00

23 lines
451 B
C

#include "../include/common.h"
#include "../include/chunk.h"
#include "../include/debug.h"
#include "../include/vm.h"
int main(void){
initVM();
Chunk chunk;
initChunk(&chunk);
int constant = addConstant(&chunk,1.2);
writeChunk(&chunk, OP_CONSTANT,10);
writeChunk(&chunk,constant,10);
// writeChunk(&chunk, OP_RETURN,10);
disassembleChunk(&chunk,"Test Chunk");
freeVM();
freeChunk(&chunk);
return 0;
}