mul, paren

This commit is contained in:
bronku 2025-11-28 09:51:25 +01:00
parent ac0abb97c6
commit abd15e19cb

View file

@ -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);}
;
%%