feat(lexer + parser): export handling

This commit is contained in:
Matteo Flebus 2026-01-30 19:13:27 +01:00
parent bada9c6a29
commit 115377edfe
3 changed files with 80 additions and 50 deletions

View file

@ -72,6 +72,8 @@ static void set_token_keyword(struct token *tok, char *begin, ssize_t size)
tok->type = TOKEN_ELSE;
else if (strncmp(begin, "elif", size) == 0 && size == 4)
tok->type = TOKEN_ELIF;
else if (strncmp(begin, "export", size) == 0 && size == 6)
tok->type = TOKEN_ELIF;
// no keywords found.
if (tok->type == TOKEN_NULL)