Skip to content

Commit

Permalink
Add support for parsing nested function calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
akshanshbhatt committed Jul 27, 2022
1 parent bc618e8 commit 3ae3227
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lpython/parser/parser.yy
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,15 @@ function_call
| primary "(" keyword_items comma_opt ")" { $$ = CALL_03($1, $3, @$); }
| primary "(" expr comp_for_items ")" {
$$ = CALL_04($1, GENERATOR_EXPR($3, $4, @$), @$); }
| function_call "(" expr_list_opt ")" { $$ = CALL_01($1, $3, @$); }
| function_call "(" expr_list "," ")" { $$ = CALL_01($1, $3, @$); }
| function_call "(" expr_list "," keyword_items comma_opt ")" {
$$ = CALL_02($1, $3, $5, @$); }
| function_call "(" keyword_items "," expr_list comma_opt ")" {
$$ = CALL_02($1, $5, $3, @$); }
| function_call "(" keyword_items comma_opt ")" { $$ = CALL_03($1, $3, @$); }
| function_call "(" expr comp_for_items ")" {
$$ = CALL_04($1, GENERATOR_EXPR($3, $4, @$), @$); }
;

subscription
Expand Down

0 comments on commit 3ae3227

Please sign in to comment.