aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-10 15:00:24 +0100
committerAleksey Kladov <[email protected]>2020-04-10 15:10:28 +0100
commitd4332760d81c5575dd04b39275c4979b59bb9fc4 (patch)
treeb87fa6b8bf9ef53473ef0f54e46137382d1e8899 /crates/ra_syntax/src
parente0f02d233fa3e26e4f10bffacbaef11b6bcb0ada (diff)
Better readability
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs138
-rw-r--r--crates/ra_syntax/src/ast/generated/tokens.rs4
2 files changed, 142 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index 65b87bb6e..0df7cfe52 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -5,6 +5,7 @@ use crate::{
5 SyntaxKind::{self, *}, 5 SyntaxKind::{self, *},
6 SyntaxNode, SyntaxToken, T, 6 SyntaxNode, SyntaxToken, T,
7}; 7};
8
8#[derive(Debug, Clone, PartialEq, Eq, Hash)] 9#[derive(Debug, Clone, PartialEq, Eq, Hash)]
9pub struct SourceFile { 10pub struct SourceFile {
10 pub(crate) syntax: SyntaxNode, 11 pub(crate) syntax: SyntaxNode,
@@ -25,6 +26,7 @@ impl ast::AttrsOwner for SourceFile {}
25impl SourceFile { 26impl SourceFile {
26 pub fn modules(&self) -> AstChildren<Module> { support::children(&self.syntax) } 27 pub fn modules(&self) -> AstChildren<Module> { support::children(&self.syntax) }
27} 28}
29
28#[derive(Debug, Clone, PartialEq, Eq, Hash)] 30#[derive(Debug, Clone, PartialEq, Eq, Hash)]
29pub struct FnDef { 31pub struct FnDef {
30 pub(crate) syntax: SyntaxNode, 32 pub(crate) syntax: SyntaxNode,
@@ -57,6 +59,7 @@ impl FnDef {
57 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } 59 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
58 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } 60 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
59} 61}
62
60#[derive(Debug, Clone, PartialEq, Eq, Hash)] 63#[derive(Debug, Clone, PartialEq, Eq, Hash)]
61pub struct RetType { 64pub struct RetType {
62 pub(crate) syntax: SyntaxNode, 65 pub(crate) syntax: SyntaxNode,
@@ -76,6 +79,7 @@ impl RetType {
76 pub fn thin_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![->]) } 79 pub fn thin_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![->]) }
77 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 80 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
78} 81}
82
79#[derive(Debug, Clone, PartialEq, Eq, Hash)] 83#[derive(Debug, Clone, PartialEq, Eq, Hash)]
80pub struct StructDef { 84pub struct StructDef {
81 pub(crate) syntax: SyntaxNode, 85 pub(crate) syntax: SyntaxNode,
@@ -101,6 +105,7 @@ impl StructDef {
101 pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) } 105 pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) }
102 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } 106 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
103} 107}
108
104#[derive(Debug, Clone, PartialEq, Eq, Hash)] 109#[derive(Debug, Clone, PartialEq, Eq, Hash)]
105pub struct UnionDef { 110pub struct UnionDef {
106 pub(crate) syntax: SyntaxNode, 111 pub(crate) syntax: SyntaxNode,
@@ -127,6 +132,7 @@ impl UnionDef {
127 support::child(&self.syntax) 132 support::child(&self.syntax)
128 } 133 }
129} 134}
135
130#[derive(Debug, Clone, PartialEq, Eq, Hash)] 136#[derive(Debug, Clone, PartialEq, Eq, Hash)]
131pub struct RecordFieldDefList { 137pub struct RecordFieldDefList {
132 pub(crate) syntax: SyntaxNode, 138 pub(crate) syntax: SyntaxNode,
@@ -147,6 +153,7 @@ impl RecordFieldDefList {
147 pub fn fields(&self) -> AstChildren<RecordFieldDef> { support::children(&self.syntax) } 153 pub fn fields(&self) -> AstChildren<RecordFieldDef> { support::children(&self.syntax) }
148 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } 154 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
149} 155}
156
150#[derive(Debug, Clone, PartialEq, Eq, Hash)] 157#[derive(Debug, Clone, PartialEq, Eq, Hash)]
151pub struct RecordFieldDef { 158pub struct RecordFieldDef {
152 pub(crate) syntax: SyntaxNode, 159 pub(crate) syntax: SyntaxNode,
@@ -168,6 +175,7 @@ impl ast::AttrsOwner for RecordFieldDef {}
168impl ast::DocCommentsOwner for RecordFieldDef {} 175impl ast::DocCommentsOwner for RecordFieldDef {}
169impl ast::TypeAscriptionOwner for RecordFieldDef {} 176impl ast::TypeAscriptionOwner for RecordFieldDef {}
170impl RecordFieldDef {} 177impl RecordFieldDef {}
178
171#[derive(Debug, Clone, PartialEq, Eq, Hash)] 179#[derive(Debug, Clone, PartialEq, Eq, Hash)]
172pub struct TupleFieldDefList { 180pub struct TupleFieldDefList {
173 pub(crate) syntax: SyntaxNode, 181 pub(crate) syntax: SyntaxNode,
@@ -188,6 +196,7 @@ impl TupleFieldDefList {
188 pub fn fields(&self) -> AstChildren<TupleFieldDef> { support::children(&self.syntax) } 196 pub fn fields(&self) -> AstChildren<TupleFieldDef> { support::children(&self.syntax) }
189 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } 197 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
190} 198}
199
191#[derive(Debug, Clone, PartialEq, Eq, Hash)] 200#[derive(Debug, Clone, PartialEq, Eq, Hash)]
192pub struct TupleFieldDef { 201pub struct TupleFieldDef {
193 pub(crate) syntax: SyntaxNode, 202 pub(crate) syntax: SyntaxNode,
@@ -208,6 +217,7 @@ impl ast::AttrsOwner for TupleFieldDef {}
208impl TupleFieldDef { 217impl TupleFieldDef {
209 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 218 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
210} 219}
220
211#[derive(Debug, Clone, PartialEq, Eq, Hash)] 221#[derive(Debug, Clone, PartialEq, Eq, Hash)]
212pub struct EnumDef { 222pub struct EnumDef {
213 pub(crate) syntax: SyntaxNode, 223 pub(crate) syntax: SyntaxNode,
@@ -232,6 +242,7 @@ impl EnumDef {
232 pub fn enum_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![enum]) } 242 pub fn enum_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![enum]) }
233 pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) } 243 pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) }
234} 244}
245
235#[derive(Debug, Clone, PartialEq, Eq, Hash)] 246#[derive(Debug, Clone, PartialEq, Eq, Hash)]
236pub struct EnumVariantList { 247pub struct EnumVariantList {
237 pub(crate) syntax: SyntaxNode, 248 pub(crate) syntax: SyntaxNode,
@@ -252,6 +263,7 @@ impl EnumVariantList {
252 pub fn variants(&self) -> AstChildren<EnumVariant> { support::children(&self.syntax) } 263 pub fn variants(&self) -> AstChildren<EnumVariant> { support::children(&self.syntax) }
253 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } 264 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
254} 265}
266
255#[derive(Debug, Clone, PartialEq, Eq, Hash)] 267#[derive(Debug, Clone, PartialEq, Eq, Hash)]
256pub struct EnumVariant { 268pub struct EnumVariant {
257 pub(crate) syntax: SyntaxNode, 269 pub(crate) syntax: SyntaxNode,
@@ -276,6 +288,7 @@ impl EnumVariant {
276 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } 288 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
277 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 289 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
278} 290}
291
279#[derive(Debug, Clone, PartialEq, Eq, Hash)] 292#[derive(Debug, Clone, PartialEq, Eq, Hash)]
280pub struct TraitDef { 293pub struct TraitDef {
281 pub(crate) syntax: SyntaxNode, 294 pub(crate) syntax: SyntaxNode,
@@ -303,6 +316,7 @@ impl TraitDef {
303 pub fn trait_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![trait]) } 316 pub fn trait_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![trait]) }
304 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } 317 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
305} 318}
319
306#[derive(Debug, Clone, PartialEq, Eq, Hash)] 320#[derive(Debug, Clone, PartialEq, Eq, Hash)]
307pub struct Module { 321pub struct Module {
308 pub(crate) syntax: SyntaxNode, 322 pub(crate) syntax: SyntaxNode,
@@ -327,6 +341,7 @@ impl Module {
327 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } 341 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
328 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } 342 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
329} 343}
344
330#[derive(Debug, Clone, PartialEq, Eq, Hash)] 345#[derive(Debug, Clone, PartialEq, Eq, Hash)]
331pub struct ItemList { 346pub struct ItemList {
332 pub(crate) syntax: SyntaxNode, 347 pub(crate) syntax: SyntaxNode,
@@ -348,6 +363,7 @@ impl ItemList {
348 pub fn impl_items(&self) -> AstChildren<ImplItem> { support::children(&self.syntax) } 363 pub fn impl_items(&self) -> AstChildren<ImplItem> { support::children(&self.syntax) }
349 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } 364 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
350} 365}
366
351#[derive(Debug, Clone, PartialEq, Eq, Hash)] 367#[derive(Debug, Clone, PartialEq, Eq, Hash)]
352pub struct ConstDef { 368pub struct ConstDef {
353 pub(crate) syntax: SyntaxNode, 369 pub(crate) syntax: SyntaxNode,
@@ -376,6 +392,7 @@ impl ConstDef {
376 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } 392 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
377 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } 393 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
378} 394}
395
379#[derive(Debug, Clone, PartialEq, Eq, Hash)] 396#[derive(Debug, Clone, PartialEq, Eq, Hash)]
380pub struct StaticDef { 397pub struct StaticDef {
381 pub(crate) syntax: SyntaxNode, 398 pub(crate) syntax: SyntaxNode,
@@ -404,6 +421,7 @@ impl StaticDef {
404 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } 421 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
405 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } 422 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
406} 423}
424
407#[derive(Debug, Clone, PartialEq, Eq, Hash)] 425#[derive(Debug, Clone, PartialEq, Eq, Hash)]
408pub struct TypeAliasDef { 426pub struct TypeAliasDef {
409 pub(crate) syntax: SyntaxNode, 427 pub(crate) syntax: SyntaxNode,
@@ -432,6 +450,7 @@ impl TypeAliasDef {
432 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 450 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
433 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } 451 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
434} 452}
453
435#[derive(Debug, Clone, PartialEq, Eq, Hash)] 454#[derive(Debug, Clone, PartialEq, Eq, Hash)]
436pub struct ImplDef { 455pub struct ImplDef {
437 pub(crate) syntax: SyntaxNode, 456 pub(crate) syntax: SyntaxNode,
@@ -458,6 +477,7 @@ impl ImplDef {
458 pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) } 477 pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
459 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } 478 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
460} 479}
480
461#[derive(Debug, Clone, PartialEq, Eq, Hash)] 481#[derive(Debug, Clone, PartialEq, Eq, Hash)]
462pub struct ParenType { 482pub struct ParenType {
463 pub(crate) syntax: SyntaxNode, 483 pub(crate) syntax: SyntaxNode,
@@ -478,6 +498,7 @@ impl ParenType {
478 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 498 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
479 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } 499 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
480} 500}
501
481#[derive(Debug, Clone, PartialEq, Eq, Hash)] 502#[derive(Debug, Clone, PartialEq, Eq, Hash)]
482pub struct TupleType { 503pub struct TupleType {
483 pub(crate) syntax: SyntaxNode, 504 pub(crate) syntax: SyntaxNode,
@@ -498,6 +519,7 @@ impl TupleType {
498 pub fn fields(&self) -> AstChildren<TypeRef> { support::children(&self.syntax) } 519 pub fn fields(&self) -> AstChildren<TypeRef> { support::children(&self.syntax) }
499 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } 520 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
500} 521}
522
501#[derive(Debug, Clone, PartialEq, Eq, Hash)] 523#[derive(Debug, Clone, PartialEq, Eq, Hash)]
502pub struct NeverType { 524pub struct NeverType {
503 pub(crate) syntax: SyntaxNode, 525 pub(crate) syntax: SyntaxNode,
@@ -516,6 +538,7 @@ impl AstNode for NeverType {
516impl NeverType { 538impl NeverType {
517 pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) } 539 pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
518} 540}
541
519#[derive(Debug, Clone, PartialEq, Eq, Hash)] 542#[derive(Debug, Clone, PartialEq, Eq, Hash)]
520pub struct PathType { 543pub struct PathType {
521 pub(crate) syntax: SyntaxNode, 544 pub(crate) syntax: SyntaxNode,
@@ -534,6 +557,7 @@ impl AstNode for PathType {
534impl PathType { 557impl PathType {
535 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 558 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
536} 559}
560
537#[derive(Debug, Clone, PartialEq, Eq, Hash)] 561#[derive(Debug, Clone, PartialEq, Eq, Hash)]
538pub struct PointerType { 562pub struct PointerType {
539 pub(crate) syntax: SyntaxNode, 563 pub(crate) syntax: SyntaxNode,
@@ -555,6 +579,7 @@ impl PointerType {
555 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } 579 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
556 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 580 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
557} 581}
582
558#[derive(Debug, Clone, PartialEq, Eq, Hash)] 583#[derive(Debug, Clone, PartialEq, Eq, Hash)]
559pub struct ArrayType { 584pub struct ArrayType {
560 pub(crate) syntax: SyntaxNode, 585 pub(crate) syntax: SyntaxNode,
@@ -577,6 +602,7 @@ impl ArrayType {
577 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 602 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
578 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } 603 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
579} 604}
605
580#[derive(Debug, Clone, PartialEq, Eq, Hash)] 606#[derive(Debug, Clone, PartialEq, Eq, Hash)]
581pub struct SliceType { 607pub struct SliceType {
582 pub(crate) syntax: SyntaxNode, 608 pub(crate) syntax: SyntaxNode,
@@ -597,6 +623,7 @@ impl SliceType {
597 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 623 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
598 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } 624 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
599} 625}
626
600#[derive(Debug, Clone, PartialEq, Eq, Hash)] 627#[derive(Debug, Clone, PartialEq, Eq, Hash)]
601pub struct ReferenceType { 628pub struct ReferenceType {
602 pub(crate) syntax: SyntaxNode, 629 pub(crate) syntax: SyntaxNode,
@@ -620,6 +647,7 @@ impl ReferenceType {
620 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } 647 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
621 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 648 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
622} 649}
650
623#[derive(Debug, Clone, PartialEq, Eq, Hash)] 651#[derive(Debug, Clone, PartialEq, Eq, Hash)]
624pub struct PlaceholderType { 652pub struct PlaceholderType {
625 pub(crate) syntax: SyntaxNode, 653 pub(crate) syntax: SyntaxNode,
@@ -638,6 +666,7 @@ impl AstNode for PlaceholderType {
638impl PlaceholderType { 666impl PlaceholderType {
639 pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) } 667 pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
640} 668}
669
641#[derive(Debug, Clone, PartialEq, Eq, Hash)] 670#[derive(Debug, Clone, PartialEq, Eq, Hash)]
642pub struct FnPointerType { 671pub struct FnPointerType {
643 pub(crate) syntax: SyntaxNode, 672 pub(crate) syntax: SyntaxNode,
@@ -660,6 +689,7 @@ impl FnPointerType {
660 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } 689 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
661 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } 690 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
662} 691}
692
663#[derive(Debug, Clone, PartialEq, Eq, Hash)] 693#[derive(Debug, Clone, PartialEq, Eq, Hash)]
664pub struct ForType { 694pub struct ForType {
665 pub(crate) syntax: SyntaxNode, 695 pub(crate) syntax: SyntaxNode,
@@ -680,6 +710,7 @@ impl ForType {
680 pub fn type_param_list(&self) -> Option<TypeParamList> { support::child(&self.syntax) } 710 pub fn type_param_list(&self) -> Option<TypeParamList> { support::child(&self.syntax) }
681 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 711 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
682} 712}
713
683#[derive(Debug, Clone, PartialEq, Eq, Hash)] 714#[derive(Debug, Clone, PartialEq, Eq, Hash)]
684pub struct ImplTraitType { 715pub struct ImplTraitType {
685 pub(crate) syntax: SyntaxNode, 716 pub(crate) syntax: SyntaxNode,
@@ -699,6 +730,7 @@ impl ast::TypeBoundsOwner for ImplTraitType {}
699impl ImplTraitType { 730impl ImplTraitType {
700 pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) } 731 pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) }
701} 732}
733
702#[derive(Debug, Clone, PartialEq, Eq, Hash)] 734#[derive(Debug, Clone, PartialEq, Eq, Hash)]
703pub struct DynTraitType { 735pub struct DynTraitType {
704 pub(crate) syntax: SyntaxNode, 736 pub(crate) syntax: SyntaxNode,
@@ -718,6 +750,7 @@ impl ast::TypeBoundsOwner for DynTraitType {}
718impl DynTraitType { 750impl DynTraitType {
719 pub fn dyn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![dyn]) } 751 pub fn dyn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![dyn]) }
720} 752}
753
721#[derive(Debug, Clone, PartialEq, Eq, Hash)] 754#[derive(Debug, Clone, PartialEq, Eq, Hash)]
722pub struct TupleExpr { 755pub struct TupleExpr {
723 pub(crate) syntax: SyntaxNode, 756 pub(crate) syntax: SyntaxNode,
@@ -739,6 +772,7 @@ impl TupleExpr {
739 pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) } 772 pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
740 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } 773 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
741} 774}
775
742#[derive(Debug, Clone, PartialEq, Eq, Hash)] 776#[derive(Debug, Clone, PartialEq, Eq, Hash)]
743pub struct ArrayExpr { 777pub struct ArrayExpr {
744 pub(crate) syntax: SyntaxNode, 778 pub(crate) syntax: SyntaxNode,
@@ -761,6 +795,7 @@ impl ArrayExpr {
761 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } 795 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
762 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } 796 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
763} 797}
798
764#[derive(Debug, Clone, PartialEq, Eq, Hash)] 799#[derive(Debug, Clone, PartialEq, Eq, Hash)]
765pub struct ParenExpr { 800pub struct ParenExpr {
766 pub(crate) syntax: SyntaxNode, 801 pub(crate) syntax: SyntaxNode,
@@ -782,6 +817,7 @@ impl ParenExpr {
782 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 817 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
783 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } 818 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
784} 819}
820
785#[derive(Debug, Clone, PartialEq, Eq, Hash)] 821#[derive(Debug, Clone, PartialEq, Eq, Hash)]
786pub struct PathExpr { 822pub struct PathExpr {
787 pub(crate) syntax: SyntaxNode, 823 pub(crate) syntax: SyntaxNode,
@@ -800,6 +836,7 @@ impl AstNode for PathExpr {
800impl PathExpr { 836impl PathExpr {
801 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 837 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
802} 838}
839
803#[derive(Debug, Clone, PartialEq, Eq, Hash)] 840#[derive(Debug, Clone, PartialEq, Eq, Hash)]
804pub struct LambdaExpr { 841pub struct LambdaExpr {
805 pub(crate) syntax: SyntaxNode, 842 pub(crate) syntax: SyntaxNode,
@@ -824,6 +861,7 @@ impl LambdaExpr {
824 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } 861 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
825 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } 862 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
826} 863}
864
827#[derive(Debug, Clone, PartialEq, Eq, Hash)] 865#[derive(Debug, Clone, PartialEq, Eq, Hash)]
828pub struct IfExpr { 866pub struct IfExpr {
829 pub(crate) syntax: SyntaxNode, 867 pub(crate) syntax: SyntaxNode,
@@ -844,6 +882,7 @@ impl IfExpr {
844 pub fn if_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![if]) } 882 pub fn if_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![if]) }
845 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) } 883 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) }
846} 884}
885
847#[derive(Debug, Clone, PartialEq, Eq, Hash)] 886#[derive(Debug, Clone, PartialEq, Eq, Hash)]
848pub struct LoopExpr { 887pub struct LoopExpr {
849 pub(crate) syntax: SyntaxNode, 888 pub(crate) syntax: SyntaxNode,
@@ -864,6 +903,7 @@ impl ast::LoopBodyOwner for LoopExpr {}
864impl LoopExpr { 903impl LoopExpr {
865 pub fn loop_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![loop]) } 904 pub fn loop_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![loop]) }
866} 905}
906
867#[derive(Debug, Clone, PartialEq, Eq, Hash)] 907#[derive(Debug, Clone, PartialEq, Eq, Hash)]
868pub struct TryBlockExpr { 908pub struct TryBlockExpr {
869 pub(crate) syntax: SyntaxNode, 909 pub(crate) syntax: SyntaxNode,
@@ -884,6 +924,7 @@ impl TryBlockExpr {
884 pub fn try_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![try]) } 924 pub fn try_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![try]) }
885 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } 925 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
886} 926}
927
887#[derive(Debug, Clone, PartialEq, Eq, Hash)] 928#[derive(Debug, Clone, PartialEq, Eq, Hash)]
888pub struct ForExpr { 929pub struct ForExpr {
889 pub(crate) syntax: SyntaxNode, 930 pub(crate) syntax: SyntaxNode,
@@ -907,6 +948,7 @@ impl ForExpr {
907 pub fn in_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![in]) } 948 pub fn in_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![in]) }
908 pub fn iterable(&self) -> Option<Expr> { support::child(&self.syntax) } 949 pub fn iterable(&self) -> Option<Expr> { support::child(&self.syntax) }
909} 950}
951
910#[derive(Debug, Clone, PartialEq, Eq, Hash)] 952#[derive(Debug, Clone, PartialEq, Eq, Hash)]
911pub struct WhileExpr { 953pub struct WhileExpr {
912 pub(crate) syntax: SyntaxNode, 954 pub(crate) syntax: SyntaxNode,
@@ -928,6 +970,7 @@ impl WhileExpr {
928 pub fn while_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![while]) } 970 pub fn while_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![while]) }
929 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) } 971 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) }
930} 972}
973
931#[derive(Debug, Clone, PartialEq, Eq, Hash)] 974#[derive(Debug, Clone, PartialEq, Eq, Hash)]
932pub struct ContinueExpr { 975pub struct ContinueExpr {
933 pub(crate) syntax: SyntaxNode, 976 pub(crate) syntax: SyntaxNode,
@@ -952,6 +995,7 @@ impl ContinueExpr {
952 support::token(&self.syntax, T![lifetime]) 995 support::token(&self.syntax, T![lifetime])
953 } 996 }
954} 997}
998
955#[derive(Debug, Clone, PartialEq, Eq, Hash)] 999#[derive(Debug, Clone, PartialEq, Eq, Hash)]
956pub struct BreakExpr { 1000pub struct BreakExpr {
957 pub(crate) syntax: SyntaxNode, 1001 pub(crate) syntax: SyntaxNode,
@@ -975,6 +1019,7 @@ impl BreakExpr {
975 } 1019 }
976 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1020 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
977} 1021}
1022
978#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1023#[derive(Debug, Clone, PartialEq, Eq, Hash)]
979pub struct Label { 1024pub struct Label {
980 pub(crate) syntax: SyntaxNode, 1025 pub(crate) syntax: SyntaxNode,
@@ -995,6 +1040,7 @@ impl Label {
995 support::token(&self.syntax, T![lifetime]) 1040 support::token(&self.syntax, T![lifetime])
996 } 1041 }
997} 1042}
1043
998#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1044#[derive(Debug, Clone, PartialEq, Eq, Hash)]
999pub struct BlockExpr { 1045pub struct BlockExpr {
1000 pub(crate) syntax: SyntaxNode, 1046 pub(crate) syntax: SyntaxNode,
@@ -1016,6 +1062,7 @@ impl BlockExpr {
1016 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) } 1062 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
1017 pub fn block(&self) -> Option<Block> { support::child(&self.syntax) } 1063 pub fn block(&self) -> Option<Block> { support::child(&self.syntax) }
1018} 1064}
1065
1019#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1066#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1020pub struct ReturnExpr { 1067pub struct ReturnExpr {
1021 pub(crate) syntax: SyntaxNode, 1068 pub(crate) syntax: SyntaxNode,
@@ -1035,6 +1082,7 @@ impl ast::AttrsOwner for ReturnExpr {}
1035impl ReturnExpr { 1082impl ReturnExpr {
1036 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1083 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1037} 1084}
1085
1038#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1086#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1039pub struct CallExpr { 1087pub struct CallExpr {
1040 pub(crate) syntax: SyntaxNode, 1088 pub(crate) syntax: SyntaxNode,
@@ -1054,6 +1102,7 @@ impl ast::ArgListOwner for CallExpr {}
1054impl CallExpr { 1102impl CallExpr {
1055 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1103 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1056} 1104}
1105
1057#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1106#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1058pub struct MethodCallExpr { 1107pub struct MethodCallExpr {
1059 pub(crate) syntax: SyntaxNode, 1108 pub(crate) syntax: SyntaxNode,
@@ -1077,6 +1126,7 @@ impl MethodCallExpr {
1077 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 1126 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1078 pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) } 1127 pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) }
1079} 1128}
1129
1080#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1130#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1081pub struct IndexExpr { 1131pub struct IndexExpr {
1082 pub(crate) syntax: SyntaxNode, 1132 pub(crate) syntax: SyntaxNode,
@@ -1097,6 +1147,7 @@ impl IndexExpr {
1097 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) } 1147 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
1098 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } 1148 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1099} 1149}
1150
1100#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1151#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1101pub struct FieldExpr { 1152pub struct FieldExpr {
1102 pub(crate) syntax: SyntaxNode, 1153 pub(crate) syntax: SyntaxNode,
@@ -1118,6 +1169,7 @@ impl FieldExpr {
1118 pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) } 1169 pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
1119 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 1170 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1120} 1171}
1172
1121#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1173#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1122pub struct AwaitExpr { 1174pub struct AwaitExpr {
1123 pub(crate) syntax: SyntaxNode, 1175 pub(crate) syntax: SyntaxNode,
@@ -1139,6 +1191,7 @@ impl AwaitExpr {
1139 pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) } 1191 pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
1140 pub fn await_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![await]) } 1192 pub fn await_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![await]) }
1141} 1193}
1194
1142#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1195#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1143pub struct TryExpr { 1196pub struct TryExpr {
1144 pub(crate) syntax: SyntaxNode, 1197 pub(crate) syntax: SyntaxNode,
@@ -1159,6 +1212,7 @@ impl TryExpr {
1159 pub fn try_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![try]) } 1212 pub fn try_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![try]) }
1160 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1213 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1161} 1214}
1215
1162#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1216#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1163pub struct CastExpr { 1217pub struct CastExpr {
1164 pub(crate) syntax: SyntaxNode, 1218 pub(crate) syntax: SyntaxNode,
@@ -1180,6 +1234,7 @@ impl CastExpr {
1180 pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) } 1234 pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) }
1181 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 1235 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
1182} 1236}
1237
1183#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1238#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1184pub struct RefExpr { 1239pub struct RefExpr {
1185 pub(crate) syntax: SyntaxNode, 1240 pub(crate) syntax: SyntaxNode,
@@ -1202,6 +1257,7 @@ impl RefExpr {
1202 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } 1257 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1203 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1258 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1204} 1259}
1260
1205#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1261#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1206pub struct PrefixExpr { 1262pub struct PrefixExpr {
1207 pub(crate) syntax: SyntaxNode, 1263 pub(crate) syntax: SyntaxNode,
@@ -1221,6 +1277,7 @@ impl ast::AttrsOwner for PrefixExpr {}
1221impl PrefixExpr { 1277impl PrefixExpr {
1222 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1278 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1223} 1279}
1280
1224#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1281#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1225pub struct BoxExpr { 1282pub struct BoxExpr {
1226 pub(crate) syntax: SyntaxNode, 1283 pub(crate) syntax: SyntaxNode,
@@ -1241,6 +1298,7 @@ impl BoxExpr {
1241 pub fn box_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![box]) } 1298 pub fn box_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![box]) }
1242 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1299 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1243} 1300}
1301
1244#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1302#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1245pub struct RangeExpr { 1303pub struct RangeExpr {
1246 pub(crate) syntax: SyntaxNode, 1304 pub(crate) syntax: SyntaxNode,
@@ -1258,6 +1316,7 @@ impl AstNode for RangeExpr {
1258} 1316}
1259impl ast::AttrsOwner for RangeExpr {} 1317impl ast::AttrsOwner for RangeExpr {}
1260impl RangeExpr {} 1318impl RangeExpr {}
1319
1261#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1320#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1262pub struct BinExpr { 1321pub struct BinExpr {
1263 pub(crate) syntax: SyntaxNode, 1322 pub(crate) syntax: SyntaxNode,
@@ -1275,6 +1334,7 @@ impl AstNode for BinExpr {
1275} 1334}
1276impl ast::AttrsOwner for BinExpr {} 1335impl ast::AttrsOwner for BinExpr {}
1277impl BinExpr {} 1336impl BinExpr {}
1337
1278#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1338#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1279pub struct Literal { 1339pub struct Literal {
1280 pub(crate) syntax: SyntaxNode, 1340 pub(crate) syntax: SyntaxNode,
@@ -1291,6 +1351,7 @@ impl AstNode for Literal {
1291 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1351 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1292} 1352}
1293impl Literal {} 1353impl Literal {}
1354
1294#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1355#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1295pub struct MatchExpr { 1356pub struct MatchExpr {
1296 pub(crate) syntax: SyntaxNode, 1357 pub(crate) syntax: SyntaxNode,
@@ -1312,6 +1373,7 @@ impl MatchExpr {
1312 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1373 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1313 pub fn match_arm_list(&self) -> Option<MatchArmList> { support::child(&self.syntax) } 1374 pub fn match_arm_list(&self) -> Option<MatchArmList> { support::child(&self.syntax) }
1314} 1375}
1376
1315#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1377#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1316pub struct MatchArmList { 1378pub struct MatchArmList {
1317 pub(crate) syntax: SyntaxNode, 1379 pub(crate) syntax: SyntaxNode,
@@ -1333,6 +1395,7 @@ impl MatchArmList {
1333 pub fn arms(&self) -> AstChildren<MatchArm> { support::children(&self.syntax) } 1395 pub fn arms(&self) -> AstChildren<MatchArm> { support::children(&self.syntax) }
1334 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } 1396 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1335} 1397}
1398
1336#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1399#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1337pub struct MatchArm { 1400pub struct MatchArm {
1338 pub(crate) syntax: SyntaxNode, 1401 pub(crate) syntax: SyntaxNode,
@@ -1355,6 +1418,7 @@ impl MatchArm {
1355 pub fn fat_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=>]) } 1418 pub fn fat_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=>]) }
1356 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1419 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1357} 1420}
1421
1358#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1422#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1359pub struct MatchGuard { 1423pub struct MatchGuard {
1360 pub(crate) syntax: SyntaxNode, 1424 pub(crate) syntax: SyntaxNode,
@@ -1374,6 +1438,7 @@ impl MatchGuard {
1374 pub fn if_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![if]) } 1438 pub fn if_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![if]) }
1375 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1439 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1376} 1440}
1441
1377#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1442#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1378pub struct RecordLit { 1443pub struct RecordLit {
1379 pub(crate) syntax: SyntaxNode, 1444 pub(crate) syntax: SyntaxNode,
@@ -1393,6 +1458,7 @@ impl RecordLit {
1393 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 1458 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1394 pub fn record_field_list(&self) -> Option<RecordFieldList> { support::child(&self.syntax) } 1459 pub fn record_field_list(&self) -> Option<RecordFieldList> { support::child(&self.syntax) }
1395} 1460}
1461
1396#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1462#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1397pub struct RecordFieldList { 1463pub struct RecordFieldList {
1398 pub(crate) syntax: SyntaxNode, 1464 pub(crate) syntax: SyntaxNode,
@@ -1415,6 +1481,7 @@ impl RecordFieldList {
1415 pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) } 1481 pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) }
1416 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } 1482 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1417} 1483}
1484
1418#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1485#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1419pub struct RecordField { 1486pub struct RecordField {
1420 pub(crate) syntax: SyntaxNode, 1487 pub(crate) syntax: SyntaxNode,
@@ -1436,6 +1503,7 @@ impl RecordField {
1436 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } 1503 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1437 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1504 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1438} 1505}
1506
1439#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1507#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1440pub struct OrPat { 1508pub struct OrPat {
1441 pub(crate) syntax: SyntaxNode, 1509 pub(crate) syntax: SyntaxNode,
@@ -1454,6 +1522,7 @@ impl AstNode for OrPat {
1454impl OrPat { 1522impl OrPat {
1455 pub fn pats(&self) -> AstChildren<Pat> { support::children(&self.syntax) } 1523 pub fn pats(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1456} 1524}
1525
1457#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1526#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1458pub struct ParenPat { 1527pub struct ParenPat {
1459 pub(crate) syntax: SyntaxNode, 1528 pub(crate) syntax: SyntaxNode,
@@ -1474,6 +1543,7 @@ impl ParenPat {
1474 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1543 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1475 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } 1544 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1476} 1545}
1546
1477#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1547#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1478pub struct RefPat { 1548pub struct RefPat {
1479 pub(crate) syntax: SyntaxNode, 1549 pub(crate) syntax: SyntaxNode,
@@ -1494,6 +1564,7 @@ impl RefPat {
1494 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } 1564 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1495 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1565 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1496} 1566}
1567
1497#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1568#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1498pub struct BoxPat { 1569pub struct BoxPat {
1499 pub(crate) syntax: SyntaxNode, 1570 pub(crate) syntax: SyntaxNode,
@@ -1513,6 +1584,7 @@ impl BoxPat {
1513 pub fn box_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![box]) } 1584 pub fn box_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![box]) }
1514 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1585 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1515} 1586}
1587
1516#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1588#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1517pub struct BindPat { 1589pub struct BindPat {
1518 pub(crate) syntax: SyntaxNode, 1590 pub(crate) syntax: SyntaxNode,
@@ -1536,6 +1608,7 @@ impl BindPat {
1536 pub fn at_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![@]) } 1608 pub fn at_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![@]) }
1537 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1609 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1538} 1610}
1611
1539#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1612#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1540pub struct PlaceholderPat { 1613pub struct PlaceholderPat {
1541 pub(crate) syntax: SyntaxNode, 1614 pub(crate) syntax: SyntaxNode,
@@ -1554,6 +1627,7 @@ impl AstNode for PlaceholderPat {
1554impl PlaceholderPat { 1627impl PlaceholderPat {
1555 pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) } 1628 pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
1556} 1629}
1630
1557#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1631#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1558pub struct DotDotPat { 1632pub struct DotDotPat {
1559 pub(crate) syntax: SyntaxNode, 1633 pub(crate) syntax: SyntaxNode,
@@ -1572,6 +1646,7 @@ impl AstNode for DotDotPat {
1572impl DotDotPat { 1646impl DotDotPat {
1573 pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) } 1647 pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
1574} 1648}
1649
1575#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1650#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1576pub struct PathPat { 1651pub struct PathPat {
1577 pub(crate) syntax: SyntaxNode, 1652 pub(crate) syntax: SyntaxNode,
@@ -1590,6 +1665,7 @@ impl AstNode for PathPat {
1590impl PathPat { 1665impl PathPat {
1591 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 1666 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1592} 1667}
1668
1593#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1669#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1594pub struct SlicePat { 1670pub struct SlicePat {
1595 pub(crate) syntax: SyntaxNode, 1671 pub(crate) syntax: SyntaxNode,
@@ -1610,6 +1686,7 @@ impl SlicePat {
1610 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) } 1686 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1611 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } 1687 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1612} 1688}
1689
1613#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1690#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1614pub struct RangePat { 1691pub struct RangePat {
1615 pub(crate) syntax: SyntaxNode, 1692 pub(crate) syntax: SyntaxNode,
@@ -1626,6 +1703,7 @@ impl AstNode for RangePat {
1626 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1703 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1627} 1704}
1628impl RangePat {} 1705impl RangePat {}
1706
1629#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1707#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1630pub struct LiteralPat { 1708pub struct LiteralPat {
1631 pub(crate) syntax: SyntaxNode, 1709 pub(crate) syntax: SyntaxNode,
@@ -1644,6 +1722,7 @@ impl AstNode for LiteralPat {
1644impl LiteralPat { 1722impl LiteralPat {
1645 pub fn literal(&self) -> Option<Literal> { support::child(&self.syntax) } 1723 pub fn literal(&self) -> Option<Literal> { support::child(&self.syntax) }
1646} 1724}
1725
1647#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1726#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1648pub struct MacroPat { 1727pub struct MacroPat {
1649 pub(crate) syntax: SyntaxNode, 1728 pub(crate) syntax: SyntaxNode,
@@ -1662,6 +1741,7 @@ impl AstNode for MacroPat {
1662impl MacroPat { 1741impl MacroPat {
1663 pub fn macro_call(&self) -> Option<MacroCall> { support::child(&self.syntax) } 1742 pub fn macro_call(&self) -> Option<MacroCall> { support::child(&self.syntax) }
1664} 1743}
1744
1665#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1745#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1666pub struct RecordPat { 1746pub struct RecordPat {
1667 pub(crate) syntax: SyntaxNode, 1747 pub(crate) syntax: SyntaxNode,
@@ -1683,6 +1763,7 @@ impl RecordPat {
1683 } 1763 }
1684 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 1764 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1685} 1765}
1766
1686#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1767#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1687pub struct RecordFieldPatList { 1768pub struct RecordFieldPatList {
1688 pub(crate) syntax: SyntaxNode, 1769 pub(crate) syntax: SyntaxNode,
@@ -1708,6 +1789,7 @@ impl RecordFieldPatList {
1708 pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) } 1789 pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
1709 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } 1790 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1710} 1791}
1792
1711#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1793#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1712pub struct RecordFieldPat { 1794pub struct RecordFieldPat {
1713 pub(crate) syntax: SyntaxNode, 1795 pub(crate) syntax: SyntaxNode,
@@ -1729,6 +1811,7 @@ impl RecordFieldPat {
1729 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } 1811 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1730 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1812 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1731} 1813}
1814
1732#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1815#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1733pub struct TupleStructPat { 1816pub struct TupleStructPat {
1734 pub(crate) syntax: SyntaxNode, 1817 pub(crate) syntax: SyntaxNode,
@@ -1750,6 +1833,7 @@ impl TupleStructPat {
1750 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) } 1833 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1751 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } 1834 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1752} 1835}
1836
1753#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1837#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1754pub struct TuplePat { 1838pub struct TuplePat {
1755 pub(crate) syntax: SyntaxNode, 1839 pub(crate) syntax: SyntaxNode,
@@ -1770,6 +1854,7 @@ impl TuplePat {
1770 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) } 1854 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1771 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } 1855 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1772} 1856}
1857
1773#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1858#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1774pub struct Visibility { 1859pub struct Visibility {
1775 pub(crate) syntax: SyntaxNode, 1860 pub(crate) syntax: SyntaxNode,
@@ -1791,6 +1876,7 @@ impl Visibility {
1791 pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) } 1876 pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) }
1792 pub fn crate_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![crate]) } 1877 pub fn crate_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![crate]) }
1793} 1878}
1879
1794#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1880#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1795pub struct Name { 1881pub struct Name {
1796 pub(crate) syntax: SyntaxNode, 1882 pub(crate) syntax: SyntaxNode,
@@ -1809,6 +1895,7 @@ impl AstNode for Name {
1809impl Name { 1895impl Name {
1810 pub fn ident_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ident]) } 1896 pub fn ident_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ident]) }
1811} 1897}
1898
1812#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1899#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1813pub struct NameRef { 1900pub struct NameRef {
1814 pub(crate) syntax: SyntaxNode, 1901 pub(crate) syntax: SyntaxNode,
@@ -1825,6 +1912,7 @@ impl AstNode for NameRef {
1825 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1912 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1826} 1913}
1827impl NameRef {} 1914impl NameRef {}
1915
1828#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1916#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1829pub struct MacroCall { 1917pub struct MacroCall {
1830 pub(crate) syntax: SyntaxNode, 1918 pub(crate) syntax: SyntaxNode,
@@ -1849,6 +1937,7 @@ impl MacroCall {
1849 pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) } 1937 pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
1850 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } 1938 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1851} 1939}
1940
1852#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1941#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1853pub struct Attr { 1942pub struct Attr {
1854 pub(crate) syntax: SyntaxNode, 1943 pub(crate) syntax: SyntaxNode,
@@ -1873,6 +1962,7 @@ impl Attr {
1873 pub fn input(&self) -> Option<AttrInput> { support::child(&self.syntax) } 1962 pub fn input(&self) -> Option<AttrInput> { support::child(&self.syntax) }
1874 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } 1963 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1875} 1964}
1965
1876#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1966#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1877pub struct TokenTree { 1967pub struct TokenTree {
1878 pub(crate) syntax: SyntaxNode, 1968 pub(crate) syntax: SyntaxNode,
@@ -1889,6 +1979,7 @@ impl AstNode for TokenTree {
1889 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1979 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1890} 1980}
1891impl TokenTree {} 1981impl TokenTree {}
1982
1892#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1983#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1893pub struct TypeParamList { 1984pub struct TypeParamList {
1894 pub(crate) syntax: SyntaxNode, 1985 pub(crate) syntax: SyntaxNode,
@@ -1912,6 +2003,7 @@ impl TypeParamList {
1912 pub fn const_params(&self) -> AstChildren<ConstParam> { support::children(&self.syntax) } 2003 pub fn const_params(&self) -> AstChildren<ConstParam> { support::children(&self.syntax) }
1913 pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) } 2004 pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
1914} 2005}
2006
1915#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2007#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1916pub struct TypeParam { 2008pub struct TypeParam {
1917 pub(crate) syntax: SyntaxNode, 2009 pub(crate) syntax: SyntaxNode,
@@ -1934,6 +2026,7 @@ impl TypeParam {
1934 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } 2026 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1935 pub fn default_type(&self) -> Option<TypeRef> { support::child(&self.syntax) } 2027 pub fn default_type(&self) -> Option<TypeRef> { support::child(&self.syntax) }
1936} 2028}
2029
1937#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2030#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1938pub struct ConstParam { 2031pub struct ConstParam {
1939 pub(crate) syntax: SyntaxNode, 2032 pub(crate) syntax: SyntaxNode,
@@ -1956,6 +2049,7 @@ impl ConstParam {
1956 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } 2049 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1957 pub fn default_val(&self) -> Option<Expr> { support::child(&self.syntax) } 2050 pub fn default_val(&self) -> Option<Expr> { support::child(&self.syntax) }
1958} 2051}
2052
1959#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2053#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1960pub struct LifetimeParam { 2054pub struct LifetimeParam {
1961 pub(crate) syntax: SyntaxNode, 2055 pub(crate) syntax: SyntaxNode,
@@ -1977,6 +2071,7 @@ impl LifetimeParam {
1977 support::token(&self.syntax, T![lifetime]) 2071 support::token(&self.syntax, T![lifetime])
1978 } 2072 }
1979} 2073}
2074
1980#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2075#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1981pub struct TypeBound { 2076pub struct TypeBound {
1982 pub(crate) syntax: SyntaxNode, 2077 pub(crate) syntax: SyntaxNode,
@@ -1999,6 +2094,7 @@ impl TypeBound {
1999 pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } 2094 pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
2000 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 2095 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
2001} 2096}
2097
2002#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2098#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2003pub struct TypeBoundList { 2099pub struct TypeBoundList {
2004 pub(crate) syntax: SyntaxNode, 2100 pub(crate) syntax: SyntaxNode,
@@ -2017,6 +2113,7 @@ impl AstNode for TypeBoundList {
2017impl TypeBoundList { 2113impl TypeBoundList {
2018 pub fn bounds(&self) -> AstChildren<TypeBound> { support::children(&self.syntax) } 2114 pub fn bounds(&self) -> AstChildren<TypeBound> { support::children(&self.syntax) }
2019} 2115}
2116
2020#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2117#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2021pub struct WherePred { 2118pub struct WherePred {
2022 pub(crate) syntax: SyntaxNode, 2119 pub(crate) syntax: SyntaxNode,
@@ -2039,6 +2136,7 @@ impl WherePred {
2039 } 2136 }
2040 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 2137 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
2041} 2138}
2139
2042#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2140#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2043pub struct WhereClause { 2141pub struct WhereClause {
2044 pub(crate) syntax: SyntaxNode, 2142 pub(crate) syntax: SyntaxNode,
@@ -2058,6 +2156,7 @@ impl WhereClause {
2058 pub fn where_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![where]) } 2156 pub fn where_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![where]) }
2059 pub fn predicates(&self) -> AstChildren<WherePred> { support::children(&self.syntax) } 2157 pub fn predicates(&self) -> AstChildren<WherePred> { support::children(&self.syntax) }
2060} 2158}
2159
2061#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2160#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2062pub struct Abi { 2161pub struct Abi {
2063 pub(crate) syntax: SyntaxNode, 2162 pub(crate) syntax: SyntaxNode,
@@ -2074,6 +2173,7 @@ impl AstNode for Abi {
2074 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2173 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2075} 2174}
2076impl Abi {} 2175impl Abi {}
2176
2077#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2177#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2078pub struct ExprStmt { 2178pub struct ExprStmt {
2079 pub(crate) syntax: SyntaxNode, 2179 pub(crate) syntax: SyntaxNode,
@@ -2094,6 +2194,7 @@ impl ExprStmt {
2094 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 2194 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2095 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } 2195 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
2096} 2196}
2197
2097#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2198#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2098pub struct LetStmt { 2199pub struct LetStmt {
2099 pub(crate) syntax: SyntaxNode, 2200 pub(crate) syntax: SyntaxNode,
@@ -2118,6 +2219,7 @@ impl LetStmt {
2118 pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) } 2219 pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) }
2119 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } 2220 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
2120} 2221}
2222
2121#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2223#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2122pub struct Condition { 2224pub struct Condition {
2123 pub(crate) syntax: SyntaxNode, 2225 pub(crate) syntax: SyntaxNode,
@@ -2139,6 +2241,7 @@ impl Condition {
2139 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } 2241 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
2140 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 2242 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2141} 2243}
2244
2142#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2245#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2143pub struct Block { 2246pub struct Block {
2144 pub(crate) syntax: SyntaxNode, 2247 pub(crate) syntax: SyntaxNode,
@@ -2162,6 +2265,7 @@ impl Block {
2162 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 2265 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2163 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } 2266 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
2164} 2267}
2268
2165#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2269#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2166pub struct ParamList { 2270pub struct ParamList {
2167 pub(crate) syntax: SyntaxNode, 2271 pub(crate) syntax: SyntaxNode,
@@ -2183,6 +2287,7 @@ impl ParamList {
2183 pub fn params(&self) -> AstChildren<Param> { support::children(&self.syntax) } 2287 pub fn params(&self) -> AstChildren<Param> { support::children(&self.syntax) }
2184 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } 2288 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
2185} 2289}
2290
2186#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2291#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2187pub struct SelfParam { 2292pub struct SelfParam {
2188 pub(crate) syntax: SyntaxNode, 2293 pub(crate) syntax: SyntaxNode,
@@ -2207,6 +2312,7 @@ impl SelfParam {
2207 } 2312 }
2208 pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) } 2313 pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) }
2209} 2314}
2315
2210#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2316#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2211pub struct Param { 2317pub struct Param {
2212 pub(crate) syntax: SyntaxNode, 2318 pub(crate) syntax: SyntaxNode,
@@ -2228,6 +2334,7 @@ impl Param {
2228 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 2334 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
2229 pub fn dotdotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![...]) } 2335 pub fn dotdotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![...]) }
2230} 2336}
2337
2231#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2338#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2232pub struct UseItem { 2339pub struct UseItem {
2233 pub(crate) syntax: SyntaxNode, 2340 pub(crate) syntax: SyntaxNode,
@@ -2249,6 +2356,7 @@ impl UseItem {
2249 pub fn use_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![use]) } 2356 pub fn use_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![use]) }
2250 pub fn use_tree(&self) -> Option<UseTree> { support::child(&self.syntax) } 2357 pub fn use_tree(&self) -> Option<UseTree> { support::child(&self.syntax) }
2251} 2358}
2359
2252#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2360#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2253pub struct UseTree { 2361pub struct UseTree {
2254 pub(crate) syntax: SyntaxNode, 2362 pub(crate) syntax: SyntaxNode,
@@ -2270,6 +2378,7 @@ impl UseTree {
2270 pub fn use_tree_list(&self) -> Option<UseTreeList> { support::child(&self.syntax) } 2378 pub fn use_tree_list(&self) -> Option<UseTreeList> { support::child(&self.syntax) }
2271 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) } 2379 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) }
2272} 2380}
2381
2273#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2382#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2274pub struct Alias { 2383pub struct Alias {
2275 pub(crate) syntax: SyntaxNode, 2384 pub(crate) syntax: SyntaxNode,
@@ -2289,6 +2398,7 @@ impl ast::NameOwner for Alias {}
2289impl Alias { 2398impl Alias {
2290 pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) } 2399 pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) }
2291} 2400}
2401
2292#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2402#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2293pub struct UseTreeList { 2403pub struct UseTreeList {
2294 pub(crate) syntax: SyntaxNode, 2404 pub(crate) syntax: SyntaxNode,
@@ -2309,6 +2419,7 @@ impl UseTreeList {
2309 pub fn use_trees(&self) -> AstChildren<UseTree> { support::children(&self.syntax) } 2419 pub fn use_trees(&self) -> AstChildren<UseTree> { support::children(&self.syntax) }
2310 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } 2420 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
2311} 2421}
2422
2312#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2423#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2313pub struct ExternCrateItem { 2424pub struct ExternCrateItem {
2314 pub(crate) syntax: SyntaxNode, 2425 pub(crate) syntax: SyntaxNode,
@@ -2332,6 +2443,7 @@ impl ExternCrateItem {
2332 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 2443 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
2333 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) } 2444 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) }
2334} 2445}
2446
2335#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2447#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2336pub struct ArgList { 2448pub struct ArgList {
2337 pub(crate) syntax: SyntaxNode, 2449 pub(crate) syntax: SyntaxNode,
@@ -2352,6 +2464,7 @@ impl ArgList {
2352 pub fn args(&self) -> AstChildren<Expr> { support::children(&self.syntax) } 2464 pub fn args(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
2353 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } 2465 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
2354} 2466}
2467
2355#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2468#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2356pub struct Path { 2469pub struct Path {
2357 pub(crate) syntax: SyntaxNode, 2470 pub(crate) syntax: SyntaxNode,
@@ -2371,6 +2484,7 @@ impl Path {
2371 pub fn segment(&self) -> Option<PathSegment> { support::child(&self.syntax) } 2484 pub fn segment(&self) -> Option<PathSegment> { support::child(&self.syntax) }
2372 pub fn qualifier(&self) -> Option<Path> { support::child(&self.syntax) } 2485 pub fn qualifier(&self) -> Option<Path> { support::child(&self.syntax) }
2373} 2486}
2487
2374#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2488#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2375pub struct PathSegment { 2489pub struct PathSegment {
2376 pub(crate) syntax: SyntaxNode, 2490 pub(crate) syntax: SyntaxNode,
@@ -2396,6 +2510,7 @@ impl PathSegment {
2396 pub fn path_type(&self) -> Option<PathType> { support::child(&self.syntax) } 2510 pub fn path_type(&self) -> Option<PathType> { support::child(&self.syntax) }
2397 pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) } 2511 pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
2398} 2512}
2513
2399#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2514#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2400pub struct TypeArgList { 2515pub struct TypeArgList {
2401 pub(crate) syntax: SyntaxNode, 2516 pub(crate) syntax: SyntaxNode,
@@ -2421,6 +2536,7 @@ impl TypeArgList {
2421 pub fn const_args(&self) -> AstChildren<ConstArg> { support::children(&self.syntax) } 2536 pub fn const_args(&self) -> AstChildren<ConstArg> { support::children(&self.syntax) }
2422 pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) } 2537 pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
2423} 2538}
2539
2424#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2540#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2425pub struct TypeArg { 2541pub struct TypeArg {
2426 pub(crate) syntax: SyntaxNode, 2542 pub(crate) syntax: SyntaxNode,
@@ -2439,6 +2555,7 @@ impl AstNode for TypeArg {
2439impl TypeArg { 2555impl TypeArg {
2440 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 2556 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
2441} 2557}
2558
2442#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2559#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2443pub struct AssocTypeArg { 2560pub struct AssocTypeArg {
2444 pub(crate) syntax: SyntaxNode, 2561 pub(crate) syntax: SyntaxNode,
@@ -2460,6 +2577,7 @@ impl AssocTypeArg {
2460 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } 2577 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
2461 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 2578 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
2462} 2579}
2580
2463#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2581#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2464pub struct LifetimeArg { 2582pub struct LifetimeArg {
2465 pub(crate) syntax: SyntaxNode, 2583 pub(crate) syntax: SyntaxNode,
@@ -2480,6 +2598,7 @@ impl LifetimeArg {
2480 support::token(&self.syntax, T![lifetime]) 2598 support::token(&self.syntax, T![lifetime])
2481 } 2599 }
2482} 2600}
2601
2483#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2602#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2484pub struct ConstArg { 2603pub struct ConstArg {
2485 pub(crate) syntax: SyntaxNode, 2604 pub(crate) syntax: SyntaxNode,
@@ -2500,6 +2619,7 @@ impl ConstArg {
2500 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } 2619 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
2501 pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) } 2620 pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
2502} 2621}
2622
2503#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2623#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2504pub struct MacroItems { 2624pub struct MacroItems {
2505 pub(crate) syntax: SyntaxNode, 2625 pub(crate) syntax: SyntaxNode,
@@ -2517,6 +2637,7 @@ impl AstNode for MacroItems {
2517} 2637}
2518impl ast::ModuleItemOwner for MacroItems {} 2638impl ast::ModuleItemOwner for MacroItems {}
2519impl MacroItems {} 2639impl MacroItems {}
2640
2520#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2641#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2521pub struct MacroStmts { 2642pub struct MacroStmts {
2522 pub(crate) syntax: SyntaxNode, 2643 pub(crate) syntax: SyntaxNode,
@@ -2536,6 +2657,7 @@ impl MacroStmts {
2536 pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) } 2657 pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) }
2537 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 2658 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2538} 2659}
2660
2539#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2661#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2540pub struct ExternItemList { 2662pub struct ExternItemList {
2541 pub(crate) syntax: SyntaxNode, 2663 pub(crate) syntax: SyntaxNode,
@@ -2557,6 +2679,7 @@ impl ExternItemList {
2557 pub fn extern_items(&self) -> AstChildren<ExternItem> { support::children(&self.syntax) } 2679 pub fn extern_items(&self) -> AstChildren<ExternItem> { support::children(&self.syntax) }
2558 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } 2680 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
2559} 2681}
2682
2560#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2683#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2561pub struct ExternBlock { 2684pub struct ExternBlock {
2562 pub(crate) syntax: SyntaxNode, 2685 pub(crate) syntax: SyntaxNode,
@@ -2576,6 +2699,7 @@ impl ExternBlock {
2576 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) } 2699 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
2577 pub fn extern_item_list(&self) -> Option<ExternItemList> { support::child(&self.syntax) } 2700 pub fn extern_item_list(&self) -> Option<ExternItemList> { support::child(&self.syntax) }
2578} 2701}
2702
2579#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2703#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2580pub struct MetaItem { 2704pub struct MetaItem {
2581 pub(crate) syntax: SyntaxNode, 2705 pub(crate) syntax: SyntaxNode,
@@ -2597,6 +2721,7 @@ impl MetaItem {
2597 pub fn attr_input(&self) -> Option<AttrInput> { support::child(&self.syntax) } 2721 pub fn attr_input(&self) -> Option<AttrInput> { support::child(&self.syntax) }
2598 pub fn nested_meta_items(&self) -> AstChildren<MetaItem> { support::children(&self.syntax) } 2722 pub fn nested_meta_items(&self) -> AstChildren<MetaItem> { support::children(&self.syntax) }
2599} 2723}
2724
2600#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2725#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2601pub struct MacroDef { 2726pub struct MacroDef {
2602 pub(crate) syntax: SyntaxNode, 2727 pub(crate) syntax: SyntaxNode,
@@ -2616,6 +2741,7 @@ impl MacroDef {
2616 pub fn name(&self) -> Option<Name> { support::child(&self.syntax) } 2741 pub fn name(&self) -> Option<Name> { support::child(&self.syntax) }
2617 pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) } 2742 pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
2618} 2743}
2744
2619#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2745#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2620pub enum NominalDef { 2746pub enum NominalDef {
2621 StructDef(StructDef), 2747 StructDef(StructDef),
@@ -2658,6 +2784,7 @@ impl AstNode for NominalDef {
2658impl ast::NameOwner for NominalDef {} 2784impl ast::NameOwner for NominalDef {}
2659impl ast::TypeParamsOwner for NominalDef {} 2785impl ast::TypeParamsOwner for NominalDef {}
2660impl ast::AttrsOwner for NominalDef {} 2786impl ast::AttrsOwner for NominalDef {}
2787
2661#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2788#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2662pub enum GenericParam { 2789pub enum GenericParam {
2663 LifetimeParam(LifetimeParam), 2790 LifetimeParam(LifetimeParam),
@@ -2697,6 +2824,7 @@ impl AstNode for GenericParam {
2697 } 2824 }
2698 } 2825 }
2699} 2826}
2827
2700#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2828#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2701pub enum GenericArg { 2829pub enum GenericArg {
2702 LifetimeArg(LifetimeArg), 2830 LifetimeArg(LifetimeArg),
@@ -2742,6 +2870,7 @@ impl AstNode for GenericArg {
2742 } 2870 }
2743 } 2871 }
2744} 2872}
2873
2745#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2874#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2746pub enum TypeRef { 2875pub enum TypeRef {
2747 ParenType(ParenType), 2876 ParenType(ParenType),
@@ -2843,6 +2972,7 @@ impl AstNode for TypeRef {
2843 } 2972 }
2844 } 2973 }
2845} 2974}
2975
2846#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2976#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2847pub enum ModuleItem { 2977pub enum ModuleItem {
2848 StructDef(StructDef), 2978 StructDef(StructDef),
@@ -2953,6 +3083,7 @@ impl AstNode for ModuleItem {
2953impl ast::NameOwner for ModuleItem {} 3083impl ast::NameOwner for ModuleItem {}
2954impl ast::AttrsOwner for ModuleItem {} 3084impl ast::AttrsOwner for ModuleItem {}
2955impl ast::VisibilityOwner for ModuleItem {} 3085impl ast::VisibilityOwner for ModuleItem {}
3086
2956#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3087#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2957pub enum ImplItem { 3088pub enum ImplItem {
2958 FnDef(FnDef), 3089 FnDef(FnDef),
@@ -2994,6 +3125,7 @@ impl AstNode for ImplItem {
2994} 3125}
2995impl ast::NameOwner for ImplItem {} 3126impl ast::NameOwner for ImplItem {}
2996impl ast::AttrsOwner for ImplItem {} 3127impl ast::AttrsOwner for ImplItem {}
3128
2997#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3129#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2998pub enum ExternItem { 3130pub enum ExternItem {
2999 FnDef(FnDef), 3131 FnDef(FnDef),
@@ -3030,6 +3162,7 @@ impl AstNode for ExternItem {
3030impl ast::NameOwner for ExternItem {} 3162impl ast::NameOwner for ExternItem {}
3031impl ast::AttrsOwner for ExternItem {} 3163impl ast::AttrsOwner for ExternItem {}
3032impl ast::VisibilityOwner for ExternItem {} 3164impl ast::VisibilityOwner for ExternItem {}
3165
3033#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3166#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3034pub enum Expr { 3167pub enum Expr {
3035 TupleExpr(TupleExpr), 3168 TupleExpr(TupleExpr),
@@ -3243,6 +3376,7 @@ impl AstNode for Expr {
3243 } 3376 }
3244} 3377}
3245impl ast::AttrsOwner for Expr {} 3378impl ast::AttrsOwner for Expr {}
3379
3246#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3380#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3247pub enum Pat { 3381pub enum Pat {
3248 OrPat(OrPat), 3382 OrPat(OrPat),
@@ -3356,6 +3490,7 @@ impl AstNode for Pat {
3356 } 3490 }
3357 } 3491 }
3358} 3492}
3493
3359#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3494#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3360pub enum RecordInnerPat { 3495pub enum RecordInnerPat {
3361 RecordFieldPat(RecordFieldPat), 3496 RecordFieldPat(RecordFieldPat),
@@ -3389,6 +3524,7 @@ impl AstNode for RecordInnerPat {
3389 } 3524 }
3390 } 3525 }
3391} 3526}
3527
3392#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3528#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3393pub enum AttrInput { 3529pub enum AttrInput {
3394 Literal(Literal), 3530 Literal(Literal),
@@ -3422,6 +3558,7 @@ impl AstNode for AttrInput {
3422 } 3558 }
3423 } 3559 }
3424} 3560}
3561
3425#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3562#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3426pub enum Stmt { 3563pub enum Stmt {
3427 LetStmt(LetStmt), 3564 LetStmt(LetStmt),
@@ -3455,6 +3592,7 @@ impl AstNode for Stmt {
3455 } 3592 }
3456 } 3593 }
3457} 3594}
3595
3458#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3596#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3459pub enum FieldDefList { 3597pub enum FieldDefList {
3460 RecordFieldDefList(RecordFieldDefList), 3598 RecordFieldDefList(RecordFieldDefList),
diff --git a/crates/ra_syntax/src/ast/generated/tokens.rs b/crates/ra_syntax/src/ast/generated/tokens.rs
index 3950e2b7f..f91befaac 100644
--- a/crates/ra_syntax/src/ast/generated/tokens.rs
+++ b/crates/ra_syntax/src/ast/generated/tokens.rs
@@ -5,6 +5,7 @@ use crate::{
5 SyntaxKind::{self, *}, 5 SyntaxKind::{self, *},
6 SyntaxToken, 6 SyntaxToken,
7}; 7};
8
8#[derive(Debug, Clone, PartialEq, Eq, Hash)] 9#[derive(Debug, Clone, PartialEq, Eq, Hash)]
9pub struct Whitespace { 10pub struct Whitespace {
10 pub(crate) syntax: SyntaxToken, 11 pub(crate) syntax: SyntaxToken,
@@ -25,6 +26,7 @@ impl AstToken for Whitespace {
25 } 26 }
26 fn syntax(&self) -> &SyntaxToken { &self.syntax } 27 fn syntax(&self) -> &SyntaxToken { &self.syntax }
27} 28}
29
28#[derive(Debug, Clone, PartialEq, Eq, Hash)] 30#[derive(Debug, Clone, PartialEq, Eq, Hash)]
29pub struct Comment { 31pub struct Comment {
30 pub(crate) syntax: SyntaxToken, 32 pub(crate) syntax: SyntaxToken,
@@ -45,6 +47,7 @@ impl AstToken for Comment {
45 } 47 }
46 fn syntax(&self) -> &SyntaxToken { &self.syntax } 48 fn syntax(&self) -> &SyntaxToken { &self.syntax }
47} 49}
50
48#[derive(Debug, Clone, PartialEq, Eq, Hash)] 51#[derive(Debug, Clone, PartialEq, Eq, Hash)]
49pub struct String { 52pub struct String {
50 pub(crate) syntax: SyntaxToken, 53 pub(crate) syntax: SyntaxToken,
@@ -65,6 +68,7 @@ impl AstToken for String {
65 } 68 }
66 fn syntax(&self) -> &SyntaxToken { &self.syntax } 69 fn syntax(&self) -> &SyntaxToken { &self.syntax }
67} 70}
71
68#[derive(Debug, Clone, PartialEq, Eq, Hash)] 72#[derive(Debug, Clone, PartialEq, Eq, Hash)]
69pub struct RawString { 73pub struct RawString {
70 pub(crate) syntax: SyntaxToken, 74 pub(crate) syntax: SyntaxToken,