diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-10-05 17:19:48 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-10-05 17:19:48 +0200 |
| commit | 4b2c6334d02d1574aaaef09ddf2c1501075b11fb (patch) | |
| tree | 87ff7e81e9990680e48606c10ad9ecab5e852b40 /src/syntax | |
| parent | c25c6a35b274f227e46c774f53f1cb424d1f3b91 (diff) | |
Change precedence of range expression
Diffstat (limited to 'src/syntax')
| -rw-r--r-- | src/syntax/expr.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/syntax/expr.rs b/src/syntax/expr.rs index 68b96f9c..887de826 100644 --- a/src/syntax/expr.rs +++ b/src/syntax/expr.rs @@ -229,7 +229,7 @@ impl UnOp { pub fn precedence(self) -> usize { match self { Self::Pos | Self::Neg => 8, - Self::Not => 4, + Self::Not => 3, } } @@ -328,10 +328,10 @@ impl BinOp { match self { Self::Mul | Self::Div => 7, Self::Add | Self::Sub => 6, - Self::Eq | Self::Neq | Self::Lt | Self::Leq | Self::Gt | Self::Geq => 5, - Self::And => 4, - Self::Or => 3, - Self::Range => 2, + Self::Range => 5, + Self::Eq | Self::Neq | Self::Lt | Self::Leq | Self::Gt | Self::Geq => 4, + Self::And => 3, + Self::Or => 2, Self::Assign | Self::AddAssign | Self::SubAssign |
