Refactor lexer header to include additional token types and integer literal structure
This commit is contained in:
parent
a7d2b1c421
commit
2e5887b6c9
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue