Refactor ArrayLiteral and TypeTuple structs to define fields for token types and identifiers

This commit is contained in:
Kyler Olsen 2025-10-28 21:34:08 -06:00
parent 6b2ee045c7
commit bf8066ea21
1 changed files with 17 additions and 2 deletions

View File

@ -49,7 +49,19 @@ typedef struct {
} StringLiteral; } StringLiteral;
typedef struct { typedef struct {
// TODO TokenType type;
union {
Identifier *identifiers;
IntegerLiteral *integer_literals;
float *float_literals;
double *double_literals;
StringLiteral *string_literals;
uint8_t *boolean_literals;
ArrayLiteral *array_literals;
TokenString *token_strings;
TypeTuple *type_tuples;
};
size_t length;
} ArrayLiteral; } ArrayLiteral;
typedef struct { typedef struct {
@ -58,7 +70,10 @@ typedef struct {
} TokenString; } TokenString;
typedef struct { typedef struct {
// TODO Identifier *input_identifiers;
size_t input_length;
Identifier *output_identifiers;
size_t output_length;
} TypeTuple; } TypeTuple;
typedef struct { typedef struct {