Stupid goto definition

This commit is contained in:
Aleksey Kladov
2018-08-13 16:35:17 +03:00
parent 7fc91f41d8
commit 8ae56fa6d0
9 changed files with 109 additions and 14 deletions

View File

@@ -73,3 +73,11 @@ impl<R: TreeRoot> Name<R> {
ident.leaf_text().unwrap()
}
}
impl<R: TreeRoot> NameRef<R> {
pub fn text(&self) -> SmolStr {
let ident = self.syntax().first_child()
.unwrap();
ident.leaf_text().unwrap()
}
}