aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-08-17 15:42:41 +0100
committerAleksey Kladov <[email protected]>2019-08-17 15:42:41 +0100
commit7e5a186c1fe585aac95019addc963bf74cb112ae (patch)
tree3ece58abec006c824f38e8470f67229bc7c6acdd /crates/ra_syntax/src
parent8919aa8065c31d55050a6bfe10b574fc71bcec09 (diff)
Introduce separate hir::BinaryOp
Unlike ast::BinOp, it has significantly more structure to it, so it's easier to, say, handle all assignment-like operations in the same way.
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/ast/expr_extensions.rs6
1 files changed, 0 insertions, 6 deletions
diff --git a/crates/ra_syntax/src/ast/expr_extensions.rs b/crates/ra_syntax/src/ast/expr_extensions.rs
index 20e390209..cf5b6f251 100644
--- a/crates/ra_syntax/src/ast/expr_extensions.rs
+++ b/crates/ra_syntax/src/ast/expr_extensions.rs
@@ -102,10 +102,6 @@ pub enum BinOp {
102 BitwiseOr, 102 BitwiseOr,
103 /// The `&` operator for bitwise AND 103 /// The `&` operator for bitwise AND
104 BitwiseAnd, 104 BitwiseAnd,
105 /// The `..` operator for right-open ranges
106 RangeRightOpen,
107 /// The `..=` operator for right-closed ranges
108 RangeRightClosed,
109 /// The `=` operator for assignment 105 /// The `=` operator for assignment
110 Assignment, 106 Assignment,
111 /// The `+=` operator for assignment after addition 107 /// The `+=` operator for assignment after addition
@@ -152,8 +148,6 @@ impl ast::BinExpr {
152 T![^] => BinOp::BitwiseXor, 148 T![^] => BinOp::BitwiseXor,
153 T![|] => BinOp::BitwiseOr, 149 T![|] => BinOp::BitwiseOr,
154 T![&] => BinOp::BitwiseAnd, 150 T![&] => BinOp::BitwiseAnd,
155 T![..] => BinOp::RangeRightOpen,
156 T![..=] => BinOp::RangeRightClosed,
157 T![=] => BinOp::Assignment, 151 T![=] => BinOp::Assignment,
158 T![+=] => BinOp::AddAssign, 152 T![+=] => BinOp::AddAssign,
159 T![/=] => BinOp::DivAssign, 153 T![/=] => BinOp::DivAssign,