Add modulo operator and simplify in/not-in (#2505)

This commit is contained in:
Jonathan Turner
2020-09-07 12:12:55 +12:00
committed by GitHub
parent c973850571
commit 986b427038
7 changed files with 35 additions and 6 deletions

View File

@ -575,7 +575,7 @@ impl SpannedExpression {
// Higher precedence binds tighter
match operator {
Operator::Multiply | Operator::Divide => 100,
Operator::Multiply | Operator::Divide | Operator::Modulo => 100,
Operator::Plus | Operator::Minus => 90,
Operator::NotContains
| Operator::Contains
@ -848,6 +848,7 @@ pub enum Operator {
Divide,
In,
NotIn,
Modulo,
And,
Or,
}