mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
added eq_token() method to LetStmt
This commit is contained in:
parent
514df15d9e
commit
f67ee69777
2 changed files with 8 additions and 2 deletions
|
@ -234,6 +234,13 @@ impl ast::LetStmt {
|
|||
Some(node) => node.kind() == T![;],
|
||||
}
|
||||
}
|
||||
|
||||
pub fn eq_token(&self) -> Option<SyntaxToken> {
|
||||
self.syntax()
|
||||
.descendants_with_tokens()
|
||||
.find(|t| t.kind() == EQ)
|
||||
.and_then(|it| it.into_token())
|
||||
}
|
||||
}
|
||||
|
||||
impl ast::ExprStmt {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue