diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_syntax/src/ast/generated/nodes.rs | 146 |
1 files changed, 77 insertions, 69 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 20f663046..3b014e312 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, SyntaxToken, | 7 | SyntaxNode, SyntaxToken, T, |
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,13 @@ 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_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, CONST_KW) } | 51 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) } |
52 | pub fn default_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, DEFAULT_KW) } | 52 | pub fn default_token(&self) -> Option<SyntaxToken> { |
53 | pub fn async_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, ASYNC_KW) } | 53 | support::token2(&self.syntax, T![default]) |
54 | pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, UNSAFE_KW) } | 54 | } |
55 | pub fn fn_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, FN_KW) } | 55 | pub fn async_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![async]) } |
56 | pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![unsafe]) } | ||
57 | pub fn fn_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![fn]) } | ||
56 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } | 58 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } |
57 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } | 59 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } |
58 | pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } | 60 | pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } |
@@ -98,7 +100,7 @@ impl ast::TypeParamsOwner for StructDef {} | |||
98 | impl ast::AttrsOwner for StructDef {} | 100 | impl ast::AttrsOwner for StructDef {} |
99 | impl ast::DocCommentsOwner for StructDef {} | 101 | impl ast::DocCommentsOwner for StructDef {} |
100 | impl StructDef { | 102 | impl StructDef { |
101 | pub fn struct_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, STRUCT_KW) } | 103 | pub fn struct_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![struct]) } |
102 | pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) } | 104 | pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) } |
103 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } | 105 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } |
104 | } | 106 | } |
@@ -123,7 +125,7 @@ impl ast::TypeParamsOwner for UnionDef {} | |||
123 | impl ast::AttrsOwner for UnionDef {} | 125 | impl ast::AttrsOwner for UnionDef {} |
124 | impl ast::DocCommentsOwner for UnionDef {} | 126 | impl ast::DocCommentsOwner for UnionDef {} |
125 | impl UnionDef { | 127 | impl UnionDef { |
126 | pub fn union_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, UNION_KW) } | 128 | pub fn union_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![union]) } |
127 | pub fn record_field_def_list(&self) -> Option<RecordFieldDefList> { | 129 | pub fn record_field_def_list(&self) -> Option<RecordFieldDefList> { |
128 | support::child(&self.syntax) | 130 | support::child(&self.syntax) |
129 | } | 131 | } |
@@ -230,7 +232,7 @@ impl ast::TypeParamsOwner for EnumDef {} | |||
230 | impl ast::AttrsOwner for EnumDef {} | 232 | impl ast::AttrsOwner for EnumDef {} |
231 | impl ast::DocCommentsOwner for EnumDef {} | 233 | impl ast::DocCommentsOwner for EnumDef {} |
232 | impl EnumDef { | 234 | impl EnumDef { |
233 | pub fn enum_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, ENUM_KW) } | 235 | pub fn enum_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![enum]) } |
234 | pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) } | 236 | pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) } |
235 | } | 237 | } |
236 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 238 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -299,9 +301,9 @@ impl ast::DocCommentsOwner for TraitDef {} | |||
299 | impl ast::TypeParamsOwner for TraitDef {} | 301 | impl ast::TypeParamsOwner for TraitDef {} |
300 | impl ast::TypeBoundsOwner for TraitDef {} | 302 | impl ast::TypeBoundsOwner for TraitDef {} |
301 | impl TraitDef { | 303 | impl TraitDef { |
302 | pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, UNSAFE_KW) } | 304 | pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![unsafe]) } |
303 | pub fn auto_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, AUTO_KW) } | 305 | pub fn auto_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![auto]) } |
304 | pub fn trait_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, TRAIT_KW) } | 306 | pub fn trait_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![trait]) } |
305 | pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } | 307 | pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } |
306 | } | 308 | } |
307 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 309 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -324,7 +326,7 @@ impl ast::NameOwner for Module {} | |||
324 | impl ast::AttrsOwner for Module {} | 326 | impl ast::AttrsOwner for Module {} |
325 | impl ast::DocCommentsOwner for Module {} | 327 | impl ast::DocCommentsOwner for Module {} |
326 | impl Module { | 328 | impl Module { |
327 | pub fn mod_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MOD_KW) } | 329 | pub fn mod_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mod]) } |
328 | pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } | 330 | pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } |
329 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } | 331 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } |
330 | } | 332 | } |
@@ -371,8 +373,10 @@ impl ast::AttrsOwner for ConstDef {} | |||
371 | impl ast::DocCommentsOwner for ConstDef {} | 373 | impl ast::DocCommentsOwner for ConstDef {} |
372 | impl ast::TypeAscriptionOwner for ConstDef {} | 374 | impl ast::TypeAscriptionOwner for ConstDef {} |
373 | impl ConstDef { | 375 | impl ConstDef { |
374 | pub fn default_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, DEFAULT_KW) } | 376 | pub fn default_token(&self) -> Option<SyntaxToken> { |
375 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, CONST_KW) } | 377 | support::token2(&self.syntax, T![default]) |
378 | } | ||
379 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) } | ||
376 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } | 380 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } |
377 | pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } | 381 | pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } |
378 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } | 382 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } |
@@ -399,8 +403,8 @@ impl ast::AttrsOwner for StaticDef {} | |||
399 | impl ast::DocCommentsOwner for StaticDef {} | 403 | impl ast::DocCommentsOwner for StaticDef {} |
400 | impl ast::TypeAscriptionOwner for StaticDef {} | 404 | impl ast::TypeAscriptionOwner for StaticDef {} |
401 | impl StaticDef { | 405 | impl StaticDef { |
402 | pub fn static_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, STATIC_KW) } | 406 | pub fn static_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![static]) } |
403 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MUT_KW) } | 407 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } |
404 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } | 408 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } |
405 | pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } | 409 | pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } |
406 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } | 410 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } |
@@ -427,8 +431,10 @@ impl ast::AttrsOwner for TypeAliasDef {} | |||
427 | impl ast::DocCommentsOwner for TypeAliasDef {} | 431 | impl ast::DocCommentsOwner for TypeAliasDef {} |
428 | impl ast::TypeBoundsOwner for TypeAliasDef {} | 432 | impl ast::TypeBoundsOwner for TypeAliasDef {} |
429 | impl TypeAliasDef { | 433 | impl TypeAliasDef { |
430 | pub fn default_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, DEFAULT_KW) } | 434 | pub fn default_token(&self) -> Option<SyntaxToken> { |
431 | pub fn type_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, TYPE_KW) } | 435 | support::token2(&self.syntax, T![default]) |
436 | } | ||
437 | pub fn type_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![type]) } | ||
432 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } | 438 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } |
433 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 439 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
434 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } | 440 | pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) } |
@@ -451,12 +457,14 @@ impl AstNode for ImplDef { | |||
451 | impl ast::TypeParamsOwner for ImplDef {} | 457 | impl ast::TypeParamsOwner for ImplDef {} |
452 | impl ast::AttrsOwner for ImplDef {} | 458 | impl ast::AttrsOwner for ImplDef {} |
453 | impl ImplDef { | 459 | impl ImplDef { |
454 | pub fn default_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, DEFAULT_KW) } | 460 | pub fn default_token(&self) -> Option<SyntaxToken> { |
455 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, CONST_KW) } | 461 | support::token2(&self.syntax, T![default]) |
456 | pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, UNSAFE_KW) } | 462 | } |
457 | pub fn impl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, IMPL_KW) } | 463 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) } |
464 | pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![unsafe]) } | ||
465 | pub fn impl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![impl]) } | ||
458 | pub fn excl_token(&self) -> Option<Excl> { support::token(&self.syntax) } | 466 | pub fn excl_token(&self) -> Option<Excl> { support::token(&self.syntax) } |
459 | pub fn for_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, FOR_KW) } | 467 | pub fn for_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![for]) } |
460 | pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } | 468 | pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } |
461 | } | 469 | } |
462 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 470 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -552,8 +560,8 @@ impl AstNode for PointerType { | |||
552 | } | 560 | } |
553 | impl PointerType { | 561 | impl PointerType { |
554 | pub fn star_token(&self) -> Option<Star> { support::token(&self.syntax) } | 562 | pub fn star_token(&self) -> Option<Star> { support::token(&self.syntax) } |
555 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, CONST_KW) } | 563 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) } |
556 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MUT_KW) } | 564 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } |
557 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 565 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
558 | } | 566 | } |
559 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 567 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -616,7 +624,7 @@ impl AstNode for ReferenceType { | |||
616 | impl ReferenceType { | 624 | impl ReferenceType { |
617 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } | 625 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } |
618 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 626 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } |
619 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MUT_KW) } | 627 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } |
620 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 628 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
621 | } | 629 | } |
622 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 630 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -654,8 +662,8 @@ impl AstNode for FnPointerType { | |||
654 | } | 662 | } |
655 | impl FnPointerType { | 663 | impl FnPointerType { |
656 | pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) } | 664 | pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) } |
657 | pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, UNSAFE_KW) } | 665 | pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![unsafe]) } |
658 | pub fn fn_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, FN_KW) } | 666 | pub fn fn_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![fn]) } |
659 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } | 667 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } |
660 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } | 668 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } |
661 | } | 669 | } |
@@ -675,7 +683,7 @@ impl AstNode for ForType { | |||
675 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 683 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
676 | } | 684 | } |
677 | impl ForType { | 685 | impl ForType { |
678 | pub fn for_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, FOR_KW) } | 686 | pub fn for_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![for]) } |
679 | pub fn type_param_list(&self) -> Option<TypeParamList> { support::child(&self.syntax) } | 687 | pub fn type_param_list(&self) -> Option<TypeParamList> { support::child(&self.syntax) } |
680 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 688 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
681 | } | 689 | } |
@@ -696,7 +704,7 @@ impl AstNode for ImplTraitType { | |||
696 | } | 704 | } |
697 | impl ast::TypeBoundsOwner for ImplTraitType {} | 705 | impl ast::TypeBoundsOwner for ImplTraitType {} |
698 | impl ImplTraitType { | 706 | impl ImplTraitType { |
699 | pub fn impl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, IMPL_KW) } | 707 | pub fn impl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![impl]) } |
700 | } | 708 | } |
701 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 709 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
702 | pub struct DynTraitType { | 710 | pub struct DynTraitType { |
@@ -715,7 +723,7 @@ impl AstNode for DynTraitType { | |||
715 | } | 723 | } |
716 | impl ast::TypeBoundsOwner for DynTraitType {} | 724 | impl ast::TypeBoundsOwner for DynTraitType {} |
717 | impl DynTraitType { | 725 | impl DynTraitType { |
718 | pub fn dyn_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, DYN_KW) } | 726 | pub fn dyn_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![dyn]) } |
719 | } | 727 | } |
720 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 728 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
721 | pub struct TupleExpr { | 729 | pub struct TupleExpr { |
@@ -816,9 +824,9 @@ impl AstNode for LambdaExpr { | |||
816 | } | 824 | } |
817 | impl ast::AttrsOwner for LambdaExpr {} | 825 | impl ast::AttrsOwner for LambdaExpr {} |
818 | impl LambdaExpr { | 826 | impl LambdaExpr { |
819 | pub fn static_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, STATIC_KW) } | 827 | pub fn static_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![static]) } |
820 | pub fn async_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, ASYNC_KW) } | 828 | pub fn async_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![async]) } |
821 | pub fn move_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MOVE_KW) } | 829 | pub fn move_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![move]) } |
822 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } | 830 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } |
823 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } | 831 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } |
824 | pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } | 832 | pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } |
@@ -840,7 +848,7 @@ impl AstNode for IfExpr { | |||
840 | } | 848 | } |
841 | impl ast::AttrsOwner for IfExpr {} | 849 | impl ast::AttrsOwner for IfExpr {} |
842 | impl IfExpr { | 850 | impl IfExpr { |
843 | pub fn if_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, IF_KW) } | 851 | pub fn if_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![if]) } |
844 | pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) } | 852 | pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) } |
845 | } | 853 | } |
846 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 854 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -861,7 +869,7 @@ impl AstNode for LoopExpr { | |||
861 | impl ast::AttrsOwner for LoopExpr {} | 869 | impl ast::AttrsOwner for LoopExpr {} |
862 | impl ast::LoopBodyOwner for LoopExpr {} | 870 | impl ast::LoopBodyOwner for LoopExpr {} |
863 | impl LoopExpr { | 871 | impl LoopExpr { |
864 | pub fn loop_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, LOOP_KW) } | 872 | pub fn loop_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![loop]) } |
865 | } | 873 | } |
866 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 874 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
867 | pub struct TryBlockExpr { | 875 | pub struct TryBlockExpr { |
@@ -880,7 +888,7 @@ impl AstNode for TryBlockExpr { | |||
880 | } | 888 | } |
881 | impl ast::AttrsOwner for TryBlockExpr {} | 889 | impl ast::AttrsOwner for TryBlockExpr {} |
882 | impl TryBlockExpr { | 890 | impl TryBlockExpr { |
883 | pub fn try_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, TRY_KW) } | 891 | pub fn try_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![try]) } |
884 | pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } | 892 | pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } |
885 | } | 893 | } |
886 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 894 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -901,9 +909,9 @@ impl AstNode for ForExpr { | |||
901 | impl ast::AttrsOwner for ForExpr {} | 909 | impl ast::AttrsOwner for ForExpr {} |
902 | impl ast::LoopBodyOwner for ForExpr {} | 910 | impl ast::LoopBodyOwner for ForExpr {} |
903 | impl ForExpr { | 911 | impl ForExpr { |
904 | pub fn for_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, FOR_KW) } | 912 | pub fn for_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![for]) } |
905 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 913 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
906 | pub fn in_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, IN_KW) } | 914 | pub fn in_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![in]) } |
907 | pub fn iterable(&self) -> Option<Expr> { support::child(&self.syntax) } | 915 | pub fn iterable(&self) -> Option<Expr> { support::child(&self.syntax) } |
908 | } | 916 | } |
909 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 917 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -924,7 +932,7 @@ impl AstNode for WhileExpr { | |||
924 | impl ast::AttrsOwner for WhileExpr {} | 932 | impl ast::AttrsOwner for WhileExpr {} |
925 | impl ast::LoopBodyOwner for WhileExpr {} | 933 | impl ast::LoopBodyOwner for WhileExpr {} |
926 | impl WhileExpr { | 934 | impl WhileExpr { |
927 | pub fn while_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, WHILE_KW) } | 935 | pub fn while_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![while]) } |
928 | pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) } | 936 | pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) } |
929 | } | 937 | } |
930 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 938 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -945,7 +953,7 @@ impl AstNode for ContinueExpr { | |||
945 | impl ast::AttrsOwner for ContinueExpr {} | 953 | impl ast::AttrsOwner for ContinueExpr {} |
946 | impl ContinueExpr { | 954 | impl ContinueExpr { |
947 | pub fn continue_token(&self) -> Option<SyntaxToken> { | 955 | pub fn continue_token(&self) -> Option<SyntaxToken> { |
948 | support::token2(&self.syntax, CONTINUE_KW) | 956 | support::token2(&self.syntax, T![continue]) |
949 | } | 957 | } |
950 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 958 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } |
951 | } | 959 | } |
@@ -966,7 +974,7 @@ impl AstNode for BreakExpr { | |||
966 | } | 974 | } |
967 | impl ast::AttrsOwner for BreakExpr {} | 975 | impl ast::AttrsOwner for BreakExpr {} |
968 | impl BreakExpr { | 976 | impl BreakExpr { |
969 | pub fn break_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, BREAK_KW) } | 977 | pub fn break_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![break]) } |
970 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 978 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } |
971 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 979 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
972 | } | 980 | } |
@@ -1006,7 +1014,7 @@ impl AstNode for BlockExpr { | |||
1006 | impl ast::AttrsOwner for BlockExpr {} | 1014 | impl ast::AttrsOwner for BlockExpr {} |
1007 | impl BlockExpr { | 1015 | impl BlockExpr { |
1008 | pub fn label(&self) -> Option<Label> { support::child(&self.syntax) } | 1016 | pub fn label(&self) -> Option<Label> { support::child(&self.syntax) } |
1009 | pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, UNSAFE_KW) } | 1017 | pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![unsafe]) } |
1010 | pub fn block(&self) -> Option<Block> { support::child(&self.syntax) } | 1018 | pub fn block(&self) -> Option<Block> { support::child(&self.syntax) } |
1011 | } | 1019 | } |
1012 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1020 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1130,7 +1138,7 @@ impl ast::AttrsOwner for AwaitExpr {} | |||
1130 | impl AwaitExpr { | 1138 | impl AwaitExpr { |
1131 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1139 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1132 | pub fn dot_token(&self) -> Option<Dot> { support::token(&self.syntax) } | 1140 | pub fn dot_token(&self) -> Option<Dot> { support::token(&self.syntax) } |
1133 | pub fn await_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, AWAIT_KW) } | 1141 | pub fn await_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![await]) } |
1134 | } | 1142 | } |
1135 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1143 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1136 | pub struct TryExpr { | 1144 | pub struct TryExpr { |
@@ -1149,7 +1157,7 @@ impl AstNode for TryExpr { | |||
1149 | } | 1157 | } |
1150 | impl ast::AttrsOwner for TryExpr {} | 1158 | impl ast::AttrsOwner for TryExpr {} |
1151 | impl TryExpr { | 1159 | impl TryExpr { |
1152 | pub fn try_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, TRY_KW) } | 1160 | pub fn try_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![try]) } |
1153 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1161 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1154 | } | 1162 | } |
1155 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1163 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1170,7 +1178,7 @@ impl AstNode for CastExpr { | |||
1170 | impl ast::AttrsOwner for CastExpr {} | 1178 | impl ast::AttrsOwner for CastExpr {} |
1171 | impl CastExpr { | 1179 | impl CastExpr { |
1172 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1180 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1173 | pub fn as_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, AS_KW) } | 1181 | pub fn as_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![as]) } |
1174 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 1182 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
1175 | } | 1183 | } |
1176 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1184 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1191,8 +1199,8 @@ impl AstNode for RefExpr { | |||
1191 | impl ast::AttrsOwner for RefExpr {} | 1199 | impl ast::AttrsOwner for RefExpr {} |
1192 | impl RefExpr { | 1200 | impl RefExpr { |
1193 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } | 1201 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } |
1194 | pub fn raw_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, RAW_KW) } | 1202 | pub fn raw_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![raw]) } |
1195 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MUT_KW) } | 1203 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } |
1196 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1204 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1197 | } | 1205 | } |
1198 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1206 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1232,7 +1240,7 @@ impl AstNode for BoxExpr { | |||
1232 | } | 1240 | } |
1233 | impl ast::AttrsOwner for BoxExpr {} | 1241 | impl ast::AttrsOwner for BoxExpr {} |
1234 | impl BoxExpr { | 1242 | impl BoxExpr { |
1235 | pub fn box_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, BOX_KW) } | 1243 | pub fn box_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![box]) } |
1236 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1244 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1237 | } | 1245 | } |
1238 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1246 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1308,7 +1316,7 @@ impl AstNode for MatchExpr { | |||
1308 | } | 1316 | } |
1309 | impl ast::AttrsOwner for MatchExpr {} | 1317 | impl ast::AttrsOwner for MatchExpr {} |
1310 | impl MatchExpr { | 1318 | impl MatchExpr { |
1311 | pub fn match_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MATCH_KW) } | 1319 | pub fn match_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![match]) } |
1312 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1320 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1313 | pub fn match_arm_list(&self) -> Option<MatchArmList> { support::child(&self.syntax) } | 1321 | pub fn match_arm_list(&self) -> Option<MatchArmList> { support::child(&self.syntax) } |
1314 | } | 1322 | } |
@@ -1371,7 +1379,7 @@ impl AstNode for MatchGuard { | |||
1371 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1379 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1372 | } | 1380 | } |
1373 | impl MatchGuard { | 1381 | impl MatchGuard { |
1374 | pub fn if_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, IF_KW) } | 1382 | pub fn if_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![if]) } |
1375 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1383 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1376 | } | 1384 | } |
1377 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1385 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1491,7 +1499,7 @@ impl AstNode for RefPat { | |||
1491 | } | 1499 | } |
1492 | impl RefPat { | 1500 | impl RefPat { |
1493 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } | 1501 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } |
1494 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MUT_KW) } | 1502 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } |
1495 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 1503 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
1496 | } | 1504 | } |
1497 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1505 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1510,7 +1518,7 @@ impl AstNode for BoxPat { | |||
1510 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1518 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1511 | } | 1519 | } |
1512 | impl BoxPat { | 1520 | impl BoxPat { |
1513 | pub fn box_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, BOX_KW) } | 1521 | pub fn box_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![box]) } |
1514 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 1522 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
1515 | } | 1523 | } |
1516 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1524 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1531,8 +1539,8 @@ impl AstNode for BindPat { | |||
1531 | impl ast::AttrsOwner for BindPat {} | 1539 | impl ast::AttrsOwner for BindPat {} |
1532 | impl ast::NameOwner for BindPat {} | 1540 | impl ast::NameOwner for BindPat {} |
1533 | impl BindPat { | 1541 | impl BindPat { |
1534 | pub fn ref_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, REF_KW) } | 1542 | pub fn ref_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![ref]) } |
1535 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, MUT_KW) } | 1543 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } |
1536 | pub fn at_token(&self) -> Option<At> { support::token(&self.syntax) } | 1544 | pub fn at_token(&self) -> Option<At> { support::token(&self.syntax) } |
1537 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 1545 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
1538 | } | 1546 | } |
@@ -1788,10 +1796,10 @@ impl AstNode for Visibility { | |||
1788 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1796 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1789 | } | 1797 | } |
1790 | impl Visibility { | 1798 | impl Visibility { |
1791 | pub fn pub_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, PUB_KW) } | 1799 | pub fn pub_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![pub]) } |
1792 | pub fn super_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, SUPER_KW) } | 1800 | pub fn super_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![super]) } |
1793 | pub fn self_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, SELF_KW) } | 1801 | pub fn self_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![self]) } |
1794 | pub fn crate_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, CRATE_KW) } | 1802 | pub fn crate_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![crate]) } |
1795 | } | 1803 | } |
1796 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1804 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1797 | pub struct Name { | 1805 | pub struct Name { |
@@ -1996,7 +2004,7 @@ impl AstNode for TypeBound { | |||
1996 | } | 2004 | } |
1997 | impl TypeBound { | 2005 | impl TypeBound { |
1998 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 2006 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } |
1999 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, CONST_KW) } | 2007 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) } |
2000 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 2008 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
2001 | } | 2009 | } |
2002 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2010 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -2053,7 +2061,7 @@ impl AstNode for WhereClause { | |||
2053 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2061 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2054 | } | 2062 | } |
2055 | impl WhereClause { | 2063 | impl WhereClause { |
2056 | pub fn where_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, WHERE_KW) } | 2064 | pub fn where_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![where]) } |
2057 | pub fn predicates(&self) -> AstChildren<WherePred> { support::children(&self.syntax) } | 2065 | pub fn predicates(&self) -> AstChildren<WherePred> { support::children(&self.syntax) } |
2058 | } | 2066 | } |
2059 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2067 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -2112,7 +2120,7 @@ impl AstNode for LetStmt { | |||
2112 | impl ast::AttrsOwner for LetStmt {} | 2120 | impl ast::AttrsOwner for LetStmt {} |
2113 | impl ast::TypeAscriptionOwner for LetStmt {} | 2121 | impl ast::TypeAscriptionOwner for LetStmt {} |
2114 | impl LetStmt { | 2122 | impl LetStmt { |
2115 | pub fn let_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, LET_KW) } | 2123 | pub fn let_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![let]) } |
2116 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 2124 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
2117 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } | 2125 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } |
2118 | pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) } | 2126 | pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) } |
@@ -2134,7 +2142,7 @@ impl AstNode for Condition { | |||
2134 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2142 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2135 | } | 2143 | } |
2136 | impl Condition { | 2144 | impl Condition { |
2137 | pub fn let_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, LET_KW) } | 2145 | pub fn let_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![let]) } |
2138 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 2146 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
2139 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } | 2147 | pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) } |
2140 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 2148 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
@@ -2203,7 +2211,7 @@ impl ast::AttrsOwner for SelfParam {} | |||
2203 | impl SelfParam { | 2211 | impl SelfParam { |
2204 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } | 2212 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } |
2205 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 2213 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } |
2206 | pub fn self_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, SELF_KW) } | 2214 | pub fn self_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![self]) } |
2207 | } | 2215 | } |
2208 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2216 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
2209 | pub struct Param { | 2217 | pub struct Param { |
@@ -2244,7 +2252,7 @@ impl AstNode for UseItem { | |||
2244 | impl ast::AttrsOwner for UseItem {} | 2252 | impl ast::AttrsOwner for UseItem {} |
2245 | impl ast::VisibilityOwner for UseItem {} | 2253 | impl ast::VisibilityOwner for UseItem {} |
2246 | impl UseItem { | 2254 | impl UseItem { |
2247 | pub fn use_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, USE_KW) } | 2255 | pub fn use_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![use]) } |
2248 | pub fn use_tree(&self) -> Option<UseTree> { support::child(&self.syntax) } | 2256 | pub fn use_tree(&self) -> Option<UseTree> { support::child(&self.syntax) } |
2249 | } | 2257 | } |
2250 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2258 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -2285,7 +2293,7 @@ impl AstNode for Alias { | |||
2285 | } | 2293 | } |
2286 | impl ast::NameOwner for Alias {} | 2294 | impl ast::NameOwner for Alias {} |
2287 | impl Alias { | 2295 | impl Alias { |
2288 | pub fn as_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, AS_KW) } | 2296 | pub fn as_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![as]) } |
2289 | } | 2297 | } |
2290 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2298 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
2291 | pub struct UseTreeList { | 2299 | pub struct UseTreeList { |
@@ -2325,8 +2333,8 @@ impl AstNode for ExternCrateItem { | |||
2325 | impl ast::AttrsOwner for ExternCrateItem {} | 2333 | impl ast::AttrsOwner for ExternCrateItem {} |
2326 | impl ast::VisibilityOwner for ExternCrateItem {} | 2334 | impl ast::VisibilityOwner for ExternCrateItem {} |
2327 | impl ExternCrateItem { | 2335 | impl ExternCrateItem { |
2328 | pub fn extern_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, EXTERN_KW) } | 2336 | pub fn extern_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![extern]) } |
2329 | pub fn crate_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, CRATE_KW) } | 2337 | pub fn crate_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![crate]) } |
2330 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } | 2338 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } |
2331 | pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) } | 2339 | pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) } |
2332 | } | 2340 | } |