diff options
Diffstat (limited to 'crates/libsyntax2/src/ast/generated.rs')
-rw-r--r-- | crates/libsyntax2/src/ast/generated.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/libsyntax2/src/ast/generated.rs b/crates/libsyntax2/src/ast/generated.rs index 31f5ecc44..b1fd0a8ad 100644 --- a/crates/libsyntax2/src/ast/generated.rs +++ b/crates/libsyntax2/src/ast/generated.rs | |||
@@ -123,6 +123,24 @@ impl<R: TreeRoot> AstNode<R> for Name<R> { | |||
123 | 123 | ||
124 | impl<R: TreeRoot> Name<R> {} | 124 | impl<R: TreeRoot> Name<R> {} |
125 | 125 | ||
126 | // NameRef | ||
127 | #[derive(Debug, Clone, Copy)] | ||
128 | pub struct NameRef<R: TreeRoot = Arc<SyntaxRoot>> { | ||
129 | syntax: SyntaxNode<R>, | ||
130 | } | ||
131 | |||
132 | impl<R: TreeRoot> AstNode<R> for NameRef<R> { | ||
133 | fn cast(syntax: SyntaxNode<R>) -> Option<Self> { | ||
134 | match syntax.kind() { | ||
135 | NAME_REF => Some(NameRef { syntax }), | ||
136 | _ => None, | ||
137 | } | ||
138 | } | ||
139 | fn syntax(&self) -> &SyntaxNode<R> { &self.syntax } | ||
140 | } | ||
141 | |||
142 | impl<R: TreeRoot> NameRef<R> {} | ||
143 | |||
126 | // StaticItem | 144 | // StaticItem |
127 | #[derive(Debug, Clone, Copy)] | 145 | #[derive(Debug, Clone, Copy)] |
128 | pub struct StaticItem<R: TreeRoot = Arc<SyntaxRoot>> { | 146 | pub struct StaticItem<R: TreeRoot = Arc<SyntaxRoot>> { |