aboutsummaryrefslogtreecommitdiff
path: root/xtask
diff options
context:
space:
mode:
Diffstat (limited to 'xtask')
-rw-r--r--xtask/src/ast_src.rs6
-rw-r--r--xtask/src/codegen/rust.ungram21
2 files changed, 14 insertions, 13 deletions
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs
index b81985851..38709c63e 100644
--- a/xtask/src/ast_src.rs
+++ b/xtask/src/ast_src.rs
@@ -159,9 +159,9 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc {
159 "MATCH_ARM_LIST", 159 "MATCH_ARM_LIST",
160 "MATCH_ARM", 160 "MATCH_ARM",
161 "MATCH_GUARD", 161 "MATCH_GUARD",
162 "RECORD_LIT", 162 "RECORD_EXPR",
163 "RECORD_FIELD_LIST", 163 "RECORD_EXPR_FIELD_LIST",
164 "RECORD_FIELD", 164 "RECORD_EXPR_FIELD",
165 "EFFECT_EXPR", 165 "EFFECT_EXPR",
166 "BOX_EXPR", 166 "BOX_EXPR",
167 // postfix 167 // postfix
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram
index 833ffd9e0..49b2c9ff8 100644
--- a/xtask/src/codegen/rust.ungram
+++ b/xtask/src/codegen/rust.ungram
@@ -82,10 +82,6 @@ StructDef =
82 | TupleFieldDefList WhereClause? ';' 82 | TupleFieldDefList WhereClause? ';'
83 ) 83 )
84 84
85UnionDef =
86 Attr* Visibility? 'union' Name GenericParamList? WhereClause?
87 RecordFieldDefList
88
89RecordFieldDefList = 85RecordFieldDefList =
90 '{' fields:RecordFieldDef* '}' 86 '{' fields:RecordFieldDef* '}'
91 87
@@ -102,6 +98,11 @@ FieldDefList =
102 RecordFieldDefList 98 RecordFieldDefList
103| TupleFieldDefList 99| TupleFieldDefList
104 100
101
102UnionDef =
103 Attr* Visibility? 'union' Name GenericParamList? WhereClause?
104 RecordFieldDefList
105
105EnumDef = 106EnumDef =
106 Attr* Visibility? 'enum' Name GenericParamList? WhereClause? 107 Attr* Visibility? 'enum' Name GenericParamList? WhereClause?
107 variant_list:EnumVariantList 108 variant_list:EnumVariantList
@@ -284,16 +285,16 @@ MatchArm =
284MatchGuard = 285MatchGuard =
285 'if' Expr 286 'if' Expr
286 287
287RecordLit = 288RecordExpr =
288 Path RecordFieldList 289 Path RecordExprFieldList
289 290
290RecordFieldList = 291RecordExprFieldList =
291 '{' 292 '{'
292 fields:RecordField* 293 fields:RecordExprField*
293 ('..' spread:Expr)? 294 ('..' spread:Expr)?
294 '}' 295 '}'
295 296
296RecordField = 297RecordExprField =
297 Attr* NameRef (':' Expr)? 298 Attr* NameRef (':' Expr)?
298 299
299OrPat = 300OrPat =
@@ -522,7 +523,7 @@ Expr =
522| BlockExpr 523| BlockExpr
523| ReturnExpr 524| ReturnExpr
524| MatchExpr 525| MatchExpr
525| RecordLit 526| RecordExpr
526| CallExpr 527| CallExpr
527| IndexExpr 528| IndexExpr
528| MethodCallExpr 529| MethodCallExpr