diff options
| author | Melodi <62381002+Melodi17@users.noreply.github.com> | 2025-08-09 12:51:08 +1000 |
|---|---|---|
| committer | Melodi <62381002+Melodi17@users.noreply.github.com> | 2025-08-09 12:51:08 +1000 |
| commit | 78d73c6e3a6e96b750bc4100f754484890ea650b (patch) | |
| tree | 5c6f8b891513534f4fe722202fcbd3f075536c6e /Compiler/CGrammar.g4 | |
| parent | 7f334796e8d0619dc744b1345a7b7b73a27220f9 (diff) | |
added lazy function definition
Diffstat (limited to 'Compiler/CGrammar.g4')
| -rw-r--r-- | Compiler/CGrammar.g4 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Compiler/CGrammar.g4 b/Compiler/CGrammar.g4 index b0f145f..1b47978 100644 --- a/Compiler/CGrammar.g4 +++ b/Compiler/CGrammar.g4 @@ -44,7 +44,7 @@ statement declaration - : 'int' name=ID ('=' value=expression)? ';' #variableDeclaration + : 'int' ptr='*' name=ID ('=' value=expression)? ';' #variableDeclaration ; expression @@ -52,6 +52,8 @@ expression // | left=expression ',' right=expression #commaExpression | constant #constantExpression | target '=' expression #assignmentExpression + | '*' expression #dereferenceExpression + | '&' target #addressOfExpression | ID #variableExpression | ID '(' ( params+=expression (',' params+=expression )* )? ')' #callExpression |
