Merge pull request #46 from Servostar/40-add-parser-rule-for-calling-functions

added parser rule for function calling
This commit is contained in:
servostar 2024-05-06 08:52:00 +00:00 committed by GitHub
commit f8c888216a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 1 deletions

View File

@ -65,7 +65,6 @@
%%
program: statementlist;
expr: ValFloat
| ValInt
| ValMultistr
@ -73,6 +72,17 @@ expr: ValFloat
| Ident
| operation;
exprlist: expr ',' exprlist
| expr
| ;
paramlist: paramlist '(' exprlist ')'
| ;
funcall: Ident paramlist { DEBUG("Function call"); };
assign: Ident '=' expr { DEBUG("Assignment"); };
statementlist: statementlist statement
| ;