feat(lexer): destroy_lexer_context

This commit is contained in:
Matteo Flebus 2026-01-20 19:40:00 +01:00
parent 927e4ea25a
commit d59b72dc45
2 changed files with 27 additions and 7 deletions

View file

@ -5,13 +5,17 @@
struct lexer_context
{
char *end_last_token;
char *end_previous_token;
ssize_t remaining_chars;
struct token *last_token;
struct token *previous_token;
struct token *current_token;
};
/* @brief: frees all fields of ctx and sets ctx to NULL.
*/
void destroy_lexer_context(struct lexer_context **ctx);
enum lexing_mode
{
LEXER_NORMAL,