Add length field to Identifier struct and define String struct in lexer header
This commit is contained in:
parent
2e5887b6c9
commit
292accecc3
|
|
@ -34,6 +34,7 @@ typedef enum {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *name;
|
const char *name;
|
||||||
|
size_t length;
|
||||||
uint8_t is_literal;
|
uint8_t is_literal;
|
||||||
} Identifier;
|
} Identifier;
|
||||||
|
|
||||||
|
|
@ -42,4 +43,9 @@ typedef struct {
|
||||||
IntegerBuiltInType type;
|
IntegerBuiltInType type;
|
||||||
} IntegerLiteral;
|
} IntegerLiteral;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
const char *value;
|
||||||
|
size_t length;
|
||||||
|
} String;
|
||||||
|
|
||||||
#endif // SLS_LEXER_H
|
#endif // SLS_LEXER_H
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue