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;
|
||||
|
||||
typedef struct {
|
||||
// TODO
|
||||
const Token *tokens;
|
||||
size_t length;
|
||||
} TokenString;
|
||||
|
||||
typedef struct {
|
||||
|
|
@ -75,4 +76,9 @@ typedef struct {
|
|||
};
|
||||
} Token;
|
||||
|
||||
typedef struct TokenStream {
|
||||
Token token;
|
||||
struct TokenStream *next;
|
||||
} TokenStream;
|
||||
|
||||
#endif // SLS_LEXER_H
|
||||
|
|
|
|||
Loading…
Reference in New Issue