mul, paren
This commit is contained in:
parent
ac0abb97c6
commit
abd15e19cb
1 changed files with 5 additions and 0 deletions
|
|
@ -80,6 +80,11 @@ expr:
|
|||
| expr PLUS expr { $$ = std::make_unique<BinOp>(
|
||||
BinaryOperator(BinaryOperator::ADD),
|
||||
std::move($1), std::move($3)); }
|
||||
| expr MULTIPLY expr { $$ = std::make_unique<BinOp>(
|
||||
BinaryOperator(BinaryOperator::MUL),
|
||||
std::move($1), std::move($3)); }
|
||||
| L_PAREN expr R_PAREN {$$ = std::move($2);}
|
||||
|
||||
;
|
||||
|
||||
%%
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue