aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/ast/generated.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-14 09:20:09 +0100
committerAleksey Kladov <[email protected]>2018-08-14 09:20:09 +0100
commit2b828c68e8acda628d6e3a36827d1ffd9c9aaec6 (patch)
treee63ec3bb469eaaf996bbc45c038e66395c04ed23 /crates/libsyntax2/src/ast/generated.rs
parent49ab44102496ac8c4a05b00c584adecf583f4d87 (diff)
separete structure from symbols
Diffstat (limited to 'crates/libsyntax2/src/ast/generated.rs')
-rw-r--r--crates/libsyntax2/src/ast/generated.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/libsyntax2/src/ast/generated.rs b/crates/libsyntax2/src/ast/generated.rs
index b347a05b4..13668b803 100644
--- a/crates/libsyntax2/src/ast/generated.rs
+++ b/crates/libsyntax2/src/ast/generated.rs
@@ -86,6 +86,24 @@ impl<R: TreeRoot> AstNode<R> for FnDef<R> {
86impl<R: TreeRoot> ast::NameOwner<R> for FnDef<R> {} 86impl<R: TreeRoot> ast::NameOwner<R> for FnDef<R> {}
87impl<R: TreeRoot> FnDef<R> {} 87impl<R: TreeRoot> FnDef<R> {}
88 88
89// ImplItem
90#[derive(Debug, Clone, Copy)]
91pub struct ImplItem<R: TreeRoot = Arc<SyntaxRoot>> {
92 syntax: SyntaxNode<R>,
93}
94
95impl<R: TreeRoot> AstNode<R> for ImplItem<R> {
96 fn cast(syntax: SyntaxNode<R>) -> Option<Self> {
97 match syntax.kind() {
98 IMPL_ITEM => Some(ImplItem { syntax }),
99 _ => None,
100 }
101 }
102 fn syntax(&self) -> &SyntaxNode<R> { &self.syntax }
103}
104
105impl<R: TreeRoot> ImplItem<R> {}
106
89// Module 107// Module
90#[derive(Debug, Clone, Copy)] 108#[derive(Debug, Clone, Copy)]
91pub struct Module<R: TreeRoot = Arc<SyntaxRoot>> { 109pub struct Module<R: TreeRoot = Arc<SyntaxRoot>> {