mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
More symbols
This commit is contained in:
parent
fe1fe866f3
commit
56aa6e20e0
7 changed files with 42 additions and 22 deletions
|
@ -180,3 +180,22 @@ impl<R: TreeRoot> AstNode<R> for Trait<R> {
|
|||
impl<R: TreeRoot> ast::NameOwner<R> for Trait<R> {}
|
||||
impl<R: TreeRoot> Trait<R> {}
|
||||
|
||||
// TypeItem
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct TypeItem<R: TreeRoot = Arc<SyntaxRoot>> {
|
||||
syntax: SyntaxNode<R>,
|
||||
}
|
||||
|
||||
impl<R: TreeRoot> AstNode<R> for TypeItem<R> {
|
||||
fn cast(syntax: SyntaxNode<R>) -> Option<Self> {
|
||||
match syntax.kind() {
|
||||
TYPE_ITEM => Some(TypeItem { syntax }),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
fn syntax(&self) -> &SyntaxNode<R> { &self.syntax }
|
||||
}
|
||||
|
||||
impl<R: TreeRoot> ast::NameOwner<R> for TypeItem<R> {}
|
||||
impl<R: TreeRoot> TypeItem<R> {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue