change over to a linked list system and start trying to fix bug which causes the parser to not output anything meaningful due to memory deallocation

This commit is contained in:
2025-05-28 22:51:27 +01:00
parent 43bc7663fc
commit b82e351daf
13 changed files with 465 additions and 176 deletions

View File

@@ -71,17 +71,5 @@ typedef struct {
char *value;
} Token;
typedef struct {
int count;
int capacity;
Token *tokens;
} TokenStruct;
TokenStruct *init_token();
void add_token(TokenStruct *token, TokenType type, const char *value, int line,
int column);
void free_tokens(TokenStruct *token);
Token *create_token(TokenType type, int line, int column, char *value);
#endif