Return true if the operator is a logic operator. For example, 'Binary(Binary(a, >, b), AND, Binary(a, <, b + 3))' would be a logical expression.
(&self)
| 239 | /// For example, 'Binary(Binary(a, >, b), AND, Binary(a, <, b + 3))' would |
| 240 | /// be a logical expression. |
| 241 | pub fn is_logic_operator(&self) -> bool { |
| 242 | matches!(self, Operator::And | Operator::Or) |
| 243 | } |
| 244 | |
| 245 | /// Return the operator where swapping lhs and rhs wouldn't change the result. |
| 246 | /// |