From fb91d817ea3a1cbdac79d193c278d980d1c597d0 Mon Sep 17 00:00:00 2001 From: Narayan Bandodker Date: Wed, 22 Apr 2026 11:14:49 +0530 Subject: [PATCH] Removed extra specialization handler block for function The token parser handles function calls automatically, so there was no need to specialize a function call detection and handling, which caused the `random() + 1` parsing error bug --- lib/basic/src/basic_parser.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/lib/basic/src/basic_parser.c b/lib/basic/src/basic_parser.c index 46b37ae..b609a74 100644 --- a/lib/basic/src/basic_parser.c +++ b/lib/basic/src/basic_parser.c @@ -49,19 +49,8 @@ int basic_parse_to_ast_between_level(BASICTokenParseList *parse_list, ASTNode *r { switch (parse_list->tokens[i].token_type) { + // Part of an expression case TOKEN_IDENTIFIER: - { - // The identifier may be a function call - if (basic_parse_id_is_fn_call(parse_list->tokens, i, to)) - { - cb_ret = basic_parse_form_function(parse_list, root, i, to, &i); - if (cb_ret != 0) - return cb_ret; - break; - } - } - - // Not a function call, so it may be an expression case TOKEN_NUM: case TOKEN_STRING: case TOKEN_SEPARATOR: