diff options
author | c+1 | 2023-11-17 18:58:54 -0500 |
---|---|---|
committer | c+1 | 2023-11-17 18:58:54 -0500 |
commit | 2cc68205a1c0b746ad405607940e7183c4fb09b0 (patch) | |
tree | dd16a65479194da364929c71a22d6fb01b58f36a /src/include/parser.h | |
parent | 7be0923d486cd6ed2e304d3673146563ad677ea7 (diff) |
Cleaned up.
Diffstat (limited to 'src/include/parser.h')
-rw-r--r-- | src/include/parser.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/include/parser.h b/src/include/parser.h index b101485..79e1289 100644 --- a/src/include/parser.h +++ b/src/include/parser.h @@ -6,15 +6,24 @@ #include "token.h" typedef struct PARSER { - /* the token list being parsed */ + /* The token list being consumed. */ token_t* token; - /* the abstract syntax tree being generated */ + /* The AST being produced. */ tree_t* tree; } parser_t; +/* Creates a new parser. */ parser_t* parser_init(token_t* token); -/* free parser struct, **but not þe token list ∨ ast** */ + +/* + Destroys a parser. + - Does not free the token list. + - Does not free the AST. +*/ void parser_destroy(parser_t* parser); +/* Step the parser forward by 1 token. */ +void parser_nxt_token(parser_t* parser); + #endif |