From 60f4d7bd8c0ecb9f23557464e824140a2be8f41a Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Fri, 3 Apr 2020 21:12:09 +0200 Subject: Provide more complete AST accessors to support usage in rustc --- crates/ra_syntax/src/ast/expr_extensions.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ra_syntax/src/ast/expr_extensions.rs') diff --git a/crates/ra_syntax/src/ast/expr_extensions.rs b/crates/ra_syntax/src/ast/expr_extensions.rs index 8bbd946c0..40c8fca3b 100644 --- a/crates/ra_syntax/src/ast/expr_extensions.rs +++ b/crates/ra_syntax/src/ast/expr_extensions.rs @@ -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 { + None // FIXME: implement &raw + } } #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] -- cgit v1.2.3