Added C99 support, refactored headers

This commit is contained in:
2021-02-15 16:20:04 -06:00
parent 71c8dc7e34
commit 35466f691f
8 changed files with 40 additions and 40 deletions

View File

@@ -6,16 +6,14 @@
#include "coperators.h"
#include "cvalue.h"
typedef struct CValueArray CValueArray;
typedef struct CChunk {
struct CChunk {
size_t capacity; // the amount of space we've allocated for
size_t count; // the space we're currently using
INSTRUCTION *buf; // whole chunk
CValueArray constants; // holds constants
size_t lineCapacity;
int *lineInfo;
} CChunk;
};
CChunk *newChunk(CState* state, size_t startCapacity);
void initChunk(CState* state, CChunk *chunk, size_t startCapacity);