aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/generated
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/ast/generated')
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs46
1 files changed, 12 insertions, 34 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index 214e12918..fae76a7a8 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -58,9 +58,7 @@ impl FnDef {
58 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } 58 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
59 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } 59 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
60 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } 60 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
61 pub fn semicolon_token(&self) -> Option<SyntaxToken> { 61 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) }
62 support::token2(&self.syntax, T ! [ ; ])
63 }
64} 62}
65#[derive(Debug, Clone, PartialEq, Eq, Hash)] 63#[derive(Debug, Clone, PartialEq, Eq, Hash)]
66pub struct RetType { 64pub struct RetType {
@@ -78,7 +76,7 @@ impl AstNode for RetType {
78 fn syntax(&self) -> &SyntaxNode { &self.syntax } 76 fn syntax(&self) -> &SyntaxNode { &self.syntax }
79} 77}
80impl RetType { 78impl RetType {
81 pub fn thin_arrow_token(&self) -> Option<ThinArrow> { support::token(&self.syntax) } 79 pub fn thin_arrow_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![->]) }
82 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 80 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
83} 81}
84#[derive(Debug, Clone, PartialEq, Eq, Hash)] 82#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -104,9 +102,7 @@ impl ast::DocCommentsOwner for StructDef {}
104impl StructDef { 102impl StructDef {
105 pub fn struct_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![struct]) } 103 pub fn struct_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![struct]) }
106 pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) } 104 pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) }
107 pub fn semicolon_token(&self) -> Option<SyntaxToken> { 105 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) }
108 support::token2(&self.syntax, T ! [ ; ])
109 }
110} 106}
111#[derive(Debug, Clone, PartialEq, Eq, Hash)] 107#[derive(Debug, Clone, PartialEq, Eq, Hash)]
112pub struct UnionDef { 108pub struct UnionDef {
@@ -332,9 +328,7 @@ impl ast::DocCommentsOwner for Module {}
332impl Module { 328impl Module {
333 pub fn mod_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mod]) } 329 pub fn mod_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mod]) }
334 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } 330 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
335 pub fn semicolon_token(&self) -> Option<SyntaxToken> { 331 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) }
336 support::token2(&self.syntax, T ! [ ; ])
337 }
338} 332}
339#[derive(Debug, Clone, PartialEq, Eq, Hash)] 333#[derive(Debug, Clone, PartialEq, Eq, Hash)]
340pub struct ItemList { 334pub struct ItemList {
@@ -385,9 +379,7 @@ impl ConstDef {
385 pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) } 379 pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) }
386 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } 380 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
387 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } 381 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
388 pub fn semicolon_token(&self) -> Option<SyntaxToken> { 382 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) }
389 support::token2(&self.syntax, T ! [ ; ])
390 }
391} 383}
392#[derive(Debug, Clone, PartialEq, Eq, Hash)] 384#[derive(Debug, Clone, PartialEq, Eq, Hash)]
393pub struct StaticDef { 385pub struct StaticDef {
@@ -415,9 +407,7 @@ impl StaticDef {
415 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } 407 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) }
416 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } 408 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
417 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } 409 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
418 pub fn semicolon_token(&self) -> Option<SyntaxToken> { 410 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) }
419 support::token2(&self.syntax, T ! [ ; ])
420 }
421} 411}
422#[derive(Debug, Clone, PartialEq, Eq, Hash)] 412#[derive(Debug, Clone, PartialEq, Eq, Hash)]
423pub struct TypeAliasDef { 413pub struct TypeAliasDef {
@@ -447,9 +437,7 @@ impl TypeAliasDef {
447 pub fn type_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![type]) } 437 pub fn type_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![type]) }
448 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } 438 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
449 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 439 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
450 pub fn semicolon_token(&self) -> Option<SyntaxToken> { 440 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) }
451 support::token2(&self.syntax, T ! [ ; ])
452 }
453} 441}
454#[derive(Debug, Clone, PartialEq, Eq, Hash)] 442#[derive(Debug, Clone, PartialEq, Eq, Hash)]
455pub struct ImplDef { 443pub struct ImplDef {
@@ -594,9 +582,7 @@ impl AstNode for ArrayType {
594impl ArrayType { 582impl ArrayType {
595 pub fn l_brack_token(&self) -> Option<LBrack> { support::token(&self.syntax) } 583 pub fn l_brack_token(&self) -> Option<LBrack> { support::token(&self.syntax) }
596 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 584 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
597 pub fn semicolon_token(&self) -> Option<SyntaxToken> { 585 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) }
598 support::token2(&self.syntax, T ! [ ; ])
599 }
600 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 586 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
601 pub fn r_brack_token(&self) -> Option<RBrack> { support::token(&self.syntax) } 587 pub fn r_brack_token(&self) -> Option<RBrack> { support::token(&self.syntax) }
602} 588}
@@ -779,9 +765,7 @@ impl ast::AttrsOwner for ArrayExpr {}
779impl ArrayExpr { 765impl ArrayExpr {
780 pub fn l_brack_token(&self) -> Option<LBrack> { support::token(&self.syntax) } 766 pub fn l_brack_token(&self) -> Option<LBrack> { support::token(&self.syntax) }
781 pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) } 767 pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
782 pub fn semicolon_token(&self) -> Option<SyntaxToken> { 768 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) }
783 support::token2(&self.syntax, T ! [ ; ])
784 }
785 pub fn r_brack_token(&self) -> Option<RBrack> { support::token(&self.syntax) } 769 pub fn r_brack_token(&self) -> Option<RBrack> { support::token(&self.syntax) }
786} 770}
787#[derive(Debug, Clone, PartialEq, Eq, Hash)] 771#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1875,9 +1859,7 @@ impl MacroCall {
1875 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 1859 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1876 pub fn excl_token(&self) -> Option<Excl> { support::token(&self.syntax) } 1860 pub fn excl_token(&self) -> Option<Excl> { support::token(&self.syntax) }
1877 pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) } 1861 pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
1878 pub fn semicolon_token(&self) -> Option<SyntaxToken> { 1862 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) }
1879 support::token2(&self.syntax, T ! [ ; ])
1880 }
1881} 1863}
1882#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1864#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1883pub struct Attr { 1865pub struct Attr {
@@ -2118,9 +2100,7 @@ impl AstNode for ExprStmt {
2118impl ast::AttrsOwner for ExprStmt {} 2100impl ast::AttrsOwner for ExprStmt {}
2119impl ExprStmt { 2101impl ExprStmt {
2120 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 2102 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2121 pub fn semicolon_token(&self) -> Option<SyntaxToken> { 2103 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) }
2122 support::token2(&self.syntax, T ! [ ; ])
2123 }
2124} 2104}
2125#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2105#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2126pub struct LetStmt { 2106pub struct LetStmt {
@@ -2144,9 +2124,7 @@ impl LetStmt {
2144 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 2124 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
2145 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } 2125 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
2146 pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) } 2126 pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) }
2147 pub fn semicolon_token(&self) -> Option<SyntaxToken> { 2127 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) }
2148 support::token2(&self.syntax, T ! [ ; ])
2149 }
2150} 2128}
2151#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2129#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2152pub struct Condition { 2130pub struct Condition {