aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/ast/extensions.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast/extensions.rs b/crates/ra_syntax/src/ast/extensions.rs
index d9666cdca..b8043b726 100644
--- a/crates/ra_syntax/src/ast/extensions.rs
+++ b/crates/ra_syntax/src/ast/extensions.rs
@@ -234,6 +234,13 @@ impl ast::LetStmt {
234 Some(node) => node.kind() == T![;], 234 Some(node) => node.kind() == T![;],
235 } 235 }
236 } 236 }
237
238 pub fn eq_token(&self) -> Option<SyntaxToken> {
239 self.syntax()
240 .descendants_with_tokens()
241 .find(|t| t.kind() == EQ)
242 .and_then(|it| it.into_token())
243 }
237} 244}
238 245
239impl ast::ExprStmt { 246impl ast::ExprStmt {