clox/include/chunk.h

22 lines
307 B
C
Raw Normal View History

2024-08-31 17:41:43 +00:00
#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