aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/generated/nodes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/ast/generated/nodes.rs')
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs376
1 files changed, 184 insertions, 192 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index d67d733b1..65b87bb6e 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -47,17 +47,15 @@ impl ast::DocCommentsOwner for FnDef {}
47impl ast::AttrsOwner for FnDef {} 47impl ast::AttrsOwner for FnDef {}
48impl FnDef { 48impl FnDef {
49 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) } 49 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
50 pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) } 50 pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
51 pub fn default_token(&self) -> Option<SyntaxToken> { 51 pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
52 support::token2(&self.syntax, T![default]) 52 pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
53 } 53 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
54 pub fn async_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![async]) } 54 pub fn fn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![fn]) }
55 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![unsafe]) }
56 pub fn fn_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![fn]) }
57 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } 55 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
58 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } 56 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
59 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } 57 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
60 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) } 58 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
61} 59}
62#[derive(Debug, Clone, PartialEq, Eq, Hash)] 60#[derive(Debug, Clone, PartialEq, Eq, Hash)]
63pub struct RetType { 61pub struct RetType {
@@ -75,7 +73,7 @@ impl AstNode for RetType {
75 fn syntax(&self) -> &SyntaxNode { &self.syntax } 73 fn syntax(&self) -> &SyntaxNode { &self.syntax }
76} 74}
77impl RetType { 75impl RetType {
78 pub fn thin_arrow_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![->]) } 76 pub fn thin_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![->]) }
79 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 77 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
80} 78}
81#[derive(Debug, Clone, PartialEq, Eq, Hash)] 79#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -99,9 +97,9 @@ impl ast::TypeParamsOwner for StructDef {}
99impl ast::AttrsOwner for StructDef {} 97impl ast::AttrsOwner for StructDef {}
100impl ast::DocCommentsOwner for StructDef {} 98impl ast::DocCommentsOwner for StructDef {}
101impl StructDef { 99impl StructDef {
102 pub fn struct_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![struct]) } 100 pub fn struct_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![struct]) }
103 pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) } 101 pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) }
104 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) } 102 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
105} 103}
106#[derive(Debug, Clone, PartialEq, Eq, Hash)] 104#[derive(Debug, Clone, PartialEq, Eq, Hash)]
107pub struct UnionDef { 105pub struct UnionDef {
@@ -124,7 +122,7 @@ impl ast::TypeParamsOwner for UnionDef {}
124impl ast::AttrsOwner for UnionDef {} 122impl ast::AttrsOwner for UnionDef {}
125impl ast::DocCommentsOwner for UnionDef {} 123impl ast::DocCommentsOwner for UnionDef {}
126impl UnionDef { 124impl UnionDef {
127 pub fn union_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![union]) } 125 pub fn union_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![union]) }
128 pub fn record_field_def_list(&self) -> Option<RecordFieldDefList> { 126 pub fn record_field_def_list(&self) -> Option<RecordFieldDefList> {
129 support::child(&self.syntax) 127 support::child(&self.syntax)
130 } 128 }
@@ -145,9 +143,9 @@ impl AstNode for RecordFieldDefList {
145 fn syntax(&self) -> &SyntaxNode { &self.syntax } 143 fn syntax(&self) -> &SyntaxNode { &self.syntax }
146} 144}
147impl RecordFieldDefList { 145impl RecordFieldDefList {
148 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['{']) } 146 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
149 pub fn fields(&self) -> AstChildren<RecordFieldDef> { support::children(&self.syntax) } 147 pub fn fields(&self) -> AstChildren<RecordFieldDef> { support::children(&self.syntax) }
150 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['}']) } 148 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
151} 149}
152#[derive(Debug, Clone, PartialEq, Eq, Hash)] 150#[derive(Debug, Clone, PartialEq, Eq, Hash)]
153pub struct RecordFieldDef { 151pub struct RecordFieldDef {
@@ -186,9 +184,9 @@ impl AstNode for TupleFieldDefList {
186 fn syntax(&self) -> &SyntaxNode { &self.syntax } 184 fn syntax(&self) -> &SyntaxNode { &self.syntax }
187} 185}
188impl TupleFieldDefList { 186impl TupleFieldDefList {
189 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['(']) } 187 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
190 pub fn fields(&self) -> AstChildren<TupleFieldDef> { support::children(&self.syntax) } 188 pub fn fields(&self) -> AstChildren<TupleFieldDef> { support::children(&self.syntax) }
191 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![')']) } 189 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
192} 190}
193#[derive(Debug, Clone, PartialEq, Eq, Hash)] 191#[derive(Debug, Clone, PartialEq, Eq, Hash)]
194pub struct TupleFieldDef { 192pub struct TupleFieldDef {
@@ -231,7 +229,7 @@ impl ast::TypeParamsOwner for EnumDef {}
231impl ast::AttrsOwner for EnumDef {} 229impl ast::AttrsOwner for EnumDef {}
232impl ast::DocCommentsOwner for EnumDef {} 230impl ast::DocCommentsOwner for EnumDef {}
233impl EnumDef { 231impl EnumDef {
234 pub fn enum_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![enum]) } 232 pub fn enum_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![enum]) }
235 pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) } 233 pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) }
236} 234}
237#[derive(Debug, Clone, PartialEq, Eq, Hash)] 235#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -250,9 +248,9 @@ impl AstNode for EnumVariantList {
250 fn syntax(&self) -> &SyntaxNode { &self.syntax } 248 fn syntax(&self) -> &SyntaxNode { &self.syntax }
251} 249}
252impl EnumVariantList { 250impl EnumVariantList {
253 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['{']) } 251 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
254 pub fn variants(&self) -> AstChildren<EnumVariant> { support::children(&self.syntax) } 252 pub fn variants(&self) -> AstChildren<EnumVariant> { support::children(&self.syntax) }
255 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['}']) } 253 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
256} 254}
257#[derive(Debug, Clone, PartialEq, Eq, Hash)] 255#[derive(Debug, Clone, PartialEq, Eq, Hash)]
258pub struct EnumVariant { 256pub struct EnumVariant {
@@ -275,7 +273,7 @@ impl ast::DocCommentsOwner for EnumVariant {}
275impl ast::AttrsOwner for EnumVariant {} 273impl ast::AttrsOwner for EnumVariant {}
276impl EnumVariant { 274impl EnumVariant {
277 pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) } 275 pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) }
278 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![=]) } 276 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
279 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 277 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
280} 278}
281#[derive(Debug, Clone, PartialEq, Eq, Hash)] 279#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -300,9 +298,9 @@ impl ast::DocCommentsOwner for TraitDef {}
300impl ast::TypeParamsOwner for TraitDef {} 298impl ast::TypeParamsOwner for TraitDef {}
301impl ast::TypeBoundsOwner for TraitDef {} 299impl ast::TypeBoundsOwner for TraitDef {}
302impl TraitDef { 300impl TraitDef {
303 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![unsafe]) } 301 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
304 pub fn auto_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![auto]) } 302 pub fn auto_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![auto]) }
305 pub fn trait_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![trait]) } 303 pub fn trait_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![trait]) }
306 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } 304 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
307} 305}
308#[derive(Debug, Clone, PartialEq, Eq, Hash)] 306#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -325,9 +323,9 @@ impl ast::NameOwner for Module {}
325impl ast::AttrsOwner for Module {} 323impl ast::AttrsOwner for Module {}
326impl ast::DocCommentsOwner for Module {} 324impl ast::DocCommentsOwner for Module {}
327impl Module { 325impl Module {
328 pub fn mod_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mod]) } 326 pub fn mod_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mod]) }
329 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } 327 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
330 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) } 328 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
331} 329}
332#[derive(Debug, Clone, PartialEq, Eq, Hash)] 330#[derive(Debug, Clone, PartialEq, Eq, Hash)]
333pub struct ItemList { 331pub struct ItemList {
@@ -346,9 +344,9 @@ impl AstNode for ItemList {
346} 344}
347impl ast::ModuleItemOwner for ItemList {} 345impl ast::ModuleItemOwner for ItemList {}
348impl ItemList { 346impl ItemList {
349 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['{']) } 347 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
350 pub fn impl_items(&self) -> AstChildren<ImplItem> { support::children(&self.syntax) } 348 pub fn impl_items(&self) -> AstChildren<ImplItem> { support::children(&self.syntax) }
351 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['}']) } 349 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
352} 350}
353#[derive(Debug, Clone, PartialEq, Eq, Hash)] 351#[derive(Debug, Clone, PartialEq, Eq, Hash)]
354pub struct ConstDef { 352pub struct ConstDef {
@@ -372,13 +370,11 @@ impl ast::AttrsOwner for ConstDef {}
372impl ast::DocCommentsOwner for ConstDef {} 370impl ast::DocCommentsOwner for ConstDef {}
373impl ast::TypeAscriptionOwner for ConstDef {} 371impl ast::TypeAscriptionOwner for ConstDef {}
374impl ConstDef { 372impl ConstDef {
375 pub fn default_token(&self) -> Option<SyntaxToken> { 373 pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
376 support::token2(&self.syntax, T![default]) 374 pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
377 } 375 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
378 pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) }
379 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![=]) }
380 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } 376 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
381 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) } 377 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
382} 378}
383#[derive(Debug, Clone, PartialEq, Eq, Hash)] 379#[derive(Debug, Clone, PartialEq, Eq, Hash)]
384pub struct StaticDef { 380pub struct StaticDef {
@@ -402,11 +398,11 @@ impl ast::AttrsOwner for StaticDef {}
402impl ast::DocCommentsOwner for StaticDef {} 398impl ast::DocCommentsOwner for StaticDef {}
403impl ast::TypeAscriptionOwner for StaticDef {} 399impl ast::TypeAscriptionOwner for StaticDef {}
404impl StaticDef { 400impl StaticDef {
405 pub fn static_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![static]) } 401 pub fn static_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![static]) }
406 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } 402 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
407 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![=]) } 403 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
408 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } 404 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
409 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) } 405 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
410} 406}
411#[derive(Debug, Clone, PartialEq, Eq, Hash)] 407#[derive(Debug, Clone, PartialEq, Eq, Hash)]
412pub struct TypeAliasDef { 408pub struct TypeAliasDef {
@@ -430,13 +426,11 @@ impl ast::AttrsOwner for TypeAliasDef {}
430impl ast::DocCommentsOwner for TypeAliasDef {} 426impl ast::DocCommentsOwner for TypeAliasDef {}
431impl ast::TypeBoundsOwner for TypeAliasDef {} 427impl ast::TypeBoundsOwner for TypeAliasDef {}
432impl TypeAliasDef { 428impl TypeAliasDef {
433 pub fn default_token(&self) -> Option<SyntaxToken> { 429 pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
434 support::token2(&self.syntax, T![default]) 430 pub fn type_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![type]) }
435 } 431 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
436 pub fn type_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![type]) }
437 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![=]) }
438 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 432 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
439 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) } 433 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
440} 434}
441#[derive(Debug, Clone, PartialEq, Eq, Hash)] 435#[derive(Debug, Clone, PartialEq, Eq, Hash)]
442pub struct ImplDef { 436pub struct ImplDef {
@@ -456,14 +450,12 @@ impl AstNode for ImplDef {
456impl ast::TypeParamsOwner for ImplDef {} 450impl ast::TypeParamsOwner for ImplDef {}
457impl ast::AttrsOwner for ImplDef {} 451impl ast::AttrsOwner for ImplDef {}
458impl ImplDef { 452impl ImplDef {
459 pub fn default_token(&self) -> Option<SyntaxToken> { 453 pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
460 support::token2(&self.syntax, T![default]) 454 pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
461 } 455 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
462 pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) } 456 pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) }
463 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![unsafe]) } 457 pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
464 pub fn impl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![impl]) } 458 pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
465 pub fn excl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![!]) }
466 pub fn for_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![for]) }
467 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } 459 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
468} 460}
469#[derive(Debug, Clone, PartialEq, Eq, Hash)] 461#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -482,9 +474,9 @@ impl AstNode for ParenType {
482 fn syntax(&self) -> &SyntaxNode { &self.syntax } 474 fn syntax(&self) -> &SyntaxNode { &self.syntax }
483} 475}
484impl ParenType { 476impl ParenType {
485 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['(']) } 477 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
486 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 478 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
487 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![')']) } 479 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
488} 480}
489#[derive(Debug, Clone, PartialEq, Eq, Hash)] 481#[derive(Debug, Clone, PartialEq, Eq, Hash)]
490pub struct TupleType { 482pub struct TupleType {
@@ -502,9 +494,9 @@ impl AstNode for TupleType {
502 fn syntax(&self) -> &SyntaxNode { &self.syntax } 494 fn syntax(&self) -> &SyntaxNode { &self.syntax }
503} 495}
504impl TupleType { 496impl TupleType {
505 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['(']) } 497 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
506 pub fn fields(&self) -> AstChildren<TypeRef> { support::children(&self.syntax) } 498 pub fn fields(&self) -> AstChildren<TypeRef> { support::children(&self.syntax) }
507 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![')']) } 499 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
508} 500}
509#[derive(Debug, Clone, PartialEq, Eq, Hash)] 501#[derive(Debug, Clone, PartialEq, Eq, Hash)]
510pub struct NeverType { 502pub struct NeverType {
@@ -522,7 +514,7 @@ impl AstNode for NeverType {
522 fn syntax(&self) -> &SyntaxNode { &self.syntax } 514 fn syntax(&self) -> &SyntaxNode { &self.syntax }
523} 515}
524impl NeverType { 516impl NeverType {
525 pub fn excl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![!]) } 517 pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
526} 518}
527#[derive(Debug, Clone, PartialEq, Eq, Hash)] 519#[derive(Debug, Clone, PartialEq, Eq, Hash)]
528pub struct PathType { 520pub struct PathType {
@@ -558,9 +550,9 @@ impl AstNode for PointerType {
558 fn syntax(&self) -> &SyntaxNode { &self.syntax } 550 fn syntax(&self) -> &SyntaxNode { &self.syntax }
559} 551}
560impl PointerType { 552impl PointerType {
561 pub fn star_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![*]) } 553 pub fn star_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![*]) }
562 pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) } 554 pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
563 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } 555 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
564 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 556 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
565} 557}
566#[derive(Debug, Clone, PartialEq, Eq, Hash)] 558#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -579,11 +571,11 @@ impl AstNode for ArrayType {
579 fn syntax(&self) -> &SyntaxNode { &self.syntax } 571 fn syntax(&self) -> &SyntaxNode { &self.syntax }
580} 572}
581impl ArrayType { 573impl ArrayType {
582 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['[']) } 574 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
583 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 575 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
584 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) } 576 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
585 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 577 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
586 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![']']) } 578 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
587} 579}
588#[derive(Debug, Clone, PartialEq, Eq, Hash)] 580#[derive(Debug, Clone, PartialEq, Eq, Hash)]
589pub struct SliceType { 581pub struct SliceType {
@@ -601,9 +593,9 @@ impl AstNode for SliceType {
601 fn syntax(&self) -> &SyntaxNode { &self.syntax } 593 fn syntax(&self) -> &SyntaxNode { &self.syntax }
602} 594}
603impl SliceType { 595impl SliceType {
604 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['[']) } 596 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
605 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 597 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
606 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![']']) } 598 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
607} 599}
608#[derive(Debug, Clone, PartialEq, Eq, Hash)] 600#[derive(Debug, Clone, PartialEq, Eq, Hash)]
609pub struct ReferenceType { 601pub struct ReferenceType {
@@ -621,11 +613,11 @@ impl AstNode for ReferenceType {
621 fn syntax(&self) -> &SyntaxNode { &self.syntax } 613 fn syntax(&self) -> &SyntaxNode { &self.syntax }
622} 614}
623impl ReferenceType { 615impl ReferenceType {
624 pub fn amp_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![&]) } 616 pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
625 pub fn lifetime_token(&self) -> Option<SyntaxToken> { 617 pub fn lifetime_token(&self) -> Option<SyntaxToken> {
626 support::token2(&self.syntax, T![lifetime]) 618 support::token(&self.syntax, T![lifetime])
627 } 619 }
628 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } 620 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
629 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 621 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
630} 622}
631#[derive(Debug, Clone, PartialEq, Eq, Hash)] 623#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -644,7 +636,7 @@ impl AstNode for PlaceholderType {
644 fn syntax(&self) -> &SyntaxNode { &self.syntax } 636 fn syntax(&self) -> &SyntaxNode { &self.syntax }
645} 637}
646impl PlaceholderType { 638impl PlaceholderType {
647 pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![_]) } 639 pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
648} 640}
649#[derive(Debug, Clone, PartialEq, Eq, Hash)] 641#[derive(Debug, Clone, PartialEq, Eq, Hash)]
650pub struct FnPointerType { 642pub struct FnPointerType {
@@ -663,8 +655,8 @@ impl AstNode for FnPointerType {
663} 655}
664impl FnPointerType { 656impl FnPointerType {
665 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) } 657 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
666 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![unsafe]) } 658 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
667 pub fn fn_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![fn]) } 659 pub fn fn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![fn]) }
668 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } 660 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
669 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } 661 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
670} 662}
@@ -684,7 +676,7 @@ impl AstNode for ForType {
684 fn syntax(&self) -> &SyntaxNode { &self.syntax } 676 fn syntax(&self) -> &SyntaxNode { &self.syntax }
685} 677}
686impl ForType { 678impl ForType {
687 pub fn for_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![for]) } 679 pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
688 pub fn type_param_list(&self) -> Option<TypeParamList> { support::child(&self.syntax) } 680 pub fn type_param_list(&self) -> Option<TypeParamList> { support::child(&self.syntax) }
689 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 681 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
690} 682}
@@ -705,7 +697,7 @@ impl AstNode for ImplTraitType {
705} 697}
706impl ast::TypeBoundsOwner for ImplTraitType {} 698impl ast::TypeBoundsOwner for ImplTraitType {}
707impl ImplTraitType { 699impl ImplTraitType {
708 pub fn impl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![impl]) } 700 pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) }
709} 701}
710#[derive(Debug, Clone, PartialEq, Eq, Hash)] 702#[derive(Debug, Clone, PartialEq, Eq, Hash)]
711pub struct DynTraitType { 703pub struct DynTraitType {
@@ -724,7 +716,7 @@ impl AstNode for DynTraitType {
724} 716}
725impl ast::TypeBoundsOwner for DynTraitType {} 717impl ast::TypeBoundsOwner for DynTraitType {}
726impl DynTraitType { 718impl DynTraitType {
727 pub fn dyn_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![dyn]) } 719 pub fn dyn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![dyn]) }
728} 720}
729#[derive(Debug, Clone, PartialEq, Eq, Hash)] 721#[derive(Debug, Clone, PartialEq, Eq, Hash)]
730pub struct TupleExpr { 722pub struct TupleExpr {
@@ -743,9 +735,9 @@ impl AstNode for TupleExpr {
743} 735}
744impl ast::AttrsOwner for TupleExpr {} 736impl ast::AttrsOwner for TupleExpr {}
745impl TupleExpr { 737impl TupleExpr {
746 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['(']) } 738 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
747 pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) } 739 pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
748 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![')']) } 740 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
749} 741}
750#[derive(Debug, Clone, PartialEq, Eq, Hash)] 742#[derive(Debug, Clone, PartialEq, Eq, Hash)]
751pub struct ArrayExpr { 743pub struct ArrayExpr {
@@ -764,10 +756,10 @@ impl AstNode for ArrayExpr {
764} 756}
765impl ast::AttrsOwner for ArrayExpr {} 757impl ast::AttrsOwner for ArrayExpr {}
766impl ArrayExpr { 758impl ArrayExpr {
767 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['[']) } 759 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
768 pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) } 760 pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
769 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) } 761 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
770 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![']']) } 762 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
771} 763}
772#[derive(Debug, Clone, PartialEq, Eq, Hash)] 764#[derive(Debug, Clone, PartialEq, Eq, Hash)]
773pub struct ParenExpr { 765pub struct ParenExpr {
@@ -786,9 +778,9 @@ impl AstNode for ParenExpr {
786} 778}
787impl ast::AttrsOwner for ParenExpr {} 779impl ast::AttrsOwner for ParenExpr {}
788impl ParenExpr { 780impl ParenExpr {
789 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['(']) } 781 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
790 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 782 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
791 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![')']) } 783 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
792} 784}
793#[derive(Debug, Clone, PartialEq, Eq, Hash)] 785#[derive(Debug, Clone, PartialEq, Eq, Hash)]
794pub struct PathExpr { 786pub struct PathExpr {
@@ -825,9 +817,9 @@ impl AstNode for LambdaExpr {
825} 817}
826impl ast::AttrsOwner for LambdaExpr {} 818impl ast::AttrsOwner for LambdaExpr {}
827impl LambdaExpr { 819impl LambdaExpr {
828 pub fn static_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![static]) } 820 pub fn static_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![static]) }
829 pub fn async_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![async]) } 821 pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
830 pub fn move_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![move]) } 822 pub fn move_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![move]) }
831 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } 823 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
832 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } 824 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
833 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } 825 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
@@ -849,7 +841,7 @@ impl AstNode for IfExpr {
849} 841}
850impl ast::AttrsOwner for IfExpr {} 842impl ast::AttrsOwner for IfExpr {}
851impl IfExpr { 843impl IfExpr {
852 pub fn if_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![if]) } 844 pub fn if_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![if]) }
853 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) } 845 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) }
854} 846}
855#[derive(Debug, Clone, PartialEq, Eq, Hash)] 847#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -870,7 +862,7 @@ impl AstNode for LoopExpr {
870impl ast::AttrsOwner for LoopExpr {} 862impl ast::AttrsOwner for LoopExpr {}
871impl ast::LoopBodyOwner for LoopExpr {} 863impl ast::LoopBodyOwner for LoopExpr {}
872impl LoopExpr { 864impl LoopExpr {
873 pub fn loop_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![loop]) } 865 pub fn loop_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![loop]) }
874} 866}
875#[derive(Debug, Clone, PartialEq, Eq, Hash)] 867#[derive(Debug, Clone, PartialEq, Eq, Hash)]
876pub struct TryBlockExpr { 868pub struct TryBlockExpr {
@@ -889,7 +881,7 @@ impl AstNode for TryBlockExpr {
889} 881}
890impl ast::AttrsOwner for TryBlockExpr {} 882impl ast::AttrsOwner for TryBlockExpr {}
891impl TryBlockExpr { 883impl TryBlockExpr {
892 pub fn try_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![try]) } 884 pub fn try_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![try]) }
893 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } 885 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
894} 886}
895#[derive(Debug, Clone, PartialEq, Eq, Hash)] 887#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -910,9 +902,9 @@ impl AstNode for ForExpr {
910impl ast::AttrsOwner for ForExpr {} 902impl ast::AttrsOwner for ForExpr {}
911impl ast::LoopBodyOwner for ForExpr {} 903impl ast::LoopBodyOwner for ForExpr {}
912impl ForExpr { 904impl ForExpr {
913 pub fn for_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![for]) } 905 pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
914 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 906 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
915 pub fn in_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![in]) } 907 pub fn in_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![in]) }
916 pub fn iterable(&self) -> Option<Expr> { support::child(&self.syntax) } 908 pub fn iterable(&self) -> Option<Expr> { support::child(&self.syntax) }
917} 909}
918#[derive(Debug, Clone, PartialEq, Eq, Hash)] 910#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -933,7 +925,7 @@ impl AstNode for WhileExpr {
933impl ast::AttrsOwner for WhileExpr {} 925impl ast::AttrsOwner for WhileExpr {}
934impl ast::LoopBodyOwner for WhileExpr {} 926impl ast::LoopBodyOwner for WhileExpr {}
935impl WhileExpr { 927impl WhileExpr {
936 pub fn while_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![while]) } 928 pub fn while_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![while]) }
937 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) } 929 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) }
938} 930}
939#[derive(Debug, Clone, PartialEq, Eq, Hash)] 931#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -954,10 +946,10 @@ impl AstNode for ContinueExpr {
954impl ast::AttrsOwner for ContinueExpr {} 946impl ast::AttrsOwner for ContinueExpr {}
955impl ContinueExpr { 947impl ContinueExpr {
956 pub fn continue_token(&self) -> Option<SyntaxToken> { 948 pub fn continue_token(&self) -> Option<SyntaxToken> {
957 support::token2(&self.syntax, T![continue]) 949 support::token(&self.syntax, T![continue])
958 } 950 }
959 pub fn lifetime_token(&self) -> Option<SyntaxToken> { 951 pub fn lifetime_token(&self) -> Option<SyntaxToken> {
960 support::token2(&self.syntax, T![lifetime]) 952 support::token(&self.syntax, T![lifetime])
961 } 953 }
962} 954}
963#[derive(Debug, Clone, PartialEq, Eq, Hash)] 955#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -977,9 +969,9 @@ impl AstNode for BreakExpr {
977} 969}
978impl ast::AttrsOwner for BreakExpr {} 970impl ast::AttrsOwner for BreakExpr {}
979impl BreakExpr { 971impl BreakExpr {
980 pub fn break_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![break]) } 972 pub fn break_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![break]) }
981 pub fn lifetime_token(&self) -> Option<SyntaxToken> { 973 pub fn lifetime_token(&self) -> Option<SyntaxToken> {
982 support::token2(&self.syntax, T![lifetime]) 974 support::token(&self.syntax, T![lifetime])
983 } 975 }
984 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 976 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
985} 977}
@@ -1000,7 +992,7 @@ impl AstNode for Label {
1000} 992}
1001impl Label { 993impl Label {
1002 pub fn lifetime_token(&self) -> Option<SyntaxToken> { 994 pub fn lifetime_token(&self) -> Option<SyntaxToken> {
1003 support::token2(&self.syntax, T![lifetime]) 995 support::token(&self.syntax, T![lifetime])
1004 } 996 }
1005} 997}
1006#[derive(Debug, Clone, PartialEq, Eq, Hash)] 998#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1021,7 +1013,7 @@ impl AstNode for BlockExpr {
1021impl ast::AttrsOwner for BlockExpr {} 1013impl ast::AttrsOwner for BlockExpr {}
1022impl BlockExpr { 1014impl BlockExpr {
1023 pub fn label(&self) -> Option<Label> { support::child(&self.syntax) } 1015 pub fn label(&self) -> Option<Label> { support::child(&self.syntax) }
1024 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![unsafe]) } 1016 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
1025 pub fn block(&self) -> Option<Block> { support::child(&self.syntax) } 1017 pub fn block(&self) -> Option<Block> { support::child(&self.syntax) }
1026} 1018}
1027#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1019#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1081,7 +1073,7 @@ impl ast::AttrsOwner for MethodCallExpr {}
1081impl ast::ArgListOwner for MethodCallExpr {} 1073impl ast::ArgListOwner for MethodCallExpr {}
1082impl MethodCallExpr { 1074impl MethodCallExpr {
1083 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1075 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1084 pub fn dot_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![.]) } 1076 pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
1085 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 1077 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1086 pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) } 1078 pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) }
1087} 1079}
@@ -1102,8 +1094,8 @@ impl AstNode for IndexExpr {
1102} 1094}
1103impl ast::AttrsOwner for IndexExpr {} 1095impl ast::AttrsOwner for IndexExpr {}
1104impl IndexExpr { 1096impl IndexExpr {
1105 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['[']) } 1097 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
1106 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![']']) } 1098 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1107} 1099}
1108#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1100#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1109pub struct FieldExpr { 1101pub struct FieldExpr {
@@ -1123,7 +1115,7 @@ impl AstNode for FieldExpr {
1123impl ast::AttrsOwner for FieldExpr {} 1115impl ast::AttrsOwner for FieldExpr {}
1124impl FieldExpr { 1116impl FieldExpr {
1125 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1117 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1126 pub fn dot_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![.]) } 1118 pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
1127 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 1119 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1128} 1120}
1129#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1121#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1144,8 +1136,8 @@ impl AstNode for AwaitExpr {
1144impl ast::AttrsOwner for AwaitExpr {} 1136impl ast::AttrsOwner for AwaitExpr {}
1145impl AwaitExpr { 1137impl AwaitExpr {
1146 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1138 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1147 pub fn dot_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![.]) } 1139 pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
1148 pub fn await_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![await]) } 1140 pub fn await_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![await]) }
1149} 1141}
1150#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1142#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1151pub struct TryExpr { 1143pub struct TryExpr {
@@ -1164,7 +1156,7 @@ impl AstNode for TryExpr {
1164} 1156}
1165impl ast::AttrsOwner for TryExpr {} 1157impl ast::AttrsOwner for TryExpr {}
1166impl TryExpr { 1158impl TryExpr {
1167 pub fn try_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![try]) } 1159 pub fn try_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![try]) }
1168 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1160 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1169} 1161}
1170#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1162#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1185,7 +1177,7 @@ impl AstNode for CastExpr {
1185impl ast::AttrsOwner for CastExpr {} 1177impl ast::AttrsOwner for CastExpr {}
1186impl CastExpr { 1178impl CastExpr {
1187 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1179 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1188 pub fn as_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![as]) } 1180 pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) }
1189 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 1181 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
1190} 1182}
1191#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1183#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1205,9 +1197,9 @@ impl AstNode for RefExpr {
1205} 1197}
1206impl ast::AttrsOwner for RefExpr {} 1198impl ast::AttrsOwner for RefExpr {}
1207impl RefExpr { 1199impl RefExpr {
1208 pub fn amp_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![&]) } 1200 pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
1209 pub fn raw_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![raw]) } 1201 pub fn raw_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![raw]) }
1210 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } 1202 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1211 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1203 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1212} 1204}
1213#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1205#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1246,7 +1238,7 @@ impl AstNode for BoxExpr {
1246} 1238}
1247impl ast::AttrsOwner for BoxExpr {} 1239impl ast::AttrsOwner for BoxExpr {}
1248impl BoxExpr { 1240impl BoxExpr {
1249 pub fn box_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![box]) } 1241 pub fn box_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![box]) }
1250 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1242 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1251} 1243}
1252#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1244#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1316,7 +1308,7 @@ impl AstNode for MatchExpr {
1316} 1308}
1317impl ast::AttrsOwner for MatchExpr {} 1309impl ast::AttrsOwner for MatchExpr {}
1318impl MatchExpr { 1310impl MatchExpr {
1319 pub fn match_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![match]) } 1311 pub fn match_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![match]) }
1320 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1312 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1321 pub fn match_arm_list(&self) -> Option<MatchArmList> { support::child(&self.syntax) } 1313 pub fn match_arm_list(&self) -> Option<MatchArmList> { support::child(&self.syntax) }
1322} 1314}
@@ -1337,9 +1329,9 @@ impl AstNode for MatchArmList {
1337} 1329}
1338impl ast::AttrsOwner for MatchArmList {} 1330impl ast::AttrsOwner for MatchArmList {}
1339impl MatchArmList { 1331impl MatchArmList {
1340 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['{']) } 1332 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1341 pub fn arms(&self) -> AstChildren<MatchArm> { support::children(&self.syntax) } 1333 pub fn arms(&self) -> AstChildren<MatchArm> { support::children(&self.syntax) }
1342 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['}']) } 1334 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1343} 1335}
1344#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1336#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1345pub struct MatchArm { 1337pub struct MatchArm {
@@ -1360,7 +1352,7 @@ impl ast::AttrsOwner for MatchArm {}
1360impl MatchArm { 1352impl MatchArm {
1361 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1353 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1362 pub fn guard(&self) -> Option<MatchGuard> { support::child(&self.syntax) } 1354 pub fn guard(&self) -> Option<MatchGuard> { support::child(&self.syntax) }
1363 pub fn fat_arrow_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![=>]) } 1355 pub fn fat_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=>]) }
1364 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1356 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1365} 1357}
1366#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1358#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1379,7 +1371,7 @@ impl AstNode for MatchGuard {
1379 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1371 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1380} 1372}
1381impl MatchGuard { 1373impl MatchGuard {
1382 pub fn if_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![if]) } 1374 pub fn if_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![if]) }
1383 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1375 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1384} 1376}
1385#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1377#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1417,11 +1409,11 @@ impl AstNode for RecordFieldList {
1417 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1409 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1418} 1410}
1419impl RecordFieldList { 1411impl RecordFieldList {
1420 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['{']) } 1412 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1421 pub fn fields(&self) -> AstChildren<RecordField> { support::children(&self.syntax) } 1413 pub fn fields(&self) -> AstChildren<RecordField> { support::children(&self.syntax) }
1422 pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![..]) } 1414 pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
1423 pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) } 1415 pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) }
1424 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['}']) } 1416 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1425} 1417}
1426#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1418#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1427pub struct RecordField { 1419pub struct RecordField {
@@ -1441,7 +1433,7 @@ impl AstNode for RecordField {
1441impl ast::AttrsOwner for RecordField {} 1433impl ast::AttrsOwner for RecordField {}
1442impl RecordField { 1434impl RecordField {
1443 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 1435 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1444 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![:]) } 1436 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1445 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1437 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1446} 1438}
1447#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1439#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1478,9 +1470,9 @@ impl AstNode for ParenPat {
1478 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1470 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1479} 1471}
1480impl ParenPat { 1472impl ParenPat {
1481 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['(']) } 1473 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1482 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1474 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1483 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![')']) } 1475 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1484} 1476}
1485#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1477#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1486pub struct RefPat { 1478pub struct RefPat {
@@ -1498,8 +1490,8 @@ impl AstNode for RefPat {
1498 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1490 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1499} 1491}
1500impl RefPat { 1492impl RefPat {
1501 pub fn amp_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![&]) } 1493 pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
1502 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } 1494 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1503 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1495 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1504} 1496}
1505#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1497#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1518,7 +1510,7 @@ impl AstNode for BoxPat {
1518 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1510 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1519} 1511}
1520impl BoxPat { 1512impl BoxPat {
1521 pub fn box_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![box]) } 1513 pub fn box_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![box]) }
1522 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1514 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1523} 1515}
1524#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1516#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1539,9 +1531,9 @@ impl AstNode for BindPat {
1539impl ast::AttrsOwner for BindPat {} 1531impl ast::AttrsOwner for BindPat {}
1540impl ast::NameOwner for BindPat {} 1532impl ast::NameOwner for BindPat {}
1541impl BindPat { 1533impl BindPat {
1542 pub fn ref_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![ref]) } 1534 pub fn ref_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ref]) }
1543 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } 1535 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1544 pub fn at_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![@]) } 1536 pub fn at_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![@]) }
1545 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1537 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1546} 1538}
1547#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1539#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1560,7 +1552,7 @@ impl AstNode for PlaceholderPat {
1560 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1552 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1561} 1553}
1562impl PlaceholderPat { 1554impl PlaceholderPat {
1563 pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![_]) } 1555 pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
1564} 1556}
1565#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1557#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1566pub struct DotDotPat { 1558pub struct DotDotPat {
@@ -1578,7 +1570,7 @@ impl AstNode for DotDotPat {
1578 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1570 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1579} 1571}
1580impl DotDotPat { 1572impl DotDotPat {
1581 pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![..]) } 1573 pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
1582} 1574}
1583#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1575#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1584pub struct PathPat { 1576pub struct PathPat {
@@ -1614,9 +1606,9 @@ impl AstNode for SlicePat {
1614 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1606 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1615} 1607}
1616impl SlicePat { 1608impl SlicePat {
1617 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['[']) } 1609 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
1618 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) } 1610 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1619 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![']']) } 1611 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1620} 1612}
1621#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1613#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1622pub struct RangePat { 1614pub struct RangePat {
@@ -1707,14 +1699,14 @@ impl AstNode for RecordFieldPatList {
1707 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1699 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1708} 1700}
1709impl RecordFieldPatList { 1701impl RecordFieldPatList {
1710 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['{']) } 1702 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1711 pub fn pats(&self) -> AstChildren<RecordInnerPat> { support::children(&self.syntax) } 1703 pub fn pats(&self) -> AstChildren<RecordInnerPat> { support::children(&self.syntax) }
1712 pub fn record_field_pats(&self) -> AstChildren<RecordFieldPat> { 1704 pub fn record_field_pats(&self) -> AstChildren<RecordFieldPat> {
1713 support::children(&self.syntax) 1705 support::children(&self.syntax)
1714 } 1706 }
1715 pub fn bind_pats(&self) -> AstChildren<BindPat> { support::children(&self.syntax) } 1707 pub fn bind_pats(&self) -> AstChildren<BindPat> { support::children(&self.syntax) }
1716 pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![..]) } 1708 pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
1717 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['}']) } 1709 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1718} 1710}
1719#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1711#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1720pub struct RecordFieldPat { 1712pub struct RecordFieldPat {
@@ -1734,7 +1726,7 @@ impl AstNode for RecordFieldPat {
1734impl ast::AttrsOwner for RecordFieldPat {} 1726impl ast::AttrsOwner for RecordFieldPat {}
1735impl ast::NameOwner for RecordFieldPat {} 1727impl ast::NameOwner for RecordFieldPat {}
1736impl RecordFieldPat { 1728impl RecordFieldPat {
1737 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![:]) } 1729 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1738 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1730 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1739} 1731}
1740#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1732#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1754,9 +1746,9 @@ impl AstNode for TupleStructPat {
1754} 1746}
1755impl TupleStructPat { 1747impl TupleStructPat {
1756 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 1748 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1757 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['(']) } 1749 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1758 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) } 1750 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1759 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![')']) } 1751 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1760} 1752}
1761#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1753#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1762pub struct TuplePat { 1754pub struct TuplePat {
@@ -1774,9 +1766,9 @@ impl AstNode for TuplePat {
1774 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1766 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1775} 1767}
1776impl TuplePat { 1768impl TuplePat {
1777 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['(']) } 1769 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1778 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) } 1770 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1779 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![')']) } 1771 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1780} 1772}
1781#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1773#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1782pub struct Visibility { 1774pub struct Visibility {
@@ -1794,10 +1786,10 @@ impl AstNode for Visibility {
1794 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1786 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1795} 1787}
1796impl Visibility { 1788impl Visibility {
1797 pub fn pub_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![pub]) } 1789 pub fn pub_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![pub]) }
1798 pub fn super_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![super]) } 1790 pub fn super_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![super]) }
1799 pub fn self_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![self]) } 1791 pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) }
1800 pub fn crate_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![crate]) } 1792 pub fn crate_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![crate]) }
1801} 1793}
1802#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1794#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1803pub struct Name { 1795pub struct Name {
@@ -1815,7 +1807,7 @@ impl AstNode for Name {
1815 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1807 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1816} 1808}
1817impl Name { 1809impl Name {
1818 pub fn ident_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![ident]) } 1810 pub fn ident_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ident]) }
1819} 1811}
1820#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1812#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1821pub struct NameRef { 1813pub struct NameRef {
@@ -1853,9 +1845,9 @@ impl ast::AttrsOwner for MacroCall {}
1853impl ast::DocCommentsOwner for MacroCall {} 1845impl ast::DocCommentsOwner for MacroCall {}
1854impl MacroCall { 1846impl MacroCall {
1855 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 1847 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1856 pub fn excl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![!]) } 1848 pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
1857 pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) } 1849 pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
1858 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) } 1850 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1859} 1851}
1860#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1852#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1861pub struct Attr { 1853pub struct Attr {
@@ -1873,13 +1865,13 @@ impl AstNode for Attr {
1873 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1865 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1874} 1866}
1875impl Attr { 1867impl Attr {
1876 pub fn pound_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![#]) } 1868 pub fn pound_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![#]) }
1877 pub fn excl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![!]) } 1869 pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
1878 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['[']) } 1870 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
1879 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 1871 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1880 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![=]) } 1872 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1881 pub fn input(&self) -> Option<AttrInput> { support::child(&self.syntax) } 1873 pub fn input(&self) -> Option<AttrInput> { support::child(&self.syntax) }
1882 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![']']) } 1874 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1883} 1875}
1884#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1876#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1885pub struct TokenTree { 1877pub struct TokenTree {
@@ -1913,12 +1905,12 @@ impl AstNode for TypeParamList {
1913 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1905 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1914} 1906}
1915impl TypeParamList { 1907impl TypeParamList {
1916 pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![<]) } 1908 pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
1917 pub fn generic_params(&self) -> AstChildren<GenericParam> { support::children(&self.syntax) } 1909 pub fn generic_params(&self) -> AstChildren<GenericParam> { support::children(&self.syntax) }
1918 pub fn type_params(&self) -> AstChildren<TypeParam> { support::children(&self.syntax) } 1910 pub fn type_params(&self) -> AstChildren<TypeParam> { support::children(&self.syntax) }
1919 pub fn lifetime_params(&self) -> AstChildren<LifetimeParam> { support::children(&self.syntax) } 1911 pub fn lifetime_params(&self) -> AstChildren<LifetimeParam> { support::children(&self.syntax) }
1920 pub fn const_params(&self) -> AstChildren<ConstParam> { support::children(&self.syntax) } 1912 pub fn const_params(&self) -> AstChildren<ConstParam> { support::children(&self.syntax) }
1921 pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![>]) } 1913 pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
1922} 1914}
1923#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1915#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1924pub struct TypeParam { 1916pub struct TypeParam {
@@ -1939,7 +1931,7 @@ impl ast::NameOwner for TypeParam {}
1939impl ast::AttrsOwner for TypeParam {} 1931impl ast::AttrsOwner for TypeParam {}
1940impl ast::TypeBoundsOwner for TypeParam {} 1932impl ast::TypeBoundsOwner for TypeParam {}
1941impl TypeParam { 1933impl TypeParam {
1942 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![=]) } 1934 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1943 pub fn default_type(&self) -> Option<TypeRef> { support::child(&self.syntax) } 1935 pub fn default_type(&self) -> Option<TypeRef> { support::child(&self.syntax) }
1944} 1936}
1945#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1937#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1961,7 +1953,7 @@ impl ast::NameOwner for ConstParam {}
1961impl ast::AttrsOwner for ConstParam {} 1953impl ast::AttrsOwner for ConstParam {}
1962impl ast::TypeAscriptionOwner for ConstParam {} 1954impl ast::TypeAscriptionOwner for ConstParam {}
1963impl ConstParam { 1955impl ConstParam {
1964 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![=]) } 1956 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1965 pub fn default_val(&self) -> Option<Expr> { support::child(&self.syntax) } 1957 pub fn default_val(&self) -> Option<Expr> { support::child(&self.syntax) }
1966} 1958}
1967#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1959#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1982,7 +1974,7 @@ impl AstNode for LifetimeParam {
1982impl ast::AttrsOwner for LifetimeParam {} 1974impl ast::AttrsOwner for LifetimeParam {}
1983impl LifetimeParam { 1975impl LifetimeParam {
1984 pub fn lifetime_token(&self) -> Option<SyntaxToken> { 1976 pub fn lifetime_token(&self) -> Option<SyntaxToken> {
1985 support::token2(&self.syntax, T![lifetime]) 1977 support::token(&self.syntax, T![lifetime])
1986 } 1978 }
1987} 1979}
1988#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1980#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2002,9 +1994,9 @@ impl AstNode for TypeBound {
2002} 1994}
2003impl TypeBound { 1995impl TypeBound {
2004 pub fn lifetime_token(&self) -> Option<SyntaxToken> { 1996 pub fn lifetime_token(&self) -> Option<SyntaxToken> {
2005 support::token2(&self.syntax, T![lifetime]) 1997 support::token(&self.syntax, T![lifetime])
2006 } 1998 }
2007 pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) } 1999 pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
2008 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 2000 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
2009} 2001}
2010#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2002#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2043,7 +2035,7 @@ impl AstNode for WherePred {
2043impl ast::TypeBoundsOwner for WherePred {} 2035impl ast::TypeBoundsOwner for WherePred {}
2044impl WherePred { 2036impl WherePred {
2045 pub fn lifetime_token(&self) -> Option<SyntaxToken> { 2037 pub fn lifetime_token(&self) -> Option<SyntaxToken> {
2046 support::token2(&self.syntax, T![lifetime]) 2038 support::token(&self.syntax, T![lifetime])
2047 } 2039 }
2048 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 2040 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
2049} 2041}
@@ -2063,7 +2055,7 @@ impl AstNode for WhereClause {
2063 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2055 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2064} 2056}
2065impl WhereClause { 2057impl WhereClause {
2066 pub fn where_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![where]) } 2058 pub fn where_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![where]) }
2067 pub fn predicates(&self) -> AstChildren<WherePred> { support::children(&self.syntax) } 2059 pub fn predicates(&self) -> AstChildren<WherePred> { support::children(&self.syntax) }
2068} 2060}
2069#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2061#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2100,7 +2092,7 @@ impl AstNode for ExprStmt {
2100impl ast::AttrsOwner for ExprStmt {} 2092impl ast::AttrsOwner for ExprStmt {}
2101impl ExprStmt { 2093impl ExprStmt {
2102 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 2094 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2103 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) } 2095 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
2104} 2096}
2105#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2097#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2106pub struct LetStmt { 2098pub struct LetStmt {
@@ -2120,11 +2112,11 @@ impl AstNode for LetStmt {
2120impl ast::AttrsOwner for LetStmt {} 2112impl ast::AttrsOwner for LetStmt {}
2121impl ast::TypeAscriptionOwner for LetStmt {} 2113impl ast::TypeAscriptionOwner for LetStmt {}
2122impl LetStmt { 2114impl LetStmt {
2123 pub fn let_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![let]) } 2115 pub fn let_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![let]) }
2124 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 2116 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
2125 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![=]) } 2117 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
2126 pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) } 2118 pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) }
2127 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) } 2119 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
2128} 2120}
2129#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2121#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2130pub struct Condition { 2122pub struct Condition {
@@ -2142,9 +2134,9 @@ impl AstNode for Condition {
2142 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2134 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2143} 2135}
2144impl Condition { 2136impl Condition {
2145 pub fn let_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![let]) } 2137 pub fn let_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![let]) }
2146 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 2138 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
2147 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![=]) } 2139 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
2148 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 2140 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2149} 2141}
2150#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2142#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2165,10 +2157,10 @@ impl AstNode for Block {
2165impl ast::AttrsOwner for Block {} 2157impl ast::AttrsOwner for Block {}
2166impl ast::ModuleItemOwner for Block {} 2158impl ast::ModuleItemOwner for Block {}
2167impl Block { 2159impl Block {
2168 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['{']) } 2160 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
2169 pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) } 2161 pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) }
2170 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 2162 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2171 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['}']) } 2163 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
2172} 2164}
2173#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2165#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2174pub struct ParamList { 2166pub struct ParamList {
@@ -2186,10 +2178,10 @@ impl AstNode for ParamList {
2186 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2178 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2187} 2179}
2188impl ParamList { 2180impl ParamList {
2189 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['(']) } 2181 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
2190 pub fn self_param(&self) -> Option<SelfParam> { support::child(&self.syntax) } 2182 pub fn self_param(&self) -> Option<SelfParam> { support::child(&self.syntax) }
2191 pub fn params(&self) -> AstChildren<Param> { support::children(&self.syntax) } 2183 pub fn params(&self) -> AstChildren<Param> { support::children(&self.syntax) }
2192 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![')']) } 2184 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
2193} 2185}
2194#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2186#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2195pub struct SelfParam { 2187pub struct SelfParam {
@@ -2209,11 +2201,11 @@ impl AstNode for SelfParam {
2209impl ast::TypeAscriptionOwner for SelfParam {} 2201impl ast::TypeAscriptionOwner for SelfParam {}
2210impl ast::AttrsOwner for SelfParam {} 2202impl ast::AttrsOwner for SelfParam {}
2211impl SelfParam { 2203impl SelfParam {
2212 pub fn amp_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![&]) } 2204 pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
2213 pub fn lifetime_token(&self) -> Option<SyntaxToken> { 2205 pub fn lifetime_token(&self) -> Option<SyntaxToken> {
2214 support::token2(&self.syntax, T![lifetime]) 2206 support::token(&self.syntax, T![lifetime])
2215 } 2207 }
2216 pub fn self_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![self]) } 2208 pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) }
2217} 2209}
2218#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2210#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2219pub struct Param { 2211pub struct Param {
@@ -2234,7 +2226,7 @@ impl ast::TypeAscriptionOwner for Param {}
2234impl ast::AttrsOwner for Param {} 2226impl ast::AttrsOwner for Param {}
2235impl Param { 2227impl Param {
2236 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 2228 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
2237 pub fn dotdotdot_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![...]) } 2229 pub fn dotdotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![...]) }
2238} 2230}
2239#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2231#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2240pub struct UseItem { 2232pub struct UseItem {
@@ -2254,7 +2246,7 @@ impl AstNode for UseItem {
2254impl ast::AttrsOwner for UseItem {} 2246impl ast::AttrsOwner for UseItem {}
2255impl ast::VisibilityOwner for UseItem {} 2247impl ast::VisibilityOwner for UseItem {}
2256impl UseItem { 2248impl UseItem {
2257 pub fn use_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![use]) } 2249 pub fn use_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![use]) }
2258 pub fn use_tree(&self) -> Option<UseTree> { support::child(&self.syntax) } 2250 pub fn use_tree(&self) -> Option<UseTree> { support::child(&self.syntax) }
2259} 2251}
2260#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2252#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2274,7 +2266,7 @@ impl AstNode for UseTree {
2274} 2266}
2275impl UseTree { 2267impl UseTree {
2276 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 2268 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
2277 pub fn star_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![*]) } 2269 pub fn star_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![*]) }
2278 pub fn use_tree_list(&self) -> Option<UseTreeList> { support::child(&self.syntax) } 2270 pub fn use_tree_list(&self) -> Option<UseTreeList> { support::child(&self.syntax) }
2279 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) } 2271 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) }
2280} 2272}
@@ -2295,7 +2287,7 @@ impl AstNode for Alias {
2295} 2287}
2296impl ast::NameOwner for Alias {} 2288impl ast::NameOwner for Alias {}
2297impl Alias { 2289impl Alias {
2298 pub fn as_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![as]) } 2290 pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) }
2299} 2291}
2300#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2292#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2301pub struct UseTreeList { 2293pub struct UseTreeList {
@@ -2313,9 +2305,9 @@ impl AstNode for UseTreeList {
2313 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2305 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2314} 2306}
2315impl UseTreeList { 2307impl UseTreeList {
2316 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['{']) } 2308 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
2317 pub fn use_trees(&self) -> AstChildren<UseTree> { support::children(&self.syntax) } 2309 pub fn use_trees(&self) -> AstChildren<UseTree> { support::children(&self.syntax) }
2318 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['}']) } 2310 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
2319} 2311}
2320#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2312#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2321pub struct ExternCrateItem { 2313pub struct ExternCrateItem {
@@ -2335,8 +2327,8 @@ impl AstNode for ExternCrateItem {
2335impl ast::AttrsOwner for ExternCrateItem {} 2327impl ast::AttrsOwner for ExternCrateItem {}
2336impl ast::VisibilityOwner for ExternCrateItem {} 2328impl ast::VisibilityOwner for ExternCrateItem {}
2337impl ExternCrateItem { 2329impl ExternCrateItem {
2338 pub fn extern_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![extern]) } 2330 pub fn extern_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![extern]) }
2339 pub fn crate_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![crate]) } 2331 pub fn crate_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![crate]) }
2340 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 2332 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
2341 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) } 2333 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) }
2342} 2334}
@@ -2356,9 +2348,9 @@ impl AstNode for ArgList {
2356 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2348 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2357} 2349}
2358impl ArgList { 2350impl ArgList {
2359 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['(']) } 2351 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
2360 pub fn args(&self) -> AstChildren<Expr> { support::children(&self.syntax) } 2352 pub fn args(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
2361 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![')']) } 2353 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
2362} 2354}
2363#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2355#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2364pub struct Path { 2356pub struct Path {
@@ -2395,14 +2387,14 @@ impl AstNode for PathSegment {
2395 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2387 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2396} 2388}
2397impl PathSegment { 2389impl PathSegment {
2398 pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![::]) } 2390 pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
2399 pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![<]) } 2391 pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
2400 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 2392 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
2401 pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) } 2393 pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) }
2402 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } 2394 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
2403 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } 2395 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
2404 pub fn path_type(&self) -> Option<PathType> { support::child(&self.syntax) } 2396 pub fn path_type(&self) -> Option<PathType> { support::child(&self.syntax) }
2405 pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![>]) } 2397 pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
2406} 2398}
2407#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2399#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2408pub struct TypeArgList { 2400pub struct TypeArgList {
@@ -2420,14 +2412,14 @@ impl AstNode for TypeArgList {
2420 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2412 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2421} 2413}
2422impl TypeArgList { 2414impl TypeArgList {
2423 pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![::]) } 2415 pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
2424 pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![<]) } 2416 pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
2425 pub fn generic_args(&self) -> AstChildren<GenericArg> { support::children(&self.syntax) } 2417 pub fn generic_args(&self) -> AstChildren<GenericArg> { support::children(&self.syntax) }
2426 pub fn type_args(&self) -> AstChildren<TypeArg> { support::children(&self.syntax) } 2418 pub fn type_args(&self) -> AstChildren<TypeArg> { support::children(&self.syntax) }
2427 pub fn lifetime_args(&self) -> AstChildren<LifetimeArg> { support::children(&self.syntax) } 2419 pub fn lifetime_args(&self) -> AstChildren<LifetimeArg> { support::children(&self.syntax) }
2428 pub fn assoc_type_args(&self) -> AstChildren<AssocTypeArg> { support::children(&self.syntax) } 2420 pub fn assoc_type_args(&self) -> AstChildren<AssocTypeArg> { support::children(&self.syntax) }
2429 pub fn const_args(&self) -> AstChildren<ConstArg> { support::children(&self.syntax) } 2421 pub fn const_args(&self) -> AstChildren<ConstArg> { support::children(&self.syntax) }
2430 pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![>]) } 2422 pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
2431} 2423}
2432#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2424#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2433pub struct TypeArg { 2425pub struct TypeArg {
@@ -2465,7 +2457,7 @@ impl AstNode for AssocTypeArg {
2465impl ast::TypeBoundsOwner for AssocTypeArg {} 2457impl ast::TypeBoundsOwner for AssocTypeArg {}
2466impl AssocTypeArg { 2458impl AssocTypeArg {
2467 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 2459 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
2468 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![=]) } 2460 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
2469 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 2461 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
2470} 2462}
2471#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2463#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2485,7 +2477,7 @@ impl AstNode for LifetimeArg {
2485} 2477}
2486impl LifetimeArg { 2478impl LifetimeArg {
2487 pub fn lifetime_token(&self) -> Option<SyntaxToken> { 2479 pub fn lifetime_token(&self) -> Option<SyntaxToken> {
2488 support::token2(&self.syntax, T![lifetime]) 2480 support::token(&self.syntax, T![lifetime])
2489 } 2481 }
2490} 2482}
2491#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2483#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2505,7 +2497,7 @@ impl AstNode for ConstArg {
2505} 2497}
2506impl ConstArg { 2498impl ConstArg {
2507 pub fn literal(&self) -> Option<Literal> { support::child(&self.syntax) } 2499 pub fn literal(&self) -> Option<Literal> { support::child(&self.syntax) }
2508 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![=]) } 2500 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
2509 pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) } 2501 pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
2510} 2502}
2511#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2503#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2561,9 +2553,9 @@ impl AstNode for ExternItemList {
2561} 2553}
2562impl ast::ModuleItemOwner for ExternItemList {} 2554impl ast::ModuleItemOwner for ExternItemList {}
2563impl ExternItemList { 2555impl ExternItemList {
2564 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['{']) } 2556 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
2565 pub fn extern_items(&self) -> AstChildren<ExternItem> { support::children(&self.syntax) } 2557 pub fn extern_items(&self) -> AstChildren<ExternItem> { support::children(&self.syntax) }
2566 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['}']) } 2558 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
2567} 2559}
2568#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2560#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2569pub struct ExternBlock { 2561pub struct ExternBlock {
@@ -2601,7 +2593,7 @@ impl AstNode for MetaItem {
2601} 2593}
2602impl MetaItem { 2594impl MetaItem {
2603 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 2595 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
2604 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![=]) } 2596 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
2605 pub fn attr_input(&self) -> Option<AttrInput> { support::child(&self.syntax) } 2597 pub fn attr_input(&self) -> Option<AttrInput> { support::child(&self.syntax) }
2606 pub fn nested_meta_items(&self) -> AstChildren<MetaItem> { support::children(&self.syntax) } 2598 pub fn nested_meta_items(&self) -> AstChildren<MetaItem> { support::children(&self.syntax) }
2607} 2599}