Refactor lexer header to include additional token types and integer literal structure

This commit is contained in:
Kyler Olsen 2025-10-27 17:36:09 -06:00
parent a7d2b1c421
commit 2e5887b6c9
1 changed files with 17 additions and 0 deletions

View File

@ -13,6 +13,7 @@ typedef enum {
TOKEN_IDENTIFIER,
TOKEN_INTEGER,
TOKEN_FLOAT,
TOKEN_DOUBLE,
TOKEN_STRING,
TOKEN_BOOLEAN,
TOKEN_ARRAY,
@ -20,9 +21,25 @@ typedef enum {
TOKEN_TYPE_TUPLE,
} TokenType;
typedef enum {
INTEGER_I64,
INTEGER_I32,
INTEGER_I16,
INTEGER_I8,
INTEGER_U64,
INTEGER_U32,
INTEGER_U16,
INTEGER_U8,
} IntegerBuiltInType;
typedef struct {
const char *name;
uint8_t is_literal;
} Identifier;
typedef struct {
uint64_t value;
IntegerBuiltInType type;
} IntegerLiteral;
#endif // SLS_LEXER_H