Refactor lexer header to define StringLiteral struct and add placeholders for ArrayLiteral, TokenString, and TypeTuple

This commit is contained in:
Kyler Olsen 2025-10-27 17:46:15 -06:00
parent 292accecc3
commit 285e296021
1 changed files with 28 additions and 1 deletions

View File

@ -46,6 +46,33 @@ typedef struct {
typedef struct { typedef struct {
const char *value; const char *value;
size_t length; size_t length;
} String; } StringLiteral;
typedef struct {
// TODO
} ArrayLiteral;
typedef struct {
// TODO
} TokenString;
typedef struct {
// TODO
} TypeTuple;
typedef struct {
TokenType type;
union {
Identifier identifier;
IntegerLiteral integer_literal;
float float_literal;
double double_literal;
StringLiteral string_literal;
uint8_t boolean_literal;
ArrayLiteral array_literal;
TokenString token_string;
TypeTuple type_tuple;
};
} Token;
#endif // SLS_LEXER_H #endif // SLS_LEXER_H