2024-08-31 17:41:43 +00:00
|
|
|
#include "../include/common.h"
|
|
|
|
#include "../include/chunk.h"
|
|
|
|
#include "../include/debug.h"
|
|
|
|
|
|
|
|
int main(void){
|
|
|
|
Chunk chunk;
|
|
|
|
initChunk(&chunk);
|
2024-08-31 20:54:46 +00:00
|
|
|
|
|
|
|
int constant = addConstant(&chunk,1.2);
|
|
|
|
writeChunk(&chunk, OP_CONSTANT,10);
|
|
|
|
writeChunk(&chunk,constant,10);
|
|
|
|
writeChunk(&chunk, OP_RETURN,10);
|
2024-08-31 17:41:43 +00:00
|
|
|
|
|
|
|
disassembleChunk(&chunk,"Test Chunk");
|
|
|
|
freeChunk(&chunk);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|