clox/tests/01_main.c
2024-08-31 15:54:46 -05:00

19 lines
393 B
C

#include "../include/common.h"
#include "../include/chunk.h"
#include "../include/debug.h"
int main(void){
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");
freeChunk(&chunk);
return 0;
}