diff options
Diffstat (limited to 'crates/ra_syntax/src/ast/generated/nodes.rs')
-rw-r--r-- | crates/ra_syntax/src/ast/generated/nodes.rs | 140 |
1 files changed, 71 insertions, 69 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 3b820507d..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::*; | |||
4 | use crate::{ | 4 | use 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)] |
10 | pub struct SourceFile { | 10 | pub struct SourceFile { |
@@ -48,11 +48,11 @@ impl ast::DocCommentsOwner for FnDef {} | |||
48 | impl ast::AttrsOwner for FnDef {} | 48 | impl ast::AttrsOwner for FnDef {} |
49 | impl FnDef { | 49 | impl FnDef { |
50 | pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) } | 50 | pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) } |
51 | 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) } |
52 | 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) } |
53 | 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) } |
54 | 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) } |
55 | 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) } |
56 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } | 56 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } |
57 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } | 57 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } |
58 | pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } | 58 | pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } |
@@ -98,7 +98,7 @@ impl ast::TypeParamsOwner for StructDef {} | |||
98 | impl ast::AttrsOwner for StructDef {} | 98 | impl ast::AttrsOwner for StructDef {} |
99 | impl ast::DocCommentsOwner for StructDef {} | 99 | impl ast::DocCommentsOwner for StructDef {} |
100 | impl StructDef { | 100 | impl StructDef { |
101 | 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) } |
102 | 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) } |
103 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } | 103 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } |
104 | } | 104 | } |
@@ -123,7 +123,7 @@ impl ast::TypeParamsOwner for UnionDef {} | |||
123 | impl ast::AttrsOwner for UnionDef {} | 123 | impl ast::AttrsOwner for UnionDef {} |
124 | impl ast::DocCommentsOwner for UnionDef {} | 124 | impl ast::DocCommentsOwner for UnionDef {} |
125 | impl UnionDef { | 125 | impl UnionDef { |
126 | 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) } |
127 | pub fn record_field_def_list(&self) -> Option<RecordFieldDefList> { | 127 | pub fn record_field_def_list(&self) -> Option<RecordFieldDefList> { |
128 | support::child(&self.syntax) | 128 | support::child(&self.syntax) |
129 | } | 129 | } |
@@ -230,7 +230,7 @@ impl ast::TypeParamsOwner for EnumDef {} | |||
230 | impl ast::AttrsOwner for EnumDef {} | 230 | impl ast::AttrsOwner for EnumDef {} |
231 | impl ast::DocCommentsOwner for EnumDef {} | 231 | impl ast::DocCommentsOwner for EnumDef {} |
232 | impl EnumDef { | 232 | impl EnumDef { |
233 | 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) } |
234 | pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) } | 234 | pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) } |
235 | } | 235 | } |
236 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 236 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -299,9 +299,9 @@ impl ast::DocCommentsOwner for TraitDef {} | |||
299 | impl ast::TypeParamsOwner for TraitDef {} | 299 | impl ast::TypeParamsOwner for TraitDef {} |
300 | impl ast::TypeBoundsOwner for TraitDef {} | 300 | impl ast::TypeBoundsOwner for TraitDef {} |
301 | impl TraitDef { | 301 | impl TraitDef { |
302 | 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) } |
303 | 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) } |
304 | 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) } |
305 | pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } | 305 | pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } |
306 | } | 306 | } |
307 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 307 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -324,7 +324,7 @@ impl ast::NameOwner for Module {} | |||
324 | impl ast::AttrsOwner for Module {} | 324 | impl ast::AttrsOwner for Module {} |
325 | impl ast::DocCommentsOwner for Module {} | 325 | impl ast::DocCommentsOwner for Module {} |
326 | impl Module { | 326 | impl Module { |
327 | 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) } |
328 | pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } | 328 | pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } |
329 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } | 329 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } |
330 | } | 330 | } |
@@ -371,8 +371,8 @@ impl ast::AttrsOwner for ConstDef {} | |||
371 | impl ast::DocCommentsOwner for ConstDef {} | 371 | impl ast::DocCommentsOwner for ConstDef {} |
372 | impl ast::TypeAscriptionOwner for ConstDef {} | 372 | impl ast::TypeAscriptionOwner for ConstDef {} |
373 | impl ConstDef { | 373 | impl ConstDef { |
374 | 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) } |
375 | 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) } |
376 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } | 376 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } |
377 | pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } | 377 | pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } |
378 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } | 378 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } |
@@ -399,8 +399,8 @@ impl ast::AttrsOwner for StaticDef {} | |||
399 | impl ast::DocCommentsOwner for StaticDef {} | 399 | impl ast::DocCommentsOwner for StaticDef {} |
400 | impl ast::TypeAscriptionOwner for StaticDef {} | 400 | impl ast::TypeAscriptionOwner for StaticDef {} |
401 | impl StaticDef { | 401 | impl StaticDef { |
402 | 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) } |
403 | 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) } |
404 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } | 404 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } |
405 | pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } | 405 | pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } |
406 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } | 406 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } |
@@ -427,8 +427,8 @@ impl ast::AttrsOwner for TypeAliasDef {} | |||
427 | impl ast::DocCommentsOwner for TypeAliasDef {} | 427 | impl ast::DocCommentsOwner for TypeAliasDef {} |
428 | impl ast::TypeBoundsOwner for TypeAliasDef {} | 428 | impl ast::TypeBoundsOwner for TypeAliasDef {} |
429 | impl TypeAliasDef { | 429 | impl TypeAliasDef { |
430 | 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) } |
431 | 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) } |
432 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } | 432 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } |
433 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 433 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
434 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } | 434 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } |
@@ -451,12 +451,12 @@ impl AstNode for ImplDef { | |||
451 | impl ast::TypeParamsOwner for ImplDef {} | 451 | impl ast::TypeParamsOwner for ImplDef {} |
452 | impl ast::AttrsOwner for ImplDef {} | 452 | impl ast::AttrsOwner for ImplDef {} |
453 | impl ImplDef { | 453 | impl ImplDef { |
454 | 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) } |
455 | 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) } |
456 | 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) } |
457 | 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) } |
458 | pub fn excl_token(&self) -> Option<Excl> { support::token(&self.syntax) } | 458 | pub fn excl_token(&self) -> Option<Excl> { support::token(&self.syntax) } |
459 | 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) } |
460 | pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } | 460 | pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } |
461 | } | 461 | } |
462 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 462 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -552,8 +552,8 @@ impl AstNode for PointerType { | |||
552 | } | 552 | } |
553 | impl PointerType { | 553 | impl PointerType { |
554 | pub fn star_token(&self) -> Option<Star> { support::token(&self.syntax) } | 554 | pub fn star_token(&self) -> Option<Star> { support::token(&self.syntax) } |
555 | 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) } |
556 | 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) } |
557 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 557 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
558 | } | 558 | } |
559 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 559 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -616,7 +616,7 @@ impl AstNode for ReferenceType { | |||
616 | impl ReferenceType { | 616 | impl ReferenceType { |
617 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } | 617 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } |
618 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 618 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } |
619 | 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) } |
620 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 620 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
621 | } | 621 | } |
622 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 622 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -654,8 +654,8 @@ impl AstNode for FnPointerType { | |||
654 | } | 654 | } |
655 | impl FnPointerType { | 655 | impl FnPointerType { |
656 | pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) } | 656 | pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) } |
657 | 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) } |
658 | 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) } |
659 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } | 659 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } |
660 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } | 660 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } |
661 | } | 661 | } |
@@ -675,7 +675,7 @@ impl AstNode for ForType { | |||
675 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 675 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
676 | } | 676 | } |
677 | impl ForType { | 677 | impl ForType { |
678 | 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) } |
679 | 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) } |
680 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 680 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
681 | } | 681 | } |
@@ -696,7 +696,7 @@ impl AstNode for ImplTraitType { | |||
696 | } | 696 | } |
697 | impl ast::TypeBoundsOwner for ImplTraitType {} | 697 | impl ast::TypeBoundsOwner for ImplTraitType {} |
698 | impl ImplTraitType { | 698 | impl ImplTraitType { |
699 | 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) } |
700 | } | 700 | } |
701 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 701 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
702 | pub struct DynTraitType { | 702 | pub struct DynTraitType { |
@@ -715,7 +715,7 @@ impl AstNode for DynTraitType { | |||
715 | } | 715 | } |
716 | impl ast::TypeBoundsOwner for DynTraitType {} | 716 | impl ast::TypeBoundsOwner for DynTraitType {} |
717 | impl DynTraitType { | 717 | impl DynTraitType { |
718 | 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) } |
719 | } | 719 | } |
720 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 720 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
721 | pub struct TupleExpr { | 721 | pub struct TupleExpr { |
@@ -816,9 +816,9 @@ impl AstNode for LambdaExpr { | |||
816 | } | 816 | } |
817 | impl ast::AttrsOwner for LambdaExpr {} | 817 | impl ast::AttrsOwner for LambdaExpr {} |
818 | impl LambdaExpr { | 818 | impl LambdaExpr { |
819 | 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) } |
820 | 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) } |
821 | 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) } |
822 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } | 822 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } |
823 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } | 823 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } |
824 | pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } | 824 | pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } |
@@ -840,7 +840,7 @@ impl AstNode for IfExpr { | |||
840 | } | 840 | } |
841 | impl ast::AttrsOwner for IfExpr {} | 841 | impl ast::AttrsOwner for IfExpr {} |
842 | impl IfExpr { | 842 | impl IfExpr { |
843 | 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) } |
844 | pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) } | 844 | pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) } |
845 | } | 845 | } |
846 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 846 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -861,7 +861,7 @@ impl AstNode for LoopExpr { | |||
861 | impl ast::AttrsOwner for LoopExpr {} | 861 | impl ast::AttrsOwner for LoopExpr {} |
862 | impl ast::LoopBodyOwner for LoopExpr {} | 862 | impl ast::LoopBodyOwner for LoopExpr {} |
863 | impl LoopExpr { | 863 | impl LoopExpr { |
864 | 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) } |
865 | } | 865 | } |
866 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 866 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
867 | pub struct TryBlockExpr { | 867 | pub struct TryBlockExpr { |
@@ -880,7 +880,7 @@ impl AstNode for TryBlockExpr { | |||
880 | } | 880 | } |
881 | impl ast::AttrsOwner for TryBlockExpr {} | 881 | impl ast::AttrsOwner for TryBlockExpr {} |
882 | impl TryBlockExpr { | 882 | impl TryBlockExpr { |
883 | 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) } |
884 | pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } | 884 | pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } |
885 | } | 885 | } |
886 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 886 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -901,9 +901,9 @@ impl AstNode for ForExpr { | |||
901 | impl ast::AttrsOwner for ForExpr {} | 901 | impl ast::AttrsOwner for ForExpr {} |
902 | impl ast::LoopBodyOwner for ForExpr {} | 902 | impl ast::LoopBodyOwner for ForExpr {} |
903 | impl ForExpr { | 903 | impl ForExpr { |
904 | 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) } |
905 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 905 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
906 | 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) } |
907 | pub fn iterable(&self) -> Option<Expr> { support::child(&self.syntax) } | 907 | pub fn iterable(&self) -> Option<Expr> { support::child(&self.syntax) } |
908 | } | 908 | } |
909 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 909 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -924,7 +924,7 @@ impl AstNode for WhileExpr { | |||
924 | impl ast::AttrsOwner for WhileExpr {} | 924 | impl ast::AttrsOwner for WhileExpr {} |
925 | impl ast::LoopBodyOwner for WhileExpr {} | 925 | impl ast::LoopBodyOwner for WhileExpr {} |
926 | impl WhileExpr { | 926 | impl WhileExpr { |
927 | 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) } |
928 | pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) } | 928 | pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) } |
929 | } | 929 | } |
930 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 930 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -944,7 +944,9 @@ impl AstNode for ContinueExpr { | |||
944 | } | 944 | } |
945 | impl ast::AttrsOwner for ContinueExpr {} | 945 | impl ast::AttrsOwner for ContinueExpr {} |
946 | impl ContinueExpr { | 946 | impl ContinueExpr { |
947 | 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 | } | ||
948 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 950 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } |
949 | } | 951 | } |
950 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 952 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -964,7 +966,7 @@ impl AstNode for BreakExpr { | |||
964 | } | 966 | } |
965 | impl ast::AttrsOwner for BreakExpr {} | 967 | impl ast::AttrsOwner for BreakExpr {} |
966 | impl BreakExpr { | 968 | impl BreakExpr { |
967 | 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) } |
968 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 970 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } |
969 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 971 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
970 | } | 972 | } |
@@ -1004,7 +1006,7 @@ impl AstNode for BlockExpr { | |||
1004 | impl ast::AttrsOwner for BlockExpr {} | 1006 | impl ast::AttrsOwner for BlockExpr {} |
1005 | impl BlockExpr { | 1007 | impl BlockExpr { |
1006 | pub fn label(&self) -> Option<Label> { support::child(&self.syntax) } | 1008 | pub fn label(&self) -> Option<Label> { support::child(&self.syntax) } |
1007 | 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) } |
1008 | pub fn block(&self) -> Option<Block> { support::child(&self.syntax) } | 1010 | pub fn block(&self) -> Option<Block> { support::child(&self.syntax) } |
1009 | } | 1011 | } |
1010 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1012 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1128,7 +1130,7 @@ impl ast::AttrsOwner for AwaitExpr {} | |||
1128 | impl AwaitExpr { | 1130 | impl AwaitExpr { |
1129 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1131 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1130 | pub fn dot_token(&self) -> Option<Dot> { support::token(&self.syntax) } | 1132 | pub fn dot_token(&self) -> Option<Dot> { support::token(&self.syntax) } |
1131 | 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) } |
1132 | } | 1134 | } |
1133 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1135 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1134 | pub struct TryExpr { | 1136 | pub struct TryExpr { |
@@ -1147,7 +1149,7 @@ impl AstNode for TryExpr { | |||
1147 | } | 1149 | } |
1148 | impl ast::AttrsOwner for TryExpr {} | 1150 | impl ast::AttrsOwner for TryExpr {} |
1149 | impl TryExpr { | 1151 | impl TryExpr { |
1150 | 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) } |
1151 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1153 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1152 | } | 1154 | } |
1153 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1155 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1168,7 +1170,7 @@ impl AstNode for CastExpr { | |||
1168 | impl ast::AttrsOwner for CastExpr {} | 1170 | impl ast::AttrsOwner for CastExpr {} |
1169 | impl CastExpr { | 1171 | impl CastExpr { |
1170 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1172 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1171 | 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) } |
1172 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 1174 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
1173 | } | 1175 | } |
1174 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1176 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1189,8 +1191,8 @@ impl AstNode for RefExpr { | |||
1189 | impl ast::AttrsOwner for RefExpr {} | 1191 | impl ast::AttrsOwner for RefExpr {} |
1190 | impl RefExpr { | 1192 | impl RefExpr { |
1191 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } | 1193 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } |
1192 | 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) } |
1193 | 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) } |
1194 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1196 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1195 | } | 1197 | } |
1196 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1198 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1230,7 +1232,7 @@ impl AstNode for BoxExpr { | |||
1230 | } | 1232 | } |
1231 | impl ast::AttrsOwner for BoxExpr {} | 1233 | impl ast::AttrsOwner for BoxExpr {} |
1232 | impl BoxExpr { | 1234 | impl BoxExpr { |
1233 | 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) } |
1234 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1236 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1235 | } | 1237 | } |
1236 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1238 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1306,7 +1308,7 @@ impl AstNode for MatchExpr { | |||
1306 | } | 1308 | } |
1307 | impl ast::AttrsOwner for MatchExpr {} | 1309 | impl ast::AttrsOwner for MatchExpr {} |
1308 | impl MatchExpr { | 1310 | impl MatchExpr { |
1309 | 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) } |
1310 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1312 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1311 | 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) } |
1312 | } | 1314 | } |
@@ -1369,7 +1371,7 @@ impl AstNode for MatchGuard { | |||
1369 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1371 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1370 | } | 1372 | } |
1371 | impl MatchGuard { | 1373 | impl MatchGuard { |
1372 | 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) } |
1373 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1375 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1374 | } | 1376 | } |
1375 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1377 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1489,7 +1491,7 @@ impl AstNode for RefPat { | |||
1489 | } | 1491 | } |
1490 | impl RefPat { | 1492 | impl RefPat { |
1491 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } | 1493 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } |
1492 | 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) } |
1493 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 1495 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
1494 | } | 1496 | } |
1495 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1497 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1508,7 +1510,7 @@ impl AstNode for BoxPat { | |||
1508 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1510 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1509 | } | 1511 | } |
1510 | impl BoxPat { | 1512 | impl BoxPat { |
1511 | 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) } |
1512 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 1514 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
1513 | } | 1515 | } |
1514 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1516 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1529,8 +1531,8 @@ impl AstNode for BindPat { | |||
1529 | impl ast::AttrsOwner for BindPat {} | 1531 | impl ast::AttrsOwner for BindPat {} |
1530 | impl ast::NameOwner for BindPat {} | 1532 | impl ast::NameOwner for BindPat {} |
1531 | impl BindPat { | 1533 | impl BindPat { |
1532 | 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) } |
1533 | 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) } |
1534 | pub fn at_token(&self) -> Option<At> { support::token(&self.syntax) } | 1536 | pub fn at_token(&self) -> Option<At> { support::token(&self.syntax) } |
1535 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 1537 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
1536 | } | 1538 | } |
@@ -1786,10 +1788,10 @@ impl AstNode for Visibility { | |||
1786 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1788 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1787 | } | 1789 | } |
1788 | impl Visibility { | 1790 | impl Visibility { |
1789 | 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) } |
1790 | 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) } |
1791 | 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) } |
1792 | 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) } |
1793 | } | 1795 | } |
1794 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1796 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1795 | pub struct Name { | 1797 | pub struct Name { |
@@ -1994,7 +1996,7 @@ impl AstNode for TypeBound { | |||
1994 | } | 1996 | } |
1995 | impl TypeBound { | 1997 | impl TypeBound { |
1996 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 1998 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } |
1997 | 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) } |
1998 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 2000 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
1999 | } | 2001 | } |
2000 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2002 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -2051,7 +2053,7 @@ impl AstNode for WhereClause { | |||
2051 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2053 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2052 | } | 2054 | } |
2053 | impl WhereClause { | 2055 | impl WhereClause { |
2054 | 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) } |
2055 | pub fn predicates(&self) -> AstChildren<WherePred> { support::children(&self.syntax) } | 2057 | pub fn predicates(&self) -> AstChildren<WherePred> { support::children(&self.syntax) } |
2056 | } | 2058 | } |
2057 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2059 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -2110,7 +2112,7 @@ impl AstNode for LetStmt { | |||
2110 | impl ast::AttrsOwner for LetStmt {} | 2112 | impl ast::AttrsOwner for LetStmt {} |
2111 | impl ast::TypeAscriptionOwner for LetStmt {} | 2113 | impl ast::TypeAscriptionOwner for LetStmt {} |
2112 | impl LetStmt { | 2114 | impl LetStmt { |
2113 | 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) } |
2114 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 2116 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
2115 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } | 2117 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } |
2116 | pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) } | 2118 | pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) } |
@@ -2132,7 +2134,7 @@ impl AstNode for Condition { | |||
2132 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2134 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2133 | } | 2135 | } |
2134 | impl Condition { | 2136 | impl Condition { |
2135 | 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) } |
2136 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 2138 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
2137 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } | 2139 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } |
2138 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 2140 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
@@ -2201,7 +2203,7 @@ impl ast::AttrsOwner for SelfParam {} | |||
2201 | impl SelfParam { | 2203 | impl SelfParam { |
2202 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } | 2204 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } |
2203 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 2205 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } |
2204 | 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) } |
2205 | } | 2207 | } |
2206 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2208 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
2207 | pub struct Param { | 2209 | pub struct Param { |
@@ -2242,7 +2244,7 @@ impl AstNode for UseItem { | |||
2242 | impl ast::AttrsOwner for UseItem {} | 2244 | impl ast::AttrsOwner for UseItem {} |
2243 | impl ast::VisibilityOwner for UseItem {} | 2245 | impl ast::VisibilityOwner for UseItem {} |
2244 | impl UseItem { | 2246 | impl UseItem { |
2245 | 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) } |
2246 | pub fn use_tree(&self) -> Option<UseTree> { support::child(&self.syntax) } | 2248 | pub fn use_tree(&self) -> Option<UseTree> { support::child(&self.syntax) } |
2247 | } | 2249 | } |
2248 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2250 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -2283,7 +2285,7 @@ impl AstNode for Alias { | |||
2283 | } | 2285 | } |
2284 | impl ast::NameOwner for Alias {} | 2286 | impl ast::NameOwner for Alias {} |
2285 | impl Alias { | 2287 | impl Alias { |
2286 | 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) } |
2287 | } | 2289 | } |
2288 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2290 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
2289 | pub struct UseTreeList { | 2291 | pub struct UseTreeList { |
@@ -2323,8 +2325,8 @@ impl AstNode for ExternCrateItem { | |||
2323 | impl ast::AttrsOwner for ExternCrateItem {} | 2325 | impl ast::AttrsOwner for ExternCrateItem {} |
2324 | impl ast::VisibilityOwner for ExternCrateItem {} | 2326 | impl ast::VisibilityOwner for ExternCrateItem {} |
2325 | impl ExternCrateItem { | 2327 | impl ExternCrateItem { |
2326 | 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) } |
2327 | 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) } |
2328 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } | 2330 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } |
2329 | pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) } | 2331 | pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) } |
2330 | } | 2332 | } |