From 1766aae145c6925a33e427f2fe6ef2a56c301665 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 17:56:53 +0200 Subject: Rename EnumVariant -> Variant --- crates/ra_syntax/src/ast/generated/nodes.rs | 30 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'crates/ra_syntax/src/ast/generated') diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 1d1452546..6613b54ba 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs @@ -53,7 +53,7 @@ impl ast::VisibilityOwner for Enum {} impl ast::GenericParamsOwner for Enum {} impl Enum { pub fn enum_token(&self) -> Option { support::token(&self.syntax, T![enum]) } - pub fn variant_list(&self) -> Option { support::child(&self.syntax) } + pub fn variant_list(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ExternBlock { @@ -427,22 +427,22 @@ impl TupleField { pub fn type_ref(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct EnumVariantList { +pub struct VariantList { pub(crate) syntax: SyntaxNode, } -impl EnumVariantList { +impl VariantList { pub fn l_curly_token(&self) -> Option { support::token(&self.syntax, T!['{']) } - pub fn variants(&self) -> AstChildren { support::children(&self.syntax) } + pub fn variants(&self) -> AstChildren { support::children(&self.syntax) } pub fn r_curly_token(&self) -> Option { support::token(&self.syntax, T!['}']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct EnumVariant { +pub struct Variant { pub(crate) syntax: SyntaxNode, } -impl ast::AttrsOwner for EnumVariant {} -impl ast::NameOwner for EnumVariant {} -impl ast::VisibilityOwner for EnumVariant {} -impl EnumVariant { +impl ast::AttrsOwner for Variant {} +impl ast::NameOwner for Variant {} +impl ast::VisibilityOwner for Variant {} +impl Variant { pub fn field_list(&self) -> Option { support::child(&self.syntax) } pub fn eq_token(&self) -> Option { support::token(&self.syntax, T![=]) } pub fn expr(&self) -> Option { support::child(&self.syntax) } @@ -1806,8 +1806,8 @@ impl AstNode for TupleField { } fn syntax(&self) -> &SyntaxNode { &self.syntax } } -impl AstNode for EnumVariantList { - fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM_VARIANT_LIST } +impl AstNode for VariantList { + fn can_cast(kind: SyntaxKind) -> bool { kind == VARIANT_LIST } fn cast(syntax: SyntaxNode) -> Option { if Self::can_cast(syntax.kind()) { Some(Self { syntax }) @@ -1817,8 +1817,8 @@ impl AstNode for EnumVariantList { } fn syntax(&self) -> &SyntaxNode { &self.syntax } } -impl AstNode for EnumVariant { - fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM_VARIANT } +impl AstNode for Variant { + fn can_cast(kind: SyntaxKind) -> bool { kind == VARIANT } fn cast(syntax: SyntaxNode) -> Option { if Self::can_cast(syntax.kind()) { Some(Self { syntax }) @@ -3640,12 +3640,12 @@ impl std::fmt::Display for TupleField { std::fmt::Display::fmt(self.syntax(), f) } } -impl std::fmt::Display for EnumVariantList { +impl std::fmt::Display for VariantList { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { std::fmt::Display::fmt(self.syntax(), f) } } -impl std::fmt::Display for EnumVariant { +impl std::fmt::Display for Variant { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { std::fmt::Display::fmt(self.syntax(), f) } -- cgit v1.2.3