diff options
author | Aleksey Kladov <[email protected]> | 2020-04-10 10:49:13 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-04-10 15:10:28 +0100 |
commit | 8d71a6bf0ca51ae099a5b470afdb957bca321441 (patch) | |
tree | 453aefb2a8fa3e554871f83b19b93017bf88b2ee /crates/ra_syntax/src/ast/generated/nodes.rs | |
parent | 779f06ed77e868b9409a1724f736a045415d4922 (diff) |
Scale token generation back
Diffstat (limited to 'crates/ra_syntax/src/ast/generated/nodes.rs')
-rw-r--r-- | crates/ra_syntax/src/ast/generated/nodes.rs | 124 |
1 files changed, 65 insertions, 59 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 106a91c12..d67d733b1 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs | |||
@@ -1,6 +1,5 @@ | |||
1 | //! Generated file, do not edit by hand, see `xtask/src/codegen` | 1 | //! Generated file, do not edit by hand, see `xtask/src/codegen` |
2 | 2 | ||
3 | use super::tokens::*; | ||
4 | use crate::{ | 3 | use crate::{ |
5 | ast::{self, support, AstChildren, AstNode}, | 4 | ast::{self, support, AstChildren, AstNode}, |
6 | SyntaxKind::{self, *}, | 5 | SyntaxKind::{self, *}, |
@@ -463,7 +462,7 @@ impl ImplDef { | |||
463 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) } | 462 | 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]) } | 463 | 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]) } | 464 | pub fn impl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![impl]) } |
466 | pub fn excl_token(&self) -> Option<Excl> { support::token(&self.syntax) } | 465 | pub fn excl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![!]) } |
467 | pub fn for_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![for]) } | 466 | pub fn for_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![for]) } |
468 | pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } | 467 | pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } |
469 | } | 468 | } |
@@ -523,7 +522,7 @@ impl AstNode for NeverType { | |||
523 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 522 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
524 | } | 523 | } |
525 | impl NeverType { | 524 | impl NeverType { |
526 | pub fn excl_token(&self) -> Option<Excl> { support::token(&self.syntax) } | 525 | pub fn excl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![!]) } |
527 | } | 526 | } |
528 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 527 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
529 | pub struct PathType { | 528 | pub struct PathType { |
@@ -559,7 +558,7 @@ impl AstNode for PointerType { | |||
559 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 558 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
560 | } | 559 | } |
561 | impl PointerType { | 560 | impl PointerType { |
562 | pub fn star_token(&self) -> Option<Star> { support::token(&self.syntax) } | 561 | pub fn star_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![*]) } |
563 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) } | 562 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) } |
564 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } | 563 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } |
565 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 564 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
@@ -622,8 +621,10 @@ impl AstNode for ReferenceType { | |||
622 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 621 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
623 | } | 622 | } |
624 | impl ReferenceType { | 623 | impl ReferenceType { |
625 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } | 624 | pub fn amp_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![&]) } |
626 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 625 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { |
626 | support::token2(&self.syntax, T![lifetime]) | ||
627 | } | ||
627 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } | 628 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } |
628 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 629 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
629 | } | 630 | } |
@@ -643,7 +644,7 @@ impl AstNode for PlaceholderType { | |||
643 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 644 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
644 | } | 645 | } |
645 | impl PlaceholderType { | 646 | impl PlaceholderType { |
646 | pub fn underscore_token(&self) -> Option<Underscore> { support::token(&self.syntax) } | 647 | pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![_]) } |
647 | } | 648 | } |
648 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 649 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
649 | pub struct FnPointerType { | 650 | pub struct FnPointerType { |
@@ -955,7 +956,9 @@ impl ContinueExpr { | |||
955 | pub fn continue_token(&self) -> Option<SyntaxToken> { | 956 | pub fn continue_token(&self) -> Option<SyntaxToken> { |
956 | support::token2(&self.syntax, T![continue]) | 957 | support::token2(&self.syntax, T![continue]) |
957 | } | 958 | } |
958 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 959 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { |
960 | support::token2(&self.syntax, T![lifetime]) | ||
961 | } | ||
959 | } | 962 | } |
960 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 963 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
961 | pub struct BreakExpr { | 964 | pub struct BreakExpr { |
@@ -975,7 +978,9 @@ impl AstNode for BreakExpr { | |||
975 | impl ast::AttrsOwner for BreakExpr {} | 978 | impl ast::AttrsOwner for BreakExpr {} |
976 | impl BreakExpr { | 979 | impl BreakExpr { |
977 | pub fn break_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![break]) } | 980 | pub fn break_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![break]) } |
978 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 981 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { |
982 | support::token2(&self.syntax, T![lifetime]) | ||
983 | } | ||
979 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 984 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
980 | } | 985 | } |
981 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 986 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -994,7 +999,9 @@ impl AstNode for Label { | |||
994 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 999 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
995 | } | 1000 | } |
996 | impl Label { | 1001 | impl Label { |
997 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 1002 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { |
1003 | support::token2(&self.syntax, T![lifetime]) | ||
1004 | } | ||
998 | } | 1005 | } |
999 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1006 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1000 | pub struct BlockExpr { | 1007 | pub struct BlockExpr { |
@@ -1074,7 +1081,7 @@ impl ast::AttrsOwner for MethodCallExpr {} | |||
1074 | impl ast::ArgListOwner for MethodCallExpr {} | 1081 | impl ast::ArgListOwner for MethodCallExpr {} |
1075 | impl MethodCallExpr { | 1082 | impl MethodCallExpr { |
1076 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1083 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1077 | pub fn dot_token(&self) -> Option<Dot> { support::token(&self.syntax) } | 1084 | pub fn dot_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![.]) } |
1078 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } | 1085 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } |
1079 | pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) } | 1086 | pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) } |
1080 | } | 1087 | } |
@@ -1116,7 +1123,7 @@ impl AstNode for FieldExpr { | |||
1116 | impl ast::AttrsOwner for FieldExpr {} | 1123 | impl ast::AttrsOwner for FieldExpr {} |
1117 | impl FieldExpr { | 1124 | impl FieldExpr { |
1118 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1125 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1119 | pub fn dot_token(&self) -> Option<Dot> { support::token(&self.syntax) } | 1126 | pub fn dot_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![.]) } |
1120 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } | 1127 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } |
1121 | } | 1128 | } |
1122 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1129 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1137,7 +1144,7 @@ impl AstNode for AwaitExpr { | |||
1137 | impl ast::AttrsOwner for AwaitExpr {} | 1144 | impl ast::AttrsOwner for AwaitExpr {} |
1138 | impl AwaitExpr { | 1145 | impl AwaitExpr { |
1139 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1146 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1140 | pub fn dot_token(&self) -> Option<Dot> { support::token(&self.syntax) } | 1147 | pub fn dot_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![.]) } |
1141 | pub fn await_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![await]) } | 1148 | pub fn await_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![await]) } |
1142 | } | 1149 | } |
1143 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1150 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1198,7 +1205,7 @@ impl AstNode for RefExpr { | |||
1198 | } | 1205 | } |
1199 | impl ast::AttrsOwner for RefExpr {} | 1206 | impl ast::AttrsOwner for RefExpr {} |
1200 | impl RefExpr { | 1207 | impl RefExpr { |
1201 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } | 1208 | pub fn amp_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![&]) } |
1202 | pub fn raw_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![raw]) } | 1209 | pub fn raw_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![raw]) } |
1203 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } | 1210 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } |
1204 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1211 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
@@ -1220,7 +1227,6 @@ impl AstNode for PrefixExpr { | |||
1220 | } | 1227 | } |
1221 | impl ast::AttrsOwner for PrefixExpr {} | 1228 | impl ast::AttrsOwner for PrefixExpr {} |
1222 | impl PrefixExpr { | 1229 | impl PrefixExpr { |
1223 | pub fn prefix_op_token(&self) -> Option<PrefixOp> { support::token(&self.syntax) } | ||
1224 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1230 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1225 | } | 1231 | } |
1226 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1232 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1259,9 +1265,7 @@ impl AstNode for RangeExpr { | |||
1259 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1265 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1260 | } | 1266 | } |
1261 | impl ast::AttrsOwner for RangeExpr {} | 1267 | impl ast::AttrsOwner for RangeExpr {} |
1262 | impl RangeExpr { | 1268 | impl RangeExpr {} |
1263 | pub fn range_op_token(&self) -> Option<RangeOp> { support::token(&self.syntax) } | ||
1264 | } | ||
1265 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1269 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1266 | pub struct BinExpr { | 1270 | pub struct BinExpr { |
1267 | pub(crate) syntax: SyntaxNode, | 1271 | pub(crate) syntax: SyntaxNode, |
@@ -1294,9 +1298,7 @@ impl AstNode for Literal { | |||
1294 | } | 1298 | } |
1295 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1299 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1296 | } | 1300 | } |
1297 | impl Literal { | 1301 | impl Literal {} |
1298 | pub fn literal_token_token(&self) -> Option<LiteralToken> { support::token(&self.syntax) } | ||
1299 | } | ||
1300 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1302 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1301 | pub struct MatchExpr { | 1303 | pub struct MatchExpr { |
1302 | pub(crate) syntax: SyntaxNode, | 1304 | pub(crate) syntax: SyntaxNode, |
@@ -1358,7 +1360,7 @@ impl ast::AttrsOwner for MatchArm {} | |||
1358 | impl MatchArm { | 1360 | impl MatchArm { |
1359 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 1361 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
1360 | pub fn guard(&self) -> Option<MatchGuard> { support::child(&self.syntax) } | 1362 | pub fn guard(&self) -> Option<MatchGuard> { support::child(&self.syntax) } |
1361 | pub fn fat_arrow_token(&self) -> Option<FatArrow> { support::token(&self.syntax) } | 1363 | pub fn fat_arrow_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![=>]) } |
1362 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1364 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1363 | } | 1365 | } |
1364 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1366 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1417,7 +1419,7 @@ impl AstNode for RecordFieldList { | |||
1417 | impl RecordFieldList { | 1419 | impl RecordFieldList { |
1418 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['{']) } | 1420 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['{']) } |
1419 | pub fn fields(&self) -> AstChildren<RecordField> { support::children(&self.syntax) } | 1421 | pub fn fields(&self) -> AstChildren<RecordField> { support::children(&self.syntax) } |
1420 | pub fn dotdot_token(&self) -> Option<Dotdot> { support::token(&self.syntax) } | 1422 | pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![..]) } |
1421 | pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) } | 1423 | pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) } |
1422 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['}']) } | 1424 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['}']) } |
1423 | } | 1425 | } |
@@ -1439,7 +1441,7 @@ impl AstNode for RecordField { | |||
1439 | impl ast::AttrsOwner for RecordField {} | 1441 | impl ast::AttrsOwner for RecordField {} |
1440 | impl RecordField { | 1442 | impl RecordField { |
1441 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } | 1443 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } |
1442 | pub fn colon_token(&self) -> Option<Colon> { support::token(&self.syntax) } | 1444 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![:]) } |
1443 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1445 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1444 | } | 1446 | } |
1445 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1447 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1496,7 +1498,7 @@ impl AstNode for RefPat { | |||
1496 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1498 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1497 | } | 1499 | } |
1498 | impl RefPat { | 1500 | impl RefPat { |
1499 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } | 1501 | pub fn amp_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![&]) } |
1500 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } | 1502 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } |
1501 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 1503 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
1502 | } | 1504 | } |
@@ -1539,7 +1541,7 @@ impl ast::NameOwner for BindPat {} | |||
1539 | impl BindPat { | 1541 | impl BindPat { |
1540 | pub fn ref_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![ref]) } | 1542 | pub fn ref_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![ref]) } |
1541 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } | 1543 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![mut]) } |
1542 | pub fn at_token(&self) -> Option<At> { support::token(&self.syntax) } | 1544 | pub fn at_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![@]) } |
1543 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 1545 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
1544 | } | 1546 | } |
1545 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1547 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1558,7 +1560,7 @@ impl AstNode for PlaceholderPat { | |||
1558 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1560 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1559 | } | 1561 | } |
1560 | impl PlaceholderPat { | 1562 | impl PlaceholderPat { |
1561 | pub fn underscore_token(&self) -> Option<Underscore> { support::token(&self.syntax) } | 1563 | pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![_]) } |
1562 | } | 1564 | } |
1563 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1565 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1564 | pub struct DotDotPat { | 1566 | pub struct DotDotPat { |
@@ -1576,7 +1578,7 @@ impl AstNode for DotDotPat { | |||
1576 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1578 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1577 | } | 1579 | } |
1578 | impl DotDotPat { | 1580 | impl DotDotPat { |
1579 | pub fn dotdot_token(&self) -> Option<Dotdot> { support::token(&self.syntax) } | 1581 | pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![..]) } |
1580 | } | 1582 | } |
1581 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1583 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1582 | pub struct PathPat { | 1584 | pub struct PathPat { |
@@ -1631,9 +1633,7 @@ impl AstNode for RangePat { | |||
1631 | } | 1633 | } |
1632 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1634 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1633 | } | 1635 | } |
1634 | impl RangePat { | 1636 | impl RangePat {} |
1635 | pub fn range_separator_token(&self) -> Option<RangeSeparator> { support::token(&self.syntax) } | ||
1636 | } | ||
1637 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1637 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1638 | pub struct LiteralPat { | 1638 | pub struct LiteralPat { |
1639 | pub(crate) syntax: SyntaxNode, | 1639 | pub(crate) syntax: SyntaxNode, |
@@ -1713,7 +1713,7 @@ impl RecordFieldPatList { | |||
1713 | support::children(&self.syntax) | 1713 | support::children(&self.syntax) |
1714 | } | 1714 | } |
1715 | pub fn bind_pats(&self) -> AstChildren<BindPat> { support::children(&self.syntax) } | 1715 | pub fn bind_pats(&self) -> AstChildren<BindPat> { support::children(&self.syntax) } |
1716 | pub fn dotdot_token(&self) -> Option<Dotdot> { support::token(&self.syntax) } | 1716 | pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![..]) } |
1717 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['}']) } | 1717 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['}']) } |
1718 | } | 1718 | } |
1719 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1719 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1734,7 +1734,7 @@ impl AstNode for RecordFieldPat { | |||
1734 | impl ast::AttrsOwner for RecordFieldPat {} | 1734 | impl ast::AttrsOwner for RecordFieldPat {} |
1735 | impl ast::NameOwner for RecordFieldPat {} | 1735 | impl ast::NameOwner for RecordFieldPat {} |
1736 | impl RecordFieldPat { | 1736 | impl RecordFieldPat { |
1737 | pub fn colon_token(&self) -> Option<Colon> { support::token(&self.syntax) } | 1737 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![:]) } |
1738 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 1738 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
1739 | } | 1739 | } |
1740 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1740 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1815,7 +1815,7 @@ impl AstNode for Name { | |||
1815 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1815 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1816 | } | 1816 | } |
1817 | impl Name { | 1817 | impl Name { |
1818 | pub fn ident_token(&self) -> Option<Ident> { support::token(&self.syntax) } | 1818 | pub fn ident_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![ident]) } |
1819 | } | 1819 | } |
1820 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1820 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1821 | pub struct NameRef { | 1821 | pub struct NameRef { |
@@ -1832,9 +1832,7 @@ impl AstNode for NameRef { | |||
1832 | } | 1832 | } |
1833 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1833 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1834 | } | 1834 | } |
1835 | impl NameRef { | 1835 | impl NameRef {} |
1836 | pub fn name_ref_token_token(&self) -> Option<NameRefToken> { support::token(&self.syntax) } | ||
1837 | } | ||
1838 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1836 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1839 | pub struct MacroCall { | 1837 | pub struct MacroCall { |
1840 | pub(crate) syntax: SyntaxNode, | 1838 | pub(crate) syntax: SyntaxNode, |
@@ -1855,7 +1853,7 @@ impl ast::AttrsOwner for MacroCall {} | |||
1855 | impl ast::DocCommentsOwner for MacroCall {} | 1853 | impl ast::DocCommentsOwner for MacroCall {} |
1856 | impl MacroCall { | 1854 | impl MacroCall { |
1857 | pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } | 1855 | pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } |
1858 | pub fn excl_token(&self) -> Option<Excl> { support::token(&self.syntax) } | 1856 | pub fn excl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![!]) } |
1859 | pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) } | 1857 | pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) } |
1860 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) } | 1858 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![;]) } |
1861 | } | 1859 | } |
@@ -1875,8 +1873,8 @@ impl AstNode for Attr { | |||
1875 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1873 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1876 | } | 1874 | } |
1877 | impl Attr { | 1875 | impl Attr { |
1878 | pub fn pound_token(&self) -> Option<Pound> { support::token(&self.syntax) } | 1876 | pub fn pound_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![#]) } |
1879 | pub fn excl_token(&self) -> Option<Excl> { support::token(&self.syntax) } | 1877 | pub fn excl_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![!]) } |
1880 | pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['[']) } | 1878 | pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T!['[']) } |
1881 | pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } | 1879 | pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } |
1882 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![=]) } | 1880 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![=]) } |
@@ -1915,12 +1913,12 @@ impl AstNode for TypeParamList { | |||
1915 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1913 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1916 | } | 1914 | } |
1917 | impl TypeParamList { | 1915 | impl TypeParamList { |
1918 | pub fn l_angle_token(&self) -> Option<LAngle> { support::token(&self.syntax) } | 1916 | pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![<]) } |
1919 | pub fn generic_params(&self) -> AstChildren<GenericParam> { support::children(&self.syntax) } | 1917 | pub fn generic_params(&self) -> AstChildren<GenericParam> { support::children(&self.syntax) } |
1920 | pub fn type_params(&self) -> AstChildren<TypeParam> { support::children(&self.syntax) } | 1918 | pub fn type_params(&self) -> AstChildren<TypeParam> { support::children(&self.syntax) } |
1921 | pub fn lifetime_params(&self) -> AstChildren<LifetimeParam> { support::children(&self.syntax) } | 1919 | pub fn lifetime_params(&self) -> AstChildren<LifetimeParam> { support::children(&self.syntax) } |
1922 | pub fn const_params(&self) -> AstChildren<ConstParam> { support::children(&self.syntax) } | 1920 | pub fn const_params(&self) -> AstChildren<ConstParam> { support::children(&self.syntax) } |
1923 | pub fn r_angle_token(&self) -> Option<RAngle> { support::token(&self.syntax) } | 1921 | pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![>]) } |
1924 | } | 1922 | } |
1925 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1923 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1926 | pub struct TypeParam { | 1924 | pub struct TypeParam { |
@@ -1983,7 +1981,9 @@ impl AstNode for LifetimeParam { | |||
1983 | } | 1981 | } |
1984 | impl ast::AttrsOwner for LifetimeParam {} | 1982 | impl ast::AttrsOwner for LifetimeParam {} |
1985 | impl LifetimeParam { | 1983 | impl LifetimeParam { |
1986 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 1984 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { |
1985 | support::token2(&self.syntax, T![lifetime]) | ||
1986 | } | ||
1987 | } | 1987 | } |
1988 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1988 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1989 | pub struct TypeBound { | 1989 | pub struct TypeBound { |
@@ -2001,7 +2001,9 @@ impl AstNode for TypeBound { | |||
2001 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2001 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2002 | } | 2002 | } |
2003 | impl TypeBound { | 2003 | impl TypeBound { |
2004 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 2004 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { |
2005 | support::token2(&self.syntax, T![lifetime]) | ||
2006 | } | ||
2005 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) } | 2007 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![const]) } |
2006 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 2008 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
2007 | } | 2009 | } |
@@ -2040,7 +2042,9 @@ impl AstNode for WherePred { | |||
2040 | } | 2042 | } |
2041 | impl ast::TypeBoundsOwner for WherePred {} | 2043 | impl ast::TypeBoundsOwner for WherePred {} |
2042 | impl WherePred { | 2044 | impl WherePred { |
2043 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 2045 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { |
2046 | support::token2(&self.syntax, T![lifetime]) | ||
2047 | } | ||
2044 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 2048 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
2045 | } | 2049 | } |
2046 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2050 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -2077,9 +2081,7 @@ impl AstNode for Abi { | |||
2077 | } | 2081 | } |
2078 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2082 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2079 | } | 2083 | } |
2080 | impl Abi { | 2084 | impl Abi {} |
2081 | pub fn string_token(&self) -> Option<String> { support::token(&self.syntax) } | ||
2082 | } | ||
2083 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2085 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
2084 | pub struct ExprStmt { | 2086 | pub struct ExprStmt { |
2085 | pub(crate) syntax: SyntaxNode, | 2087 | pub(crate) syntax: SyntaxNode, |
@@ -2207,8 +2209,10 @@ impl AstNode for SelfParam { | |||
2207 | impl ast::TypeAscriptionOwner for SelfParam {} | 2209 | impl ast::TypeAscriptionOwner for SelfParam {} |
2208 | impl ast::AttrsOwner for SelfParam {} | 2210 | impl ast::AttrsOwner for SelfParam {} |
2209 | impl SelfParam { | 2211 | impl SelfParam { |
2210 | pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) } | 2212 | pub fn amp_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![&]) } |
2211 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 2213 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { |
2214 | support::token2(&self.syntax, T![lifetime]) | ||
2215 | } | ||
2212 | pub fn self_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![self]) } | 2216 | pub fn self_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![self]) } |
2213 | } | 2217 | } |
2214 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2218 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -2230,7 +2234,7 @@ impl ast::TypeAscriptionOwner for Param {} | |||
2230 | impl ast::AttrsOwner for Param {} | 2234 | impl ast::AttrsOwner for Param {} |
2231 | impl Param { | 2235 | impl Param { |
2232 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 2236 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
2233 | pub fn dotdotdot_token(&self) -> Option<Dotdotdot> { support::token(&self.syntax) } | 2237 | pub fn dotdotdot_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![...]) } |
2234 | } | 2238 | } |
2235 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2239 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
2236 | pub struct UseItem { | 2240 | pub struct UseItem { |
@@ -2270,7 +2274,7 @@ impl AstNode for UseTree { | |||
2270 | } | 2274 | } |
2271 | impl UseTree { | 2275 | impl UseTree { |
2272 | pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } | 2276 | pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } |
2273 | pub fn star_token(&self) -> Option<Star> { support::token(&self.syntax) } | 2277 | pub fn star_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![*]) } |
2274 | pub fn use_tree_list(&self) -> Option<UseTreeList> { support::child(&self.syntax) } | 2278 | pub fn use_tree_list(&self) -> Option<UseTreeList> { support::child(&self.syntax) } |
2275 | pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) } | 2279 | pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) } |
2276 | } | 2280 | } |
@@ -2391,14 +2395,14 @@ impl AstNode for PathSegment { | |||
2391 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2395 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2392 | } | 2396 | } |
2393 | impl PathSegment { | 2397 | impl PathSegment { |
2394 | pub fn coloncolon_token(&self) -> Option<Coloncolon> { support::token(&self.syntax) } | 2398 | pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![::]) } |
2395 | pub fn l_angle_token(&self) -> Option<LAngle> { support::token(&self.syntax) } | 2399 | pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![<]) } |
2396 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } | 2400 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } |
2397 | pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) } | 2401 | pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) } |
2398 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } | 2402 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } |
2399 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } | 2403 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } |
2400 | pub fn path_type(&self) -> Option<PathType> { support::child(&self.syntax) } | 2404 | pub fn path_type(&self) -> Option<PathType> { support::child(&self.syntax) } |
2401 | pub fn r_angle_token(&self) -> Option<RAngle> { support::token(&self.syntax) } | 2405 | pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![>]) } |
2402 | } | 2406 | } |
2403 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2407 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
2404 | pub struct TypeArgList { | 2408 | pub struct TypeArgList { |
@@ -2416,14 +2420,14 @@ impl AstNode for TypeArgList { | |||
2416 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2420 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2417 | } | 2421 | } |
2418 | impl TypeArgList { | 2422 | impl TypeArgList { |
2419 | pub fn coloncolon_token(&self) -> Option<Coloncolon> { support::token(&self.syntax) } | 2423 | pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![::]) } |
2420 | pub fn l_angle_token(&self) -> Option<LAngle> { support::token(&self.syntax) } | 2424 | pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![<]) } |
2421 | pub fn generic_args(&self) -> AstChildren<GenericArg> { support::children(&self.syntax) } | 2425 | pub fn generic_args(&self) -> AstChildren<GenericArg> { support::children(&self.syntax) } |
2422 | pub fn type_args(&self) -> AstChildren<TypeArg> { support::children(&self.syntax) } | 2426 | pub fn type_args(&self) -> AstChildren<TypeArg> { support::children(&self.syntax) } |
2423 | pub fn lifetime_args(&self) -> AstChildren<LifetimeArg> { support::children(&self.syntax) } | 2427 | pub fn lifetime_args(&self) -> AstChildren<LifetimeArg> { support::children(&self.syntax) } |
2424 | pub fn assoc_type_args(&self) -> AstChildren<AssocTypeArg> { support::children(&self.syntax) } | 2428 | pub fn assoc_type_args(&self) -> AstChildren<AssocTypeArg> { support::children(&self.syntax) } |
2425 | pub fn const_args(&self) -> AstChildren<ConstArg> { support::children(&self.syntax) } | 2429 | pub fn const_args(&self) -> AstChildren<ConstArg> { support::children(&self.syntax) } |
2426 | pub fn r_angle_token(&self) -> Option<RAngle> { support::token(&self.syntax) } | 2430 | pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token2(&self.syntax, T![>]) } |
2427 | } | 2431 | } |
2428 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2432 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
2429 | pub struct TypeArg { | 2433 | pub struct TypeArg { |
@@ -2480,7 +2484,9 @@ impl AstNode for LifetimeArg { | |||
2480 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2484 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2481 | } | 2485 | } |
2482 | impl LifetimeArg { | 2486 | impl LifetimeArg { |
2483 | pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) } | 2487 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { |
2488 | support::token2(&self.syntax, T![lifetime]) | ||
2489 | } | ||
2484 | } | 2490 | } |
2485 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 2491 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
2486 | pub struct ConstArg { | 2492 | pub struct ConstArg { |