From 56aa6e20e0279c69e0130905573b1607056cfaf9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 11 Aug 2018 16:20:37 +0300 Subject: More symbols --- crates/libsyntax2/src/ast/generated.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'crates/libsyntax2/src/ast') diff --git a/crates/libsyntax2/src/ast/generated.rs b/crates/libsyntax2/src/ast/generated.rs index a4b116941..31f5ecc44 100644 --- a/crates/libsyntax2/src/ast/generated.rs +++ b/crates/libsyntax2/src/ast/generated.rs @@ -180,3 +180,22 @@ impl AstNode for Trait { impl ast::NameOwner for Trait {} impl Trait {} +// TypeItem +#[derive(Debug, Clone, Copy)] +pub struct TypeItem> { + syntax: SyntaxNode, +} + +impl AstNode for TypeItem { + fn cast(syntax: SyntaxNode) -> Option { + match syntax.kind() { + TYPE_ITEM => Some(TypeItem { syntax }), + _ => None, + } + } + fn syntax(&self) -> &SyntaxNode { &self.syntax } +} + +impl ast::NameOwner for TypeItem {} +impl TypeItem {} + -- cgit v1.2.3