diff options
author | Aleksey Kladov <[email protected]> | 2020-07-30 16:56:53 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-30 16:56:53 +0100 |
commit | 1766aae145c6925a33e427f2fe6ef2a56c301665 (patch) | |
tree | dfcf22990794a5990602a468b862d544fbe63f0a /crates/ra_syntax/src/ast/generated | |
parent | 609680ef97dbf82c07b6b06e21aa366423892304 (diff) |
Rename EnumVariant -> Variant
Diffstat (limited to 'crates/ra_syntax/src/ast/generated')
-rw-r--r-- | crates/ra_syntax/src/ast/generated/nodes.rs | 30 |
1 files changed, 15 insertions, 15 deletions
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 {} | |||
53 | impl ast::GenericParamsOwner for Enum {} | 53 | impl ast::GenericParamsOwner for Enum {} |
54 | impl Enum { | 54 | impl Enum { |
55 | pub fn enum_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![enum]) } | 55 | pub fn enum_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![enum]) } |
56 | pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) } | 56 | pub fn variant_list(&self) -> Option<VariantList> { support::child(&self.syntax) } |
57 | } | 57 | } |
58 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 58 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
59 | pub struct ExternBlock { | 59 | pub struct ExternBlock { |
@@ -427,22 +427,22 @@ impl TupleField { | |||
427 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 427 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
428 | } | 428 | } |
429 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 429 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
430 | pub struct EnumVariantList { | 430 | pub struct VariantList { |
431 | pub(crate) syntax: SyntaxNode, | 431 | pub(crate) syntax: SyntaxNode, |
432 | } | 432 | } |
433 | impl EnumVariantList { | 433 | impl VariantList { |
434 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } | 434 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } |
435 | pub fn variants(&self) -> AstChildren<EnumVariant> { support::children(&self.syntax) } | 435 | pub fn variants(&self) -> AstChildren<Variant> { support::children(&self.syntax) } |
436 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } | 436 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } |
437 | } | 437 | } |
438 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 438 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
439 | pub struct EnumVariant { | 439 | pub struct Variant { |
440 | pub(crate) syntax: SyntaxNode, | 440 | pub(crate) syntax: SyntaxNode, |
441 | } | 441 | } |
442 | impl ast::AttrsOwner for EnumVariant {} | 442 | impl ast::AttrsOwner for Variant {} |
443 | impl ast::NameOwner for EnumVariant {} | 443 | impl ast::NameOwner for Variant {} |
444 | impl ast::VisibilityOwner for EnumVariant {} | 444 | impl ast::VisibilityOwner for Variant {} |
445 | impl EnumVariant { | 445 | impl Variant { |
446 | pub fn field_list(&self) -> Option<FieldList> { support::child(&self.syntax) } | 446 | pub fn field_list(&self) -> Option<FieldList> { support::child(&self.syntax) } |
447 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } | 447 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } |
448 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 448 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
@@ -1806,8 +1806,8 @@ impl AstNode for TupleField { | |||
1806 | } | 1806 | } |
1807 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1807 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1808 | } | 1808 | } |
1809 | impl AstNode for EnumVariantList { | 1809 | impl AstNode for VariantList { |
1810 | fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM_VARIANT_LIST } | 1810 | fn can_cast(kind: SyntaxKind) -> bool { kind == VARIANT_LIST } |
1811 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1811 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1812 | if Self::can_cast(syntax.kind()) { | 1812 | if Self::can_cast(syntax.kind()) { |
1813 | Some(Self { syntax }) | 1813 | Some(Self { syntax }) |
@@ -1817,8 +1817,8 @@ impl AstNode for EnumVariantList { | |||
1817 | } | 1817 | } |
1818 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1818 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1819 | } | 1819 | } |
1820 | impl AstNode for EnumVariant { | 1820 | impl AstNode for Variant { |
1821 | fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM_VARIANT } | 1821 | fn can_cast(kind: SyntaxKind) -> bool { kind == VARIANT } |
1822 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1822 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1823 | if Self::can_cast(syntax.kind()) { | 1823 | if Self::can_cast(syntax.kind()) { |
1824 | Some(Self { syntax }) | 1824 | Some(Self { syntax }) |
@@ -3640,12 +3640,12 @@ impl std::fmt::Display for TupleField { | |||
3640 | std::fmt::Display::fmt(self.syntax(), f) | 3640 | std::fmt::Display::fmt(self.syntax(), f) |
3641 | } | 3641 | } |
3642 | } | 3642 | } |
3643 | impl std::fmt::Display for EnumVariantList { | 3643 | impl std::fmt::Display for VariantList { |
3644 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3644 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3645 | std::fmt::Display::fmt(self.syntax(), f) | 3645 | std::fmt::Display::fmt(self.syntax(), f) |
3646 | } | 3646 | } |
3647 | } | 3647 | } |
3648 | impl std::fmt::Display for EnumVariant { | 3648 | impl std::fmt::Display for Variant { |
3649 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3649 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3650 | std::fmt::Display::fmt(self.syntax(), f) | 3650 | std::fmt::Display::fmt(self.syntax(), f) |
3651 | } | 3651 | } |