aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/generated
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-31 19:09:09 +0100
committerAleksey Kladov <[email protected]>2020-07-31 19:12:10 +0100
commit98181087984157e27faba0b969e384f3c62c39d5 (patch)
tree0032223efeefca76340fb0a97f6f12d0e432a2a9 /crates/ra_syntax/src/ast/generated
parent6791eb9685375da94556bb910ea71f78b08be5ec (diff)
Rename BindPat -> IdentPat
Diffstat (limited to 'crates/ra_syntax/src/ast/generated')
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index f6b3fa6ef..231a0f727 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -1111,12 +1111,12 @@ impl TypeBound {
1111 pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) } 1111 pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1112} 1112}
1113#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1113#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1114pub struct BindPat { 1114pub struct IdentPat {
1115 pub(crate) syntax: SyntaxNode, 1115 pub(crate) syntax: SyntaxNode,
1116} 1116}
1117impl ast::AttrsOwner for BindPat {} 1117impl ast::AttrsOwner for IdentPat {}
1118impl ast::NameOwner for BindPat {} 1118impl ast::NameOwner for IdentPat {}
1119impl BindPat { 1119impl IdentPat {
1120 pub fn ref_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ref]) } 1120 pub fn ref_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ref]) }
1121 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } 1121 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1122 pub fn at_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![@]) } 1122 pub fn at_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![@]) }
@@ -1335,7 +1335,7 @@ pub enum Stmt {
1335} 1335}
1336#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1336#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1337pub enum Pat { 1337pub enum Pat {
1338 BindPat(BindPat), 1338 IdentPat(IdentPat),
1339 BoxPat(BoxPat), 1339 BoxPat(BoxPat),
1340 DotDotPat(DotDotPat), 1340 DotDotPat(DotDotPat),
1341 LiteralPat(LiteralPat), 1341 LiteralPat(LiteralPat),
@@ -2556,8 +2556,8 @@ impl AstNode for TypeBound {
2556 } 2556 }
2557 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2557 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2558} 2558}
2559impl AstNode for BindPat { 2559impl AstNode for IdentPat {
2560 fn can_cast(kind: SyntaxKind) -> bool { kind == BIND_PAT } 2560 fn can_cast(kind: SyntaxKind) -> bool { kind == IDENT_PAT }
2561 fn cast(syntax: SyntaxNode) -> Option<Self> { 2561 fn cast(syntax: SyntaxNode) -> Option<Self> {
2562 if Self::can_cast(syntax.kind()) { 2562 if Self::can_cast(syntax.kind()) {
2563 Some(Self { syntax }) 2563 Some(Self { syntax })
@@ -3136,8 +3136,8 @@ impl From<Item> for Stmt {
3136impl From<LetStmt> for Stmt { 3136impl From<LetStmt> for Stmt {
3137 fn from(node: LetStmt) -> Stmt { Stmt::LetStmt(node) } 3137 fn from(node: LetStmt) -> Stmt { Stmt::LetStmt(node) }
3138} 3138}
3139impl From<BindPat> for Pat { 3139impl From<IdentPat> for Pat {
3140 fn from(node: BindPat) -> Pat { Pat::BindPat(node) } 3140 fn from(node: IdentPat) -> Pat { Pat::IdentPat(node) }
3141} 3141}
3142impl From<BoxPat> for Pat { 3142impl From<BoxPat> for Pat {
3143 fn from(node: BoxPat) -> Pat { Pat::BoxPat(node) } 3143 fn from(node: BoxPat) -> Pat { Pat::BoxPat(node) }
@@ -3184,7 +3184,7 @@ impl From<TupleStructPat> for Pat {
3184impl AstNode for Pat { 3184impl AstNode for Pat {
3185 fn can_cast(kind: SyntaxKind) -> bool { 3185 fn can_cast(kind: SyntaxKind) -> bool {
3186 match kind { 3186 match kind {
3187 BIND_PAT | BOX_PAT | DOT_DOT_PAT | LITERAL_PAT | MACRO_PAT | OR_PAT | PAREN_PAT 3187 IDENT_PAT | BOX_PAT | DOT_DOT_PAT | LITERAL_PAT | MACRO_PAT | OR_PAT | PAREN_PAT
3188 | PATH_PAT | WILDCARD_PAT | RANGE_PAT | RECORD_PAT | REF_PAT | SLICE_PAT 3188 | PATH_PAT | WILDCARD_PAT | RANGE_PAT | RECORD_PAT | REF_PAT | SLICE_PAT
3189 | TUPLE_PAT | TUPLE_STRUCT_PAT => true, 3189 | TUPLE_PAT | TUPLE_STRUCT_PAT => true,
3190 _ => false, 3190 _ => false,
@@ -3192,7 +3192,7 @@ impl AstNode for Pat {
3192 } 3192 }
3193 fn cast(syntax: SyntaxNode) -> Option<Self> { 3193 fn cast(syntax: SyntaxNode) -> Option<Self> {
3194 let res = match syntax.kind() { 3194 let res = match syntax.kind() {
3195 BIND_PAT => Pat::BindPat(BindPat { syntax }), 3195 IDENT_PAT => Pat::IdentPat(IdentPat { syntax }),
3196 BOX_PAT => Pat::BoxPat(BoxPat { syntax }), 3196 BOX_PAT => Pat::BoxPat(BoxPat { syntax }),
3197 DOT_DOT_PAT => Pat::DotDotPat(DotDotPat { syntax }), 3197 DOT_DOT_PAT => Pat::DotDotPat(DotDotPat { syntax }),
3198 LITERAL_PAT => Pat::LiteralPat(LiteralPat { syntax }), 3198 LITERAL_PAT => Pat::LiteralPat(LiteralPat { syntax }),
@@ -3213,7 +3213,7 @@ impl AstNode for Pat {
3213 } 3213 }
3214 fn syntax(&self) -> &SyntaxNode { 3214 fn syntax(&self) -> &SyntaxNode {
3215 match self { 3215 match self {
3216 Pat::BindPat(it) => &it.syntax, 3216 Pat::IdentPat(it) => &it.syntax,
3217 Pat::BoxPat(it) => &it.syntax, 3217 Pat::BoxPat(it) => &it.syntax,
3218 Pat::DotDotPat(it) => &it.syntax, 3218 Pat::DotDotPat(it) => &it.syntax,
3219 Pat::LiteralPat(it) => &it.syntax, 3219 Pat::LiteralPat(it) => &it.syntax,
@@ -3981,7 +3981,7 @@ impl std::fmt::Display for TypeBound {
3981 std::fmt::Display::fmt(self.syntax(), f) 3981 std::fmt::Display::fmt(self.syntax(), f)
3982 } 3982 }
3983} 3983}
3984impl std::fmt::Display for BindPat { 3984impl std::fmt::Display for IdentPat {
3985 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 3985 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3986 std::fmt::Display::fmt(self.syntax(), f) 3986 std::fmt::Display::fmt(self.syntax(), f)
3987 } 3987 }