(&self)
| 130 | |
| 131 | impl BinOp { |
| 132 | pub fn precedence(&self) -> u8 { |
| 133 | match self { |
| 134 | Self::Pow => 6, |
| 135 | Self::Mul | Self::Div | Self::Mod => 5, |
| 136 | Self::Add | Self::Sub => 4, |
| 137 | Self::Eq | Self::Neq | Self::Lt | Self::Gt | Self::Lte | Self::Gte => 3, |
| 138 | Self::And | Self::Unless => 2, |
| 139 | Self::Or => 1, |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | pub fn is_comparison(&self) -> bool { |
| 144 | matches!( |