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

@ -656,7 +656,8 @@ impl SpannedExpression {
// Higher precedence binds tighter
match operator {
Operator::Multiply | Operator::Divide | Operator::Modulo => 100,
Operator::Pow => 100,
Operator::Multiply | Operator::Divide | Operator::Modulo => 95,
Operator::Plus | Operator::Minus => 90,
Operator::NotContains
| Operator::Contains
@ -848,6 +849,7 @@ pub enum Operator {
Modulo,
And,
Or,
Pow,
}
#[derive(Debug, Ord, PartialOrd, Eq, PartialEq, Clone, Hash, Deserialize, Serialize, new)]