aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/generated/nodes.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-04-09 22:47:34 +0100
committerGitHub <[email protected]>2020-04-09 22:47:34 +0100
commit176f7f61175bc433c56083a758bd7a28a8ae31f8 (patch)
treecca4821454502279317323fbc63dccdb9c68c5b9 /crates/ra_syntax/src/ast/generated/nodes.rs
parenteb07803e8106a66edfd80d078337dae240e92828 (diff)
parent30084a56a5731343bd4cec727646a6c55900234f (diff)
Merge #3923
3923: Cleanup keyword accessors r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/ast/generated/nodes.rs')
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs144
1 files changed, 71 insertions, 73 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index bcbfd1129..20f663046 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -4,7 +4,7 @@ use super::tokens::*;
4use crate::{ 4use crate::{
5 ast::{self, support, AstChildren, AstNode}, 5 ast::{self, support, AstChildren, AstNode},
6 SyntaxKind::{self, *}, 6 SyntaxKind::{self, *},
7 SyntaxNode, 7 SyntaxNode, SyntaxToken,
8}; 8};
9#[derive(Debug, Clone, PartialEq, Eq, Hash)] 9#[derive(Debug, Clone, PartialEq, Eq, Hash)]
10pub struct SourceFile { 10pub struct SourceFile {
@@ -22,7 +22,6 @@ impl AstNode for SourceFile {
22 fn syntax(&self) -> &SyntaxNode { &self.syntax } 22 fn syntax(&self) -> &SyntaxNode { &self.syntax }
23} 23}
24impl ast::ModuleItemOwner for SourceFile {} 24impl ast::ModuleItemOwner for SourceFile {}
25impl ast::FnDefOwner for SourceFile {}
26impl ast::AttrsOwner for SourceFile {} 25impl ast::AttrsOwner for SourceFile {}
27impl SourceFile { 26impl SourceFile {
28 pub fn modules(&self) -> AstChildren<Module> { support::children(&self.syntax) } 27 pub fn modules(&self) -> AstChildren<Module> { support::children(&self.syntax) }
@@ -49,11 +48,11 @@ impl ast::DocCommentsOwner for FnDef {}
49impl ast::AttrsOwner for FnDef {} 48impl ast::AttrsOwner for FnDef {}
50impl FnDef { 49impl FnDef {
51 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) } 50 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
52 pub fn const_kw_token(&self) -> Option<ConstKw> { support::token(&self.syntax) } 51 pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, CONST_KW) }
53 pub fn default_kw_token(&self) -> Option<DefaultKw> { support::token(&self.syntax) } 52 pub fn default_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, DEFAULT_KW) }
54 pub fn async_kw_token(&self) -> Option<AsyncKw> { support::token(&self.syntax) } 53 pub fn async_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, ASYNC_KW) }
55 pub fn unsafe_kw_token(&self) -> Option<UnsafeKw> { support::token(&self.syntax) } 54 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, UNSAFE_KW) }
56 pub fn fn_kw_token(&self) -> Option<FnKw> { support::token(&self.syntax) } 55 pub fn fn_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, FN_KW) }
57 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } 56 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
58 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } 57 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
59 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } 58 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
@@ -99,7 +98,7 @@ impl ast::TypeParamsOwner for StructDef {}
99impl ast::AttrsOwner for StructDef {} 98impl ast::AttrsOwner for StructDef {}
100impl ast::DocCommentsOwner for StructDef {} 99impl ast::DocCommentsOwner for StructDef {}
101impl StructDef { 100impl StructDef {
102 pub fn struct_kw_token(&self) -> Option<StructKw> { support::token(&self.syntax) } 101 pub fn struct_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, STRUCT_KW) }
103 pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) } 102 pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) }
104 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } 103 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) }
105} 104}
@@ -124,7 +123,7 @@ impl ast::TypeParamsOwner for UnionDef {}
124impl ast::AttrsOwner for UnionDef {} 123impl ast::AttrsOwner for UnionDef {}
125impl ast::DocCommentsOwner for UnionDef {} 124impl ast::DocCommentsOwner for UnionDef {}
126impl UnionDef { 125impl UnionDef {
127 pub fn union_kw_token(&self) -> Option<UnionKw> { support::token(&self.syntax) } 126 pub fn union_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, UNION_KW) }
128 pub fn record_field_def_list(&self) -> Option<RecordFieldDefList> { 127 pub fn record_field_def_list(&self) -> Option<RecordFieldDefList> {
129 support::child(&self.syntax) 128 support::child(&self.syntax)
130 } 129 }
@@ -231,7 +230,7 @@ impl ast::TypeParamsOwner for EnumDef {}
231impl ast::AttrsOwner for EnumDef {} 230impl ast::AttrsOwner for EnumDef {}
232impl ast::DocCommentsOwner for EnumDef {} 231impl ast::DocCommentsOwner for EnumDef {}
233impl EnumDef { 232impl EnumDef {
234 pub fn enum_kw_token(&self) -> Option<EnumKw> { support::token(&self.syntax) } 233 pub fn enum_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, ENUM_KW) }
235 pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) } 234 pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) }
236} 235}
237#[derive(Debug, Clone, PartialEq, Eq, Hash)] 236#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -300,9 +299,9 @@ impl ast::DocCommentsOwner for TraitDef {}
300impl ast::TypeParamsOwner for TraitDef {} 299impl ast::TypeParamsOwner for TraitDef {}
301impl ast::TypeBoundsOwner for TraitDef {} 300impl ast::TypeBoundsOwner for TraitDef {}
302impl TraitDef { 301impl TraitDef {
303 pub fn unsafe_kw_token(&self) -> Option<UnsafeKw> { support::token(&self.syntax) } 302 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, UNSAFE_KW) }
304 pub fn auto_kw_token(&self) -> Option<AutoKw> { support::token(&self.syntax) } 303 pub fn auto_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, AUTO_KW) }
305 pub fn trait_kw_token(&self) -> Option<TraitKw> { support::token(&self.syntax) } 304 pub fn trait_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, TRAIT_KW) }
306 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } 305 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
307} 306}
308#[derive(Debug, Clone, PartialEq, Eq, Hash)] 307#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -325,7 +324,7 @@ impl ast::NameOwner for Module {}
325impl ast::AttrsOwner for Module {} 324impl ast::AttrsOwner for Module {}
326impl ast::DocCommentsOwner for Module {} 325impl ast::DocCommentsOwner for Module {}
327impl Module { 326impl Module {
328 pub fn mod_kw_token(&self) -> Option<ModKw> { support::token(&self.syntax) } 327 pub fn mod_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MOD_KW) }
329 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } 328 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
330 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } 329 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) }
331} 330}
@@ -344,7 +343,6 @@ impl AstNode for ItemList {
344 } 343 }
345 fn syntax(&self) -> &SyntaxNode { &self.syntax } 344 fn syntax(&self) -> &SyntaxNode { &self.syntax }
346} 345}
347impl ast::FnDefOwner for ItemList {}
348impl ast::ModuleItemOwner for ItemList {} 346impl ast::ModuleItemOwner for ItemList {}
349impl ItemList { 347impl ItemList {
350 pub fn l_curly_token(&self) -> Option<LCurly> { support::token(&self.syntax) } 348 pub fn l_curly_token(&self) -> Option<LCurly> { support::token(&self.syntax) }
@@ -373,8 +371,8 @@ impl ast::AttrsOwner for ConstDef {}
373impl ast::DocCommentsOwner for ConstDef {} 371impl ast::DocCommentsOwner for ConstDef {}
374impl ast::TypeAscriptionOwner for ConstDef {} 372impl ast::TypeAscriptionOwner for ConstDef {}
375impl ConstDef { 373impl ConstDef {
376 pub fn default_kw_token(&self) -> Option<DefaultKw> { support::token(&self.syntax) } 374 pub fn default_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, DEFAULT_KW) }
377 pub fn const_kw_token(&self) -> Option<ConstKw> { support::token(&self.syntax) } 375 pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, CONST_KW) }
378 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } 376 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
379 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } 377 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
380 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } 378 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) }
@@ -401,8 +399,8 @@ impl ast::AttrsOwner for StaticDef {}
401impl ast::DocCommentsOwner for StaticDef {} 399impl ast::DocCommentsOwner for StaticDef {}
402impl ast::TypeAscriptionOwner for StaticDef {} 400impl ast::TypeAscriptionOwner for StaticDef {}
403impl StaticDef { 401impl StaticDef {
404 pub fn static_kw_token(&self) -> Option<StaticKw> { support::token(&self.syntax) } 402 pub fn static_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, STATIC_KW) }
405 pub fn mut_kw_token(&self) -> Option<MutKw> { support::token(&self.syntax) } 403 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MUT_KW) }
406 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } 404 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
407 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } 405 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
408 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } 406 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) }
@@ -429,8 +427,8 @@ impl ast::AttrsOwner for TypeAliasDef {}
429impl ast::DocCommentsOwner for TypeAliasDef {} 427impl ast::DocCommentsOwner for TypeAliasDef {}
430impl ast::TypeBoundsOwner for TypeAliasDef {} 428impl ast::TypeBoundsOwner for TypeAliasDef {}
431impl TypeAliasDef { 429impl TypeAliasDef {
432 pub fn default_kw_token(&self) -> Option<DefaultKw> { support::token(&self.syntax) } 430 pub fn default_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, DEFAULT_KW) }
433 pub fn type_kw_token(&self) -> Option<TypeKw> { support::token(&self.syntax) } 431 pub fn type_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, TYPE_KW) }
434 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } 432 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
435 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 433 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
436 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } 434 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) }
@@ -453,12 +451,12 @@ impl AstNode for ImplDef {
453impl ast::TypeParamsOwner for ImplDef {} 451impl ast::TypeParamsOwner for ImplDef {}
454impl ast::AttrsOwner for ImplDef {} 452impl ast::AttrsOwner for ImplDef {}
455impl ImplDef { 453impl ImplDef {
456 pub fn default_kw_token(&self) -> Option<DefaultKw> { support::token(&self.syntax) } 454 pub fn default_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, DEFAULT_KW) }
457 pub fn const_kw_token(&self) -> Option<ConstKw> { support::token(&self.syntax) } 455 pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, CONST_KW) }
458 pub fn unsafe_kw_token(&self) -> Option<UnsafeKw> { support::token(&self.syntax) } 456 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, UNSAFE_KW) }
459 pub fn impl_kw_token(&self) -> Option<ImplKw> { support::token(&self.syntax) } 457 pub fn impl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, IMPL_KW) }
460 pub fn excl_token(&self) -> Option<Excl> { support::token(&self.syntax) } 458 pub fn excl_token(&self) -> Option<Excl> { support::token(&self.syntax) }
461 pub fn for_kw_token(&self) -> Option<ForKw> { support::token(&self.syntax) } 459 pub fn for_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, FOR_KW) }
462 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } 460 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
463} 461}
464#[derive(Debug, Clone, PartialEq, Eq, Hash)] 462#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -554,8 +552,8 @@ impl AstNode for PointerType {
554} 552}
555impl PointerType { 553impl PointerType {
556 pub fn star_token(&self) -> Option<Star> { support::token(&self.syntax) } 554 pub fn star_token(&self) -> Option<Star> { support::token(&self.syntax) }
557 pub fn const_kw_token(&self) -> Option<ConstKw> { support::token(&self.syntax) } 555 pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, CONST_KW) }
558 pub fn mut_kw_token(&self) -> Option<MutKw> { support::token(&self.syntax) } 556 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MUT_KW) }
559 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 557 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
560} 558}
561#[derive(Debug, Clone, PartialEq, Eq, Hash)] 559#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -618,7 +616,7 @@ impl AstNode for ReferenceType {
618impl ReferenceType { 616impl ReferenceType {
619 pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } 617 pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) }
620 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } 618 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) }
621 pub fn mut_kw_token(&self) -> Option<MutKw> { support::token(&self.syntax) } 619 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MUT_KW) }
622 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 620 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
623} 621}
624#[derive(Debug, Clone, PartialEq, Eq, Hash)] 622#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -656,8 +654,8 @@ impl AstNode for FnPointerType {
656} 654}
657impl FnPointerType { 655impl FnPointerType {
658 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) } 656 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
659 pub fn unsafe_kw_token(&self) -> Option<UnsafeKw> { support::token(&self.syntax) } 657 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, UNSAFE_KW) }
660 pub fn fn_kw_token(&self) -> Option<FnKw> { support::token(&self.syntax) } 658 pub fn fn_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, FN_KW) }
661 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } 659 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
662 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } 660 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
663} 661}
@@ -677,7 +675,7 @@ impl AstNode for ForType {
677 fn syntax(&self) -> &SyntaxNode { &self.syntax } 675 fn syntax(&self) -> &SyntaxNode { &self.syntax }
678} 676}
679impl ForType { 677impl ForType {
680 pub fn for_kw_token(&self) -> Option<ForKw> { support::token(&self.syntax) } 678 pub fn for_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, FOR_KW) }
681 pub fn type_param_list(&self) -> Option<TypeParamList> { support::child(&self.syntax) } 679 pub fn type_param_list(&self) -> Option<TypeParamList> { support::child(&self.syntax) }
682 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 680 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
683} 681}
@@ -698,7 +696,7 @@ impl AstNode for ImplTraitType {
698} 696}
699impl ast::TypeBoundsOwner for ImplTraitType {} 697impl ast::TypeBoundsOwner for ImplTraitType {}
700impl ImplTraitType { 698impl ImplTraitType {
701 pub fn impl_kw_token(&self) -> Option<ImplKw> { support::token(&self.syntax) } 699 pub fn impl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, IMPL_KW) }
702} 700}
703#[derive(Debug, Clone, PartialEq, Eq, Hash)] 701#[derive(Debug, Clone, PartialEq, Eq, Hash)]
704pub struct DynTraitType { 702pub struct DynTraitType {
@@ -717,7 +715,7 @@ impl AstNode for DynTraitType {
717} 715}
718impl ast::TypeBoundsOwner for DynTraitType {} 716impl ast::TypeBoundsOwner for DynTraitType {}
719impl DynTraitType { 717impl DynTraitType {
720 pub fn dyn_kw_token(&self) -> Option<DynKw> { support::token(&self.syntax) } 718 pub fn dyn_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, DYN_KW) }
721} 719}
722#[derive(Debug, Clone, PartialEq, Eq, Hash)] 720#[derive(Debug, Clone, PartialEq, Eq, Hash)]
723pub struct TupleExpr { 721pub struct TupleExpr {
@@ -818,9 +816,9 @@ impl AstNode for LambdaExpr {
818} 816}
819impl ast::AttrsOwner for LambdaExpr {} 817impl ast::AttrsOwner for LambdaExpr {}
820impl LambdaExpr { 818impl LambdaExpr {
821 pub fn static_kw_token(&self) -> Option<StaticKw> { support::token(&self.syntax) } 819 pub fn static_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, STATIC_KW) }
822 pub fn async_kw_token(&self) -> Option<AsyncKw> { support::token(&self.syntax) } 820 pub fn async_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, ASYNC_KW) }
823 pub fn move_kw_token(&self) -> Option<MoveKw> { support::token(&self.syntax) } 821 pub fn move_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MOVE_KW) }
824 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } 822 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
825 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } 823 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
826 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } 824 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
@@ -842,7 +840,7 @@ impl AstNode for IfExpr {
842} 840}
843impl ast::AttrsOwner for IfExpr {} 841impl ast::AttrsOwner for IfExpr {}
844impl IfExpr { 842impl IfExpr {
845 pub fn if_kw_token(&self) -> Option<IfKw> { support::token(&self.syntax) } 843 pub fn if_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, IF_KW) }
846 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) } 844 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) }
847} 845}
848#[derive(Debug, Clone, PartialEq, Eq, Hash)] 846#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -863,7 +861,7 @@ impl AstNode for LoopExpr {
863impl ast::AttrsOwner for LoopExpr {} 861impl ast::AttrsOwner for LoopExpr {}
864impl ast::LoopBodyOwner for LoopExpr {} 862impl ast::LoopBodyOwner for LoopExpr {}
865impl LoopExpr { 863impl LoopExpr {
866 pub fn loop_kw_token(&self) -> Option<LoopKw> { support::token(&self.syntax) } 864 pub fn loop_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, LOOP_KW) }
867} 865}
868#[derive(Debug, Clone, PartialEq, Eq, Hash)] 866#[derive(Debug, Clone, PartialEq, Eq, Hash)]
869pub struct TryBlockExpr { 867pub struct TryBlockExpr {
@@ -882,7 +880,7 @@ impl AstNode for TryBlockExpr {
882} 880}
883impl ast::AttrsOwner for TryBlockExpr {} 881impl ast::AttrsOwner for TryBlockExpr {}
884impl TryBlockExpr { 882impl TryBlockExpr {
885 pub fn try_kw_token(&self) -> Option<TryKw> { support::token(&self.syntax) } 883 pub fn try_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, TRY_KW) }
886 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } 884 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
887} 885}
888#[derive(Debug, Clone, PartialEq, Eq, Hash)] 886#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -903,9 +901,9 @@ impl AstNode for ForExpr {
903impl ast::AttrsOwner for ForExpr {} 901impl ast::AttrsOwner for ForExpr {}
904impl ast::LoopBodyOwner for ForExpr {} 902impl ast::LoopBodyOwner for ForExpr {}
905impl ForExpr { 903impl ForExpr {
906 pub fn for_kw_token(&self) -> Option<ForKw> { support::token(&self.syntax) } 904 pub fn for_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, FOR_KW) }
907 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 905 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
908 pub fn in_kw_token(&self) -> Option<InKw> { support::token(&self.syntax) } 906 pub fn in_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, IN_KW) }
909 pub fn iterable(&self) -> Option<Expr> { support::child(&self.syntax) } 907 pub fn iterable(&self) -> Option<Expr> { support::child(&self.syntax) }
910} 908}
911#[derive(Debug, Clone, PartialEq, Eq, Hash)] 909#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -926,7 +924,7 @@ impl AstNode for WhileExpr {
926impl ast::AttrsOwner for WhileExpr {} 924impl ast::AttrsOwner for WhileExpr {}
927impl ast::LoopBodyOwner for WhileExpr {} 925impl ast::LoopBodyOwner for WhileExpr {}
928impl WhileExpr { 926impl WhileExpr {
929 pub fn while_kw_token(&self) -> Option<WhileKw> { support::token(&self.syntax) } 927 pub fn while_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, WHILE_KW) }
930 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) } 928 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) }
931} 929}
932#[derive(Debug, Clone, PartialEq, Eq, Hash)] 930#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -946,7 +944,9 @@ impl AstNode for ContinueExpr {
946} 944}
947impl ast::AttrsOwner for ContinueExpr {} 945impl ast::AttrsOwner for ContinueExpr {}
948impl ContinueExpr { 946impl ContinueExpr {
949 pub fn continue_kw_token(&self) -> Option<ContinueKw> { support::token(&self.syntax) } 947 pub fn continue_token(&self) -> Option<SyntaxToken> {
948 support::token2(&self.syntax, CONTINUE_KW)
949 }
950 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } 950 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) }
951} 951}
952#[derive(Debug, Clone, PartialEq, Eq, Hash)] 952#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -966,7 +966,7 @@ impl AstNode for BreakExpr {
966} 966}
967impl ast::AttrsOwner for BreakExpr {} 967impl ast::AttrsOwner for BreakExpr {}
968impl BreakExpr { 968impl BreakExpr {
969 pub fn break_kw_token(&self) -> Option<BreakKw> { support::token(&self.syntax) } 969 pub fn break_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, BREAK_KW) }
970 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } 970 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) }
971 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 971 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
972} 972}
@@ -1006,7 +1006,7 @@ impl AstNode for BlockExpr {
1006impl ast::AttrsOwner for BlockExpr {} 1006impl ast::AttrsOwner for BlockExpr {}
1007impl BlockExpr { 1007impl BlockExpr {
1008 pub fn label(&self) -> Option<Label> { support::child(&self.syntax) } 1008 pub fn label(&self) -> Option<Label> { support::child(&self.syntax) }
1009 pub fn unsafe_kw_token(&self) -> Option<UnsafeKw> { support::token(&self.syntax) } 1009 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, UNSAFE_KW) }
1010 pub fn block(&self) -> Option<Block> { support::child(&self.syntax) } 1010 pub fn block(&self) -> Option<Block> { support::child(&self.syntax) }
1011} 1011}
1012#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1012#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1130,7 +1130,7 @@ impl ast::AttrsOwner for AwaitExpr {}
1130impl AwaitExpr { 1130impl AwaitExpr {
1131 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1131 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1132 pub fn dot_token(&self) -> Option<Dot> { support::token(&self.syntax) } 1132 pub fn dot_token(&self) -> Option<Dot> { support::token(&self.syntax) }
1133 pub fn await_kw_token(&self) -> Option<AwaitKw> { support::token(&self.syntax) } 1133 pub fn await_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, AWAIT_KW) }
1134} 1134}
1135#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1135#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1136pub struct TryExpr { 1136pub struct TryExpr {
@@ -1149,7 +1149,7 @@ impl AstNode for TryExpr {
1149} 1149}
1150impl ast::AttrsOwner for TryExpr {} 1150impl ast::AttrsOwner for TryExpr {}
1151impl TryExpr { 1151impl TryExpr {
1152 pub fn try_kw_token(&self) -> Option<TryKw> { support::token(&self.syntax) } 1152 pub fn try_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, TRY_KW) }
1153 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1153 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1154} 1154}
1155#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1155#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1170,7 +1170,7 @@ impl AstNode for CastExpr {
1170impl ast::AttrsOwner for CastExpr {} 1170impl ast::AttrsOwner for CastExpr {}
1171impl CastExpr { 1171impl CastExpr {
1172 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1172 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1173 pub fn as_kw_token(&self) -> Option<AsKw> { support::token(&self.syntax) } 1173 pub fn as_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, AS_KW) }
1174 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 1174 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
1175} 1175}
1176#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1176#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1191,8 +1191,8 @@ impl AstNode for RefExpr {
1191impl ast::AttrsOwner for RefExpr {} 1191impl ast::AttrsOwner for RefExpr {}
1192impl RefExpr { 1192impl RefExpr {
1193 pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } 1193 pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) }
1194 pub fn raw_kw_token(&self) -> Option<RawKw> { support::token(&self.syntax) } 1194 pub fn raw_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, RAW_KW) }
1195 pub fn mut_kw_token(&self) -> Option<MutKw> { support::token(&self.syntax) } 1195 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MUT_KW) }
1196 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1196 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1197} 1197}
1198#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1198#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1232,7 +1232,7 @@ impl AstNode for BoxExpr {
1232} 1232}
1233impl ast::AttrsOwner for BoxExpr {} 1233impl ast::AttrsOwner for BoxExpr {}
1234impl BoxExpr { 1234impl BoxExpr {
1235 pub fn box_kw_token(&self) -> Option<BoxKw> { support::token(&self.syntax) } 1235 pub fn box_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, BOX_KW) }
1236 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1236 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1237} 1237}
1238#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1238#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1308,7 +1308,7 @@ impl AstNode for MatchExpr {
1308} 1308}
1309impl ast::AttrsOwner for MatchExpr {} 1309impl ast::AttrsOwner for MatchExpr {}
1310impl MatchExpr { 1310impl MatchExpr {
1311 pub fn match_kw_token(&self) -> Option<MatchKw> { support::token(&self.syntax) } 1311 pub fn match_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MATCH_KW) }
1312 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1312 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1313 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) }
1314} 1314}
@@ -1371,7 +1371,7 @@ impl AstNode for MatchGuard {
1371 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1371 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1372} 1372}
1373impl MatchGuard { 1373impl MatchGuard {
1374 pub fn if_kw_token(&self) -> Option<IfKw> { support::token(&self.syntax) } 1374 pub fn if_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, IF_KW) }
1375 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1375 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1376} 1376}
1377#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1377#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1491,7 +1491,7 @@ impl AstNode for RefPat {
1491} 1491}
1492impl RefPat { 1492impl RefPat {
1493 pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } 1493 pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) }
1494 pub fn mut_kw_token(&self) -> Option<MutKw> { support::token(&self.syntax) } 1494 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MUT_KW) }
1495 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1495 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1496} 1496}
1497#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1497#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1510,7 +1510,7 @@ impl AstNode for BoxPat {
1510 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1510 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1511} 1511}
1512impl BoxPat { 1512impl BoxPat {
1513 pub fn box_kw_token(&self) -> Option<BoxKw> { support::token(&self.syntax) } 1513 pub fn box_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, BOX_KW) }
1514 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1514 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1515} 1515}
1516#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1516#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1531,8 +1531,8 @@ impl AstNode for BindPat {
1531impl ast::AttrsOwner for BindPat {} 1531impl ast::AttrsOwner for BindPat {}
1532impl ast::NameOwner for BindPat {} 1532impl ast::NameOwner for BindPat {}
1533impl BindPat { 1533impl BindPat {
1534 pub fn ref_kw_token(&self) -> Option<RefKw> { support::token(&self.syntax) } 1534 pub fn ref_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, REF_KW) }
1535 pub fn mut_kw_token(&self) -> Option<MutKw> { support::token(&self.syntax) } 1535 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MUT_KW) }
1536 pub fn at_token(&self) -> Option<At> { support::token(&self.syntax) } 1536 pub fn at_token(&self) -> Option<At> { support::token(&self.syntax) }
1537 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1537 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1538} 1538}
@@ -1788,10 +1788,10 @@ impl AstNode for Visibility {
1788 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1788 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1789} 1789}
1790impl Visibility { 1790impl Visibility {
1791 pub fn pub_kw_token(&self) -> Option<PubKw> { support::token(&self.syntax) } 1791 pub fn pub_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, PUB_KW) }
1792 pub fn super_kw_token(&self) -> Option<SuperKw> { support::token(&self.syntax) } 1792 pub fn super_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, SUPER_KW) }
1793 pub fn self_kw_token(&self) -> Option<SelfKw> { support::token(&self.syntax) } 1793 pub fn self_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, SELF_KW) }
1794 pub fn crate_kw_token(&self) -> Option<CrateKw> { support::token(&self.syntax) } 1794 pub fn crate_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, CRATE_KW) }
1795} 1795}
1796#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1796#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1797pub struct Name { 1797pub struct Name {
@@ -1996,7 +1996,7 @@ impl AstNode for TypeBound {
1996} 1996}
1997impl TypeBound { 1997impl TypeBound {
1998 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } 1998 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) }
1999 pub fn const_kw_token(&self) -> Option<ConstKw> { support::token(&self.syntax) } 1999 pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, CONST_KW) }
2000 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 2000 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
2001} 2001}
2002#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2002#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2053,7 +2053,7 @@ impl AstNode for WhereClause {
2053 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2053 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2054} 2054}
2055impl WhereClause { 2055impl WhereClause {
2056 pub fn where_kw_token(&self) -> Option<WhereKw> { support::token(&self.syntax) } 2056 pub fn where_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, WHERE_KW) }
2057 pub fn predicates(&self) -> AstChildren<WherePred> { support::children(&self.syntax) } 2057 pub fn predicates(&self) -> AstChildren<WherePred> { support::children(&self.syntax) }
2058} 2058}
2059#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2059#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2112,7 +2112,7 @@ impl AstNode for LetStmt {
2112impl ast::AttrsOwner for LetStmt {} 2112impl ast::AttrsOwner for LetStmt {}
2113impl ast::TypeAscriptionOwner for LetStmt {} 2113impl ast::TypeAscriptionOwner for LetStmt {}
2114impl LetStmt { 2114impl LetStmt {
2115 pub fn let_kw_token(&self) -> Option<LetKw> { support::token(&self.syntax) } 2115 pub fn let_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, LET_KW) }
2116 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 2116 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
2117 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } 2117 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
2118 pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) } 2118 pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) }
@@ -2134,7 +2134,7 @@ impl AstNode for Condition {
2134 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2134 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2135} 2135}
2136impl Condition { 2136impl Condition {
2137 pub fn let_kw_token(&self) -> Option<LetKw> { support::token(&self.syntax) } 2137 pub fn let_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, LET_KW) }
2138 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 2138 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
2139 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } 2139 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
2140 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 2140 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
@@ -2203,7 +2203,7 @@ impl ast::AttrsOwner for SelfParam {}
2203impl SelfParam { 2203impl SelfParam {
2204 pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } 2204 pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) }
2205 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } 2205 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) }
2206 pub fn self_kw_token(&self) -> Option<SelfKw> { support::token(&self.syntax) } 2206 pub fn self_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, SELF_KW) }
2207} 2207}
2208#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2208#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2209pub struct Param { 2209pub struct Param {
@@ -2244,7 +2244,7 @@ impl AstNode for UseItem {
2244impl ast::AttrsOwner for UseItem {} 2244impl ast::AttrsOwner for UseItem {}
2245impl ast::VisibilityOwner for UseItem {} 2245impl ast::VisibilityOwner for UseItem {}
2246impl UseItem { 2246impl UseItem {
2247 pub fn use_kw_token(&self) -> Option<UseKw> { support::token(&self.syntax) } 2247 pub fn use_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, USE_KW) }
2248 pub fn use_tree(&self) -> Option<UseTree> { support::child(&self.syntax) } 2248 pub fn use_tree(&self) -> Option<UseTree> { support::child(&self.syntax) }
2249} 2249}
2250#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2250#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2285,7 +2285,7 @@ impl AstNode for Alias {
2285} 2285}
2286impl ast::NameOwner for Alias {} 2286impl ast::NameOwner for Alias {}
2287impl Alias { 2287impl Alias {
2288 pub fn as_kw_token(&self) -> Option<AsKw> { support::token(&self.syntax) } 2288 pub fn as_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, AS_KW) }
2289} 2289}
2290#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2290#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2291pub struct UseTreeList { 2291pub struct UseTreeList {
@@ -2325,8 +2325,8 @@ impl AstNode for ExternCrateItem {
2325impl ast::AttrsOwner for ExternCrateItem {} 2325impl ast::AttrsOwner for ExternCrateItem {}
2326impl ast::VisibilityOwner for ExternCrateItem {} 2326impl ast::VisibilityOwner for ExternCrateItem {}
2327impl ExternCrateItem { 2327impl ExternCrateItem {
2328 pub fn extern_kw_token(&self) -> Option<ExternKw> { support::token(&self.syntax) } 2328 pub fn extern_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, EXTERN_KW) }
2329 pub fn crate_kw_token(&self) -> Option<CrateKw> { support::token(&self.syntax) } 2329 pub fn crate_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, CRATE_KW) }
2330 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 2330 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
2331 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) } 2331 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) }
2332} 2332}
@@ -2512,7 +2512,6 @@ impl AstNode for MacroItems {
2512 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2512 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2513} 2513}
2514impl ast::ModuleItemOwner for MacroItems {} 2514impl ast::ModuleItemOwner for MacroItems {}
2515impl ast::FnDefOwner for MacroItems {}
2516impl MacroItems {} 2515impl MacroItems {}
2517#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2516#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2518pub struct MacroStmts { 2517pub struct MacroStmts {
@@ -2548,7 +2547,6 @@ impl AstNode for ExternItemList {
2548 } 2547 }
2549 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2548 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2550} 2549}
2551impl ast::FnDefOwner for ExternItemList {}
2552impl ast::ModuleItemOwner for ExternItemList {} 2550impl ast::ModuleItemOwner for ExternItemList {}
2553impl ExternItemList { 2551impl ExternItemList {
2554 pub fn l_curly_token(&self) -> Option<LCurly> { support::token(&self.syntax) } 2552 pub fn l_curly_token(&self) -> Option<LCurly> { support::token(&self.syntax) }