added eq_token() method to LetStmt

This commit is contained in:
TomasKralCZ 2020-01-19 18:55:56 +01:00
parent 514df15d9e
commit f67ee69777
2 changed files with 8 additions and 2 deletions

View file

@ -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 {