mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-12-12 09:30:40 +01:00
Fixed multiplication with percent
This commit is contained in:
parent
e07c5e5339
commit
236d5842b9
@ -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