23 lines
451 B
C
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;
|
|
}
|