Fully get rid of SyntaxNodePtr::range

This commit is contained in:
Aleksey Kladov
2020-04-23 21:23:36 +02:00
parent 29bc218fba
commit 27dd0086ea
3 changed files with 40 additions and 24 deletions

View File

@@ -30,9 +30,9 @@ impl SyntaxNodePtr {
.unwrap_or_else(|| panic!("can't resolve local ptr to SyntaxNode: {:?}", self))
}
pub fn range(&self) -> TextRange {
self.range
}
// pub fn range(&self) -> TextRange {
// self.range
// }
pub fn cast<N: AstNode>(self) -> Option<AstPtr<N>> {
if !N::can_cast(self.kind) {