aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/ast_src.rs
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/ast_src.rs')
-rw-r--r--xtask/src/ast_src.rs29
1 files changed, 12 insertions, 17 deletions
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs
index 9c02f7c6f..fe3eb85de 100644
--- a/xtask/src/ast_src.rs
+++ b/xtask/src/ast_src.rs
@@ -162,7 +162,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc {
162 "RECORD_LIT", 162 "RECORD_LIT",
163 "RECORD_FIELD_LIST", 163 "RECORD_FIELD_LIST",
164 "RECORD_FIELD", 164 "RECORD_FIELD",
165 "TRY_BLOCK_EXPR", 165 "EFFECT_EXPR",
166 "BOX_EXPR", 166 "BOX_EXPR",
167 // postfix 167 // postfix
168 "CALL_EXPR", 168 "CALL_EXPR",
@@ -177,7 +177,6 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc {
177 "PREFIX_EXPR", 177 "PREFIX_EXPR",
178 "RANGE_EXPR", // just weird 178 "RANGE_EXPR", // just weird
179 "BIN_EXPR", 179 "BIN_EXPR",
180 "BLOCK",
181 "EXTERN_BLOCK", 180 "EXTERN_BLOCK",
182 "EXTERN_ITEM_LIST", 181 "EXTERN_ITEM_LIST",
183 "ENUM_VARIANT", 182 "ENUM_VARIANT",
@@ -306,7 +305,7 @@ macro_rules! ast_enums {
306pub(crate) const AST_SRC: AstSrc = AstSrc { 305pub(crate) const AST_SRC: AstSrc = AstSrc {
307 tokens: &["Whitespace", "Comment", "String", "RawString"], 306 tokens: &["Whitespace", "Comment", "String", "RawString"],
308 nodes: &ast_nodes! { 307 nodes: &ast_nodes! {
309 struct SourceFile: ModuleItemOwner, AttrsOwner { 308 struct SourceFile: ModuleItemOwner, AttrsOwner, DocCommentsOwner {
310 modules: [Module], 309 modules: [Module],
311 } 310 }
312 311
@@ -374,7 +373,7 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
374 373
375 struct ItemList: ModuleItemOwner { 374 struct ItemList: ModuleItemOwner {
376 T!['{'], 375 T!['{'],
377 impl_items: [ImplItem], 376 assoc_items: [AssocItem],
378 T!['}'] 377 T!['}']
379 } 378 }
380 379
@@ -402,7 +401,7 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
402 T![;] 401 T![;]
403 } 402 }
404 403
405 struct ImplDef: TypeParamsOwner, AttrsOwner { 404 struct ImplDef: TypeParamsOwner, AttrsOwner, DocCommentsOwner {
406 T![default], 405 T![default],
407 T![const], 406 T![const],
408 T![unsafe], 407 T![unsafe],
@@ -440,7 +439,7 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
440 } 439 }
441 struct IfExpr: AttrsOwner { T![if], Condition } 440 struct IfExpr: AttrsOwner { T![if], Condition }
442 struct LoopExpr: AttrsOwner, LoopBodyOwner { T![loop] } 441 struct LoopExpr: AttrsOwner, LoopBodyOwner { T![loop] }
443 struct TryBlockExpr: AttrsOwner { T![try], body: BlockExpr } 442 struct EffectExpr: AttrsOwner { Label, T![try], T![unsafe], T![async], BlockExpr }
444 struct ForExpr: AttrsOwner, LoopBodyOwner { 443 struct ForExpr: AttrsOwner, LoopBodyOwner {
445 T![for], 444 T![for],
446 Pat, 445 Pat,
@@ -451,7 +450,9 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
451 struct ContinueExpr: AttrsOwner { T![continue], T![lifetime] } 450 struct ContinueExpr: AttrsOwner { T![continue], T![lifetime] }
452 struct BreakExpr: AttrsOwner { T![break], T![lifetime], Expr } 451 struct BreakExpr: AttrsOwner { T![break], T![lifetime], Expr }
453 struct Label { T![lifetime] } 452 struct Label { T![lifetime] }
454 struct BlockExpr: AttrsOwner { Label, T![unsafe], Block } 453 struct BlockExpr: AttrsOwner, ModuleItemOwner {
454 T!['{'], statements: [Stmt], Expr, T!['}'],
455 }
455 struct ReturnExpr: AttrsOwner { Expr } 456 struct ReturnExpr: AttrsOwner { Expr }
456 struct CallExpr: ArgListOwner { Expr } 457 struct CallExpr: ArgListOwner { Expr }
457 struct MethodCallExpr: AttrsOwner, ArgListOwner { 458 struct MethodCallExpr: AttrsOwner, ArgListOwner {
@@ -460,7 +461,7 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
460 struct IndexExpr: AttrsOwner { T!['['], T![']'] } 461 struct IndexExpr: AttrsOwner { T!['['], T![']'] }
461 struct FieldExpr: AttrsOwner { Expr, T![.], NameRef } 462 struct FieldExpr: AttrsOwner { Expr, T![.], NameRef }
462 struct AwaitExpr: AttrsOwner { Expr, T![.], T![await] } 463 struct AwaitExpr: AttrsOwner { Expr, T![.], T![await] }
463 struct TryExpr: AttrsOwner { T![try], Expr } 464 struct TryExpr: AttrsOwner { Expr, T![?] }
464 struct CastExpr: AttrsOwner { Expr, T![as], TypeRef } 465 struct CastExpr: AttrsOwner { Expr, T![as], TypeRef }
465 struct RefExpr: AttrsOwner { T![&], T![raw], T![mut], Expr } 466 struct RefExpr: AttrsOwner { T![&], T![raw], T![mut], Expr }
466 struct PrefixExpr: AttrsOwner { /*PrefixOp,*/ Expr } 467 struct PrefixExpr: AttrsOwner { /*PrefixOp,*/ Expr }
@@ -556,12 +557,6 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
556 T![;], 557 T![;],
557 } 558 }
558 struct Condition { T![let], Pat, T![=], Expr } 559 struct Condition { T![let], Pat, T![=], Expr }
559 struct Block: AttrsOwner, ModuleItemOwner {
560 T!['{'],
561 statements: [Stmt],
562 Expr,
563 T!['}'],
564 }
565 struct ParamList { 560 struct ParamList {
566 T!['('], 561 T!['('],
567 SelfParam, 562 SelfParam,
@@ -595,7 +590,7 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
595 qualifier: Path, 590 qualifier: Path,
596 } 591 }
597 struct PathSegment { 592 struct PathSegment {
598 T![::], T![<], NameRef, TypeArgList, ParamList, RetType, PathType, T![>] 593 T![::], T![crate], T![self], T![super], T![<], NameRef, TypeArgList, ParamList, RetType, PathType, T![>]
599 } 594 }
600 struct TypeArgList { 595 struct TypeArgList {
601 T![::], 596 T![::],
@@ -690,7 +685,7 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
690 } 685 }
691 686
692 /* impl blocks can also contain MacroCall */ 687 /* impl blocks can also contain MacroCall */
693 enum ImplItem: NameOwner, AttrsOwner { 688 enum AssocItem: NameOwner, AttrsOwner {
694 FnDef, TypeAliasDef, ConstDef 689 FnDef, TypeAliasDef, ConstDef
695 } 690 }
696 691
@@ -722,7 +717,7 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
722 FieldExpr, 717 FieldExpr,
723 AwaitExpr, 718 AwaitExpr,
724 TryExpr, 719 TryExpr,
725 TryBlockExpr, 720 EffectExpr,
726 CastExpr, 721 CastExpr,
727 RefExpr, 722 RefExpr,
728 PrefixExpr, 723 PrefixExpr,