mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 20:07:42 +02:00
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:
@ -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)]
|
||||
|
Reference in New Issue
Block a user