Skip to content

Commit 089d8ca

Browse files
committed
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
1 parent f770422 commit 089d8ca

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

lib/basic/src/basic_parser.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,8 @@ int basic_parse_to_ast_between_level(BASICTokenParseList *parse_list, ASTNode *r
4949
{
5050
switch (parse_list->tokens[i].token_type)
5151
{
52+
// Part of an expression
5253
case TOKEN_IDENTIFIER:
53-
{
54-
// The identifier may be a function call
55-
if (basic_parse_id_is_fn_call(parse_list->tokens, i, to))
56-
{
57-
cb_ret = basic_parse_form_function(parse_list, root, i, to, &i);
58-
if (cb_ret != 0)
59-
return cb_ret;
60-
break;
61-
}
62-
}
63-
64-
// Not a function call, so it may be an expression
6554
case TOKEN_NUM:
6655
case TOKEN_STRING:
6756
case TOKEN_SEPARATOR:

0 commit comments

Comments
 (0)