clox/include/chunk.h
2024-08-31 12:41:43 -05:00

22 lines
307 B
C

#ifndef CHUNK_INCLUDED
#define CHUNK_INCLUDED
#include "common.h"
typedef enum {
OP_RETURN,
OP_COUNT,
}OpCode;
typedef struct {
int len;
int cap;
uint8_t* code;
} Chunk;
void initChunk(Chunk *chunk);
void freeChunk(Chunk *chunk);
void writeChunk(Chunk *chunk, uint8_t byte);
#endif