From bf8066ea214caaeb19dee97bd5b6821d0c44b514 Mon Sep 17 00:00:00 2001 From: Kyler Date: Tue, 28 Oct 2025 21:34:08 -0600 Subject: [PATCH] Refactor ArrayLiteral and TypeTuple structs to define fields for token types and identifiers --- SLS_C/include/sls/lexer.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/SLS_C/include/sls/lexer.h b/SLS_C/include/sls/lexer.h index 18d34af..5d72eab 100644 --- a/SLS_C/include/sls/lexer.h +++ b/SLS_C/include/sls/lexer.h @@ -49,7 +49,19 @@ typedef struct { } StringLiteral; 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; typedef struct { @@ -58,7 +70,10 @@ typedef struct { } TokenString; typedef struct { - // TODO + Identifier *input_identifiers; + size_t input_length; + Identifier *output_identifiers; + size_t output_length; } TypeTuple; typedef struct {