aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/generated
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-30 16:56:53 +0100
committerAleksey Kladov <[email protected]>2020-07-30 16:56:53 +0100
commit1766aae145c6925a33e427f2fe6ef2a56c301665 (patch)
treedfcf22990794a5990602a468b862d544fbe63f0a /crates/ra_syntax/src/ast/generated
parent609680ef97dbf82c07b6b06e21aa366423892304 (diff)
Rename EnumVariant -> Variant
Diffstat (limited to 'crates/ra_syntax/src/ast/generated')
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs30
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 {}
53impl ast::GenericParamsOwner for Enum {} 53impl ast::GenericParamsOwner for Enum {}
54impl Enum { 54impl 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)]
59pub struct ExternBlock { 59pub 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)]
430pub struct EnumVariantList { 430pub struct VariantList {
431 pub(crate) syntax: SyntaxNode, 431 pub(crate) syntax: SyntaxNode,
432} 432}
433impl EnumVariantList { 433impl 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)]
439pub struct EnumVariant { 439pub struct Variant {
440 pub(crate) syntax: SyntaxNode, 440 pub(crate) syntax: SyntaxNode,
441} 441}
442impl ast::AttrsOwner for EnumVariant {} 442impl ast::AttrsOwner for Variant {}
443impl ast::NameOwner for EnumVariant {} 443impl ast::NameOwner for Variant {}
444impl ast::VisibilityOwner for EnumVariant {} 444impl ast::VisibilityOwner for Variant {}
445impl EnumVariant { 445impl 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}
1809impl AstNode for EnumVariantList { 1809impl 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}
1820impl AstNode for EnumVariant { 1820impl 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}
3643impl std::fmt::Display for EnumVariantList { 3643impl 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}
3648impl std::fmt::Display for EnumVariant { 3648impl 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 }