Provide more complete AST accessors to support usage in rustc

This commit is contained in:
Luca Barbieri 2020-04-03 21:12:09 +02:00 committed by Aleksey Kladov
parent 8595693287
commit 60f4d7bd8c
18 changed files with 433 additions and 211 deletions

View file

@ -52,6 +52,10 @@ impl ast::RefExpr {
pub fn is_mut(&self) -> bool {
self.syntax().children_with_tokens().any(|n| n.kind() == T![mut])
}
pub fn raw_token(&self) -> Option<SyntaxToken> {
None // FIXME: implement &raw
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]