From 89ff5f4b1e5381f06ce0655292b166670c8ea5a0 Mon Sep 17 00:00:00 2001 From: Matteo Flebus Date: Thu, 15 Jan 2026 17:29:34 +0100 Subject: [PATCH] fix(parser): making it compile -- UNSTABLE --- src/parser/parsing_utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parser/parsing_utils.c b/src/parser/parsing_utils.c index 74ec36d..359cee2 100644 --- a/src/parser/parsing_utils.c +++ b/src/parser/parsing_utils.c @@ -121,7 +121,7 @@ struct ast *parse_compound_list(void) struct token *token = PEEK_TOKEN(); while (token->type != TOKEN_THEN || token->type != TOKEN_ELIF - || TOKEN_TYPE != TOKEN_ELSE) + || token->type != TOKEN_ELSE) { // Parse simple command if (token->type == TOKEN_SEMICOLON || token->type == TOKEN_NEWLINE) @@ -150,7 +150,7 @@ struct ast *parse_compound_list(void) struct ast *parse_else_clause(void) { // Eventual elif content - token = PEEK_TOKEN(); + struct token *token = PEEK_TOKEN(); struct ast *result = NULL; @@ -169,7 +169,7 @@ struct ast *parse_else_clause(void) } if (result == NULL) - result == ast_create_void(); + result = ast_create_void(); return result; }