Refactor TokenString struct to include tokens and length fields; define TokenStream struct
This commit is contained in:
parent
285e296021
commit
ea9fdd3791
|
|
@ -53,7 +53,8 @@ typedef struct {
|
||||||
} ArrayLiteral;
|
} ArrayLiteral;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
// TODO
|
const Token *tokens;
|
||||||
|
size_t length;
|
||||||
} TokenString;
|
} TokenString;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
@ -75,4 +76,9 @@ typedef struct {
|
||||||
};
|
};
|
||||||
} Token;
|
} Token;
|
||||||
|
|
||||||
|
typedef struct TokenStream {
|
||||||
|
Token token;
|
||||||
|
struct TokenStream *next;
|
||||||
|
} TokenStream;
|
||||||
|
|
||||||
#endif // SLS_LEXER_H
|
#endif // SLS_LEXER_H
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue