1
0
mirror of https://github.com/PaddiM8/kalker.git synced 2025-07-06 01:10:10 +02:00

fixed multiplication with percent

This commit is contained in:
PaddiM8
2020-12-10 09:27:19 +01:00
parent 0251c1ae9a
commit fefacbc02c

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