aboutsummaryrefslogtreecommitdiff
path: root/xtask
diff options
context:
space:
mode:
Diffstat (limited to 'xtask')
-rw-r--r--xtask/src/ast_src.rs18
-rw-r--r--xtask/src/codegen/gen_syntax.rs1
2 files changed, 9 insertions, 10 deletions
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs
index bdd42cb76..028f7cbe1 100644
--- a/xtask/src/ast_src.rs
+++ b/xtask/src/ast_src.rs
@@ -162,6 +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 "EFFECT_EXPR",
165 "BOX_EXPR", 166 "BOX_EXPR",
166 // postfix 167 // postfix
167 "CALL_EXPR", 168 "CALL_EXPR",
@@ -176,7 +177,6 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc {
176 "PREFIX_EXPR", 177 "PREFIX_EXPR",
177 "RANGE_EXPR", // just weird 178 "RANGE_EXPR", // just weird
178 "BIN_EXPR", 179 "BIN_EXPR",
179 "BLOCK",
180 "EXTERN_BLOCK", 180 "EXTERN_BLOCK",
181 "EXTERN_ITEM_LIST", 181 "EXTERN_ITEM_LIST",
182 "ENUM_VARIANT", 182 "ENUM_VARIANT",
@@ -439,6 +439,7 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
439 } 439 }
440 struct IfExpr: AttrsOwner { T![if], Condition } 440 struct IfExpr: AttrsOwner { T![if], Condition }
441 struct LoopExpr: AttrsOwner, LoopBodyOwner { T![loop] } 441 struct LoopExpr: AttrsOwner, LoopBodyOwner { T![loop] }
442 struct EffectExpr: AttrsOwner { Label, T![try], T![unsafe], T![async], BlockExpr }
442 struct ForExpr: AttrsOwner, LoopBodyOwner { 443 struct ForExpr: AttrsOwner, LoopBodyOwner {
443 T![for], 444 T![for],
444 Pat, 445 Pat,
@@ -449,7 +450,9 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
449 struct ContinueExpr: AttrsOwner { T![continue], T![lifetime] } 450 struct ContinueExpr: AttrsOwner { T![continue], T![lifetime] }
450 struct BreakExpr: AttrsOwner { T![break], T![lifetime], Expr } 451 struct BreakExpr: AttrsOwner { T![break], T![lifetime], Expr }
451 struct Label { T![lifetime] } 452 struct Label { T![lifetime] }
452 struct BlockExpr: AttrsOwner { Label, T![unsafe], T![async], Block } 453 struct BlockExpr: AttrsOwner, ModuleItemOwner {
454 T!['{'], statements: [Stmt], Expr, T!['}'],
455 }
453 struct ReturnExpr: AttrsOwner { Expr } 456 struct ReturnExpr: AttrsOwner { Expr }
454 struct CallExpr: ArgListOwner { Expr } 457 struct CallExpr: ArgListOwner { Expr }
455 struct MethodCallExpr: AttrsOwner, ArgListOwner { 458 struct MethodCallExpr: AttrsOwner, ArgListOwner {
@@ -458,7 +461,7 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
458 struct IndexExpr: AttrsOwner { T!['['], T![']'] } 461 struct IndexExpr: AttrsOwner { T!['['], T![']'] }
459 struct FieldExpr: AttrsOwner { Expr, T![.], NameRef } 462 struct FieldExpr: AttrsOwner { Expr, T![.], NameRef }
460 struct AwaitExpr: AttrsOwner { Expr, T![.], T![await] } 463 struct AwaitExpr: AttrsOwner { Expr, T![.], T![await] }
461 struct TryExpr: AttrsOwner { T![try], Expr } 464 struct TryExpr: AttrsOwner { Expr, T![?] }
462 struct CastExpr: AttrsOwner { Expr, T![as], TypeRef } 465 struct CastExpr: AttrsOwner { Expr, T![as], TypeRef }
463 struct RefExpr: AttrsOwner { T![&], T![raw], T![mut], Expr } 466 struct RefExpr: AttrsOwner { T![&], T![raw], T![mut], Expr }
464 struct PrefixExpr: AttrsOwner { /*PrefixOp,*/ Expr } 467 struct PrefixExpr: AttrsOwner { /*PrefixOp,*/ Expr }
@@ -554,12 +557,6 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
554 T![;], 557 T![;],
555 } 558 }
556 struct Condition { T![let], Pat, T![=], Expr } 559 struct Condition { T![let], Pat, T![=], Expr }
557 struct Block: AttrsOwner, ModuleItemOwner {
558 T!['{'],
559 statements: [Stmt],
560 Expr,
561 T!['}'],
562 }
563 struct ParamList { 560 struct ParamList {
564 T!['('], 561 T!['('],
565 SelfParam, 562 SelfParam,
@@ -593,7 +590,7 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
593 qualifier: Path, 590 qualifier: Path,
594 } 591 }
595 struct PathSegment { 592 struct PathSegment {
596 T![::], T![crate], T![<], NameRef, TypeArgList, ParamList, RetType, PathType, T![>] 593 T![::], T![crate], T![self], T![super], T![<], NameRef, TypeArgList, ParamList, RetType, PathType, T![>]
597 } 594 }
598 struct TypeArgList { 595 struct TypeArgList {
599 T![::], 596 T![::],
@@ -720,6 +717,7 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
720 FieldExpr, 717 FieldExpr,
721 AwaitExpr, 718 AwaitExpr,
722 TryExpr, 719 TryExpr,
720 EffectExpr,
723 CastExpr, 721 CastExpr,
724 RefExpr, 722 RefExpr,
725 PrefixExpr, 723 PrefixExpr,
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs
index e9dc09552..8028575c5 100644
--- a/xtask/src/codegen/gen_syntax.rs
+++ b/xtask/src/codegen/gen_syntax.rs
@@ -432,6 +432,7 @@ impl Field<'_> {
432 ":" => "colon", 432 ":" => "colon",
433 "::" => "coloncolon", 433 "::" => "coloncolon",
434 "#" => "pound", 434 "#" => "pound",
435 "?" => "question_mark",
435 _ => name, 436 _ => name,
436 }; 437 };
437 format_ident!("{}_token", name) 438 format_ident!("{}_token", name)