19 lines
393 B
C
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;
|
|
}
|