addition: Resul structs for rework

This commit is contained in:
2026-04-24 07:02:00 -06:00
parent 576bcd9504
commit 855d683005

View File

@@ -53,6 +53,29 @@ typedef struct ASTNode {
} data;
} ASTNode;
typedef struct {
bool is_valid;
union {
LexerErr err;
ArrayList *arr;
};
} TokenizeResult;
typedef struct {
bool is_valid;
union {
LexerErr err;
ASTNode node;
};
} ASTNodeResult;
typedef struct {
bool is_valid;
union {
LexerErr err;
int64_t number;
};
} I64Result;
// I prefer ot have a dynamic array for storing the "tokens"
typedef struct {
size_t len;