fixed multiplication with percent

This commit is contained in:
PaddiM8 2020-12-10 09:27:19 +01:00
parent aa2831818b
commit e0384d3653

View File

@ -132,7 +132,11 @@ fn eval_binary_expr(
};
if let Expr::Unary(TokenKind::Percent, _) = right_expr {
right *= left.clone();
if let TokenKind::Star = op {
right *= 0.01;
} else {
right *= left.clone();
}
}
Ok((