fix: memory issues, parser errors and get_ast_if returning always NULL

This commit is contained in:
matteo 2026-01-30 16:51:10 +01:00 committed by Matteo Flebus
parent 5740195cb3
commit 52d35cf355
4 changed files with 5 additions and 2 deletions

View file

@ -281,7 +281,7 @@ struct ast *parse_simple_command(struct lexer_context *ctx)
struct ast *parse_element(struct lexer_context *ctx)
{
struct token *token = PEEK_TOKEN();
if (token->type == TOKEN_WORD)
if (token->type == TOKEN_WORD || token->type == TOKEN_ASSIGNMENT_WORD)
{
token = POP_TOKEN();
return ast_create_word(token->data);