mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
separete structure from symbols
This commit is contained in:
parent
49ab441024
commit
2b828c68e8
9 changed files with 131 additions and 39 deletions
|
@ -86,6 +86,24 @@ impl<R: TreeRoot> AstNode<R> for FnDef<R> {
|
|||
impl<R: TreeRoot> ast::NameOwner<R> for FnDef<R> {}
|
||||
impl<R: TreeRoot> FnDef<R> {}
|
||||
|
||||
// ImplItem
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct ImplItem<R: TreeRoot = Arc<SyntaxRoot>> {
|
||||
syntax: SyntaxNode<R>,
|
||||
}
|
||||
|
||||
impl<R: TreeRoot> AstNode<R> for ImplItem<R> {
|
||||
fn cast(syntax: SyntaxNode<R>) -> Option<Self> {
|
||||
match syntax.kind() {
|
||||
IMPL_ITEM => Some(ImplItem { syntax }),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
fn syntax(&self) -> &SyntaxNode<R> { &self.syntax }
|
||||
}
|
||||
|
||||
impl<R: TreeRoot> ImplItem<R> {}
|
||||
|
||||
// Module
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Module<R: TreeRoot = Arc<SyntaxRoot>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue