diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-30 15:24:20 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-30 15:24:20 +0100 |
commit | 282702c2877e3f9002308b1b63fc472b5e799c56 (patch) | |
tree | e8ddcc0575b012ab6e8fd099746f571cc4bf304c /xtask | |
parent | 323fd64abde2aced9427e4470b626a898b80a783 (diff) | |
parent | 6f8aa75329d0a4e588e58b8f22f7932bf3d3a706 (diff) |
Merge #5595
5595: Rename RecordLit -> RecordExpr r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask')
-rw-r--r-- | xtask/src/ast_src.rs | 6 | ||||
-rw-r--r-- | xtask/src/codegen/rust.ungram | 21 |
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 | ||
85 | UnionDef = | ||
86 | Attr* Visibility? 'union' Name GenericParamList? WhereClause? | ||
87 | RecordFieldDefList | ||
88 | |||
89 | RecordFieldDefList = | 85 | RecordFieldDefList = |
90 | '{' fields:RecordFieldDef* '}' | 86 | '{' fields:RecordFieldDef* '}' |
91 | 87 | ||
@@ -102,6 +98,11 @@ FieldDefList = | |||
102 | RecordFieldDefList | 98 | RecordFieldDefList |
103 | | TupleFieldDefList | 99 | | TupleFieldDefList |
104 | 100 | ||
101 | |||
102 | UnionDef = | ||
103 | Attr* Visibility? 'union' Name GenericParamList? WhereClause? | ||
104 | RecordFieldDefList | ||
105 | |||
105 | EnumDef = | 106 | EnumDef = |
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 = | |||
284 | MatchGuard = | 285 | MatchGuard = |
285 | 'if' Expr | 286 | 'if' Expr |
286 | 287 | ||
287 | RecordLit = | 288 | RecordExpr = |
288 | Path RecordFieldList | 289 | Path RecordExprFieldList |
289 | 290 | ||
290 | RecordFieldList = | 291 | RecordExprFieldList = |
291 | '{' | 292 | '{' |
292 | fields:RecordField* | 293 | fields:RecordExprField* |
293 | ('..' spread:Expr)? | 294 | ('..' spread:Expr)? |
294 | '}' | 295 | '}' |
295 | 296 | ||
296 | RecordField = | 297 | RecordExprField = |
297 | Attr* NameRef (':' Expr)? | 298 | Attr* NameRef (':' Expr)? |
298 | 299 | ||
299 | OrPat = | 300 | OrPat = |
@@ -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 |