diff options
Diffstat (limited to 'modelica-parser-lalrpop/src/parser.lalrpop')
-rw-r--r-- | modelica-parser-lalrpop/src/parser.lalrpop | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modelica-parser-lalrpop/src/parser.lalrpop b/modelica-parser-lalrpop/src/parser.lalrpop index cb59a82..2d2469c 100644 --- a/modelica-parser-lalrpop/src/parser.lalrpop +++ b/modelica-parser-lalrpop/src/parser.lalrpop @@ -161,7 +161,8 @@ factor: Expr = { <lhs:factor> "/" <rhs:term> => Expr::BinExpr(BinOperator::Divide, Box::new(lhs), Box::new(rhs)), <lhs:factor> "^" <rhs:term> => - Expr::BinExpr(BinOperator::Divide, Box::new(lhs), Box::new(rhs)), + Expr::BinExpr(BinOperator::Exponentiate, Box::new(lhs), Box::new(rhs)), + // TODO: this could be a "negate" unary op? "-" <t:term> => Expr::BinExpr(BinOperator::Multiply, Box::new(Expr::Integer(-1)), Box::new(t)), term, |