added pow operator, and filesize math (#2976)

* added pow operator, and filesize math

* removed + and - arms, removed some pow, pow higher precedence

* Update value.rs

Co-authored-by: Jonathan Turner <jonathandturner@users.noreply.github.com>
This commit is contained in:
Darren Schroeder
2021-01-29 07:44:02 -06:00
committed by GitHub
parent 47c4b8e88a
commit b052d524da
5 changed files with 45 additions and 5 deletions

View File

@ -25,6 +25,7 @@ pub fn apply_operator(
Operator::Plus => value::compute_values(op, left, right),
Operator::Minus => value::compute_values(op, left, right),
Operator::Multiply => value::compute_values(op, left, right),
Operator::Pow => value::compute_values(op, left, right),
Operator::Divide => value::compute_values(op, left, right).map(|res| match res {
UntaggedValue::Error(_) => UntaggedValue::Error(ShellError::labeled_error(
"Evaluation error",