mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-12-13 18:10:42 +01:00
Fixed multiplication with percent
This commit is contained in:
parent
1f6b59bdae
commit
904c603d38
@ -143,10 +143,9 @@ fn eval_binary_expr(
|
||||
let left = eval_expr(context, left_expr, "")?;
|
||||
let mut right = eval_expr(context, right_expr, "")?;
|
||||
if let Expr::Unary(TokenKind::Percent, _) = right_expr {
|
||||
right = right.mul(context, left.clone());
|
||||
if let TokenKind::Star = op {
|
||||
right = right.mul(context, KalkNum::from(0.01));
|
||||
} else {
|
||||
right = right.mul(context, left.clone());
|
||||
return Ok(right);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user