From 120b6f7043937cb1b72f2d52f6cb97fb5d0e3fc6 Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Mon, 20 Oct 2025 11:54:48 +1300 Subject: Add three-letter aliases for the equal and bitwise-or operations Every other operation has a three-letter name, so this change makes the operation names more consistent. --- src/types/operator.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/types/operator.rs b/src/types/operator.rs index e94c67d..77403d7 100644 --- a/src/types/operator.rs +++ b/src/types/operator.rs @@ -32,6 +32,7 @@ impl Operator { "=" => Some(Operator::Equal), "==" => Some(Operator::Equal), "" => Some(Operator::Equal), + "" => Some(Operator::Equal), "!=" => Some(Operator::NotEqual), "" => Some(Operator::NotEqual), "<" => Some(Operator::LessThan), @@ -59,6 +60,7 @@ impl Operator { "" => Some(Operator::RightShift), "" => Some(Operator::BitAnd), "" => Some(Operator::BitOr), + "" => Some(Operator::BitOr), "" => Some(Operator::BitXor), "" => Some(Operator::BitNot), "" => Some(Operator::Length), @@ -75,7 +77,7 @@ impl Operator { impl std::fmt::Display for Operator { fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { let string = match self { - Operator::Equal => "", + Operator::Equal => "", Operator::NotEqual => "", Operator::LessThan => "", Operator::GreaterThan => "", @@ -90,7 +92,7 @@ impl std::fmt::Display for Operator { Operator::LeftShift => "", Operator::RightShift => "", Operator::BitAnd => "", - Operator::BitOr => "", + Operator::BitOr => "", Operator::BitXor => "", Operator::BitNot => "", Operator::Length => "", -- cgit v1.2.3-70-g09d2