From 4e8a3f565b5c48bb82051bdff4349786d8b716f5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 18 Feb 2019 10:09:44 +0300 Subject: handle != operator --- crates/ra_syntax/src/ast.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crates/ra_syntax/src') diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs index 350f01f33..62641c9fe 100644 --- a/crates/ra_syntax/src/ast.rs +++ b/crates/ra_syntax/src/ast.rs @@ -535,6 +535,8 @@ pub enum BinOp { BooleanAnd, /// The `==` operator for equality testing EqualityTest, + /// The `!=` operator for equality testing + NegatedEqualityTest, /// The `<=` operator for lesser-equal testing LesserEqualTest, /// The `>=` operator for greater-equal testing @@ -569,7 +571,7 @@ pub enum BinOp { RangeRightClosed, /// The `=` operator for assignment Assignment, - /// The `+=` operator for assignment after additon + /// The `+=` operator for assignment after addition AddAssign, /// The `/=` operator for assignment after division DivAssign, @@ -599,6 +601,7 @@ impl BinExpr { PIPEPIPE => Some(BinOp::BooleanOr), AMPAMP => Some(BinOp::BooleanAnd), EQEQ => Some(BinOp::EqualityTest), + NEQ => Some(BinOp::NegatedEqualityTest), LTEQ => Some(BinOp::LesserEqualTest), GTEQ => Some(BinOp::GreaterEqualTest), L_ANGLE => Some(BinOp::LesserTest), -- cgit v1.2.3