Refactor lexer header to define StringLiteral struct and add placeholders for ArrayLiteral, TokenString, and TypeTuple
This commit is contained in:
parent
292accecc3
commit
285e296021
|
|
@ -46,6 +46,33 @@ typedef struct {
|
|||
typedef struct {
|
||||
const char *value;
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue