diff options
Diffstat (limited to 'src/parser.mly')
-rw-r--r-- | src/parser.mly | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/parser.mly b/src/parser.mly index 0cf545d..2b50797 100644 --- a/src/parser.mly +++ b/src/parser.mly @@ -55,7 +55,6 @@ %left LT LE GT GE %left PLUS MINUS %left TIMES DIV MOD -%nonassoc LPAREN %start <Ast.program> prog @@ -245,7 +244,6 @@ expression: expression_desc: | e1 = expression ASSIGN e2 = expression { EAssign(e1, e2) } | a = expression b = binop c = expression { EBinary(a, b, c) } -| a = expression LPAREN arg = separated_list(COMMA, expression) RPAREN { ECall(a, arg) } | NEW c = TIDENT LPAREN args = separated_list(COMMA, expression) RPAREN { ENew(c, args) } ; @@ -282,6 +280,7 @@ primary_desc: { EMember( { e_loc = $startpos, $endpos; e_desc = EUnary(Deref, a)} , b) } +| a = primary LPAREN arg = separated_list(COMMA, expression) RPAREN { ECall(a, arg) } | a = primary DOT b = IDENT { EMember(a, b) } ; |