diff options
Diffstat (limited to 'xtask/src')
-rw-r--r-- | xtask/src/codegen/rust.ungram | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index ba922af0d..28b50f021 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram | |||
@@ -83,22 +83,21 @@ StructDef = | |||
83 | ) | 83 | ) |
84 | 84 | ||
85 | RecordFieldList = | 85 | RecordFieldList = |
86 | '{' fields:RecordField* '}' | 86 | '{' fields:(RecordField (',' RecordField)* ','?)? '}' |
87 | 87 | ||
88 | RecordField = | 88 | RecordField = |
89 | Attr* Visibility? Name ':' ascribed_type:TypeRef | 89 | Attr* Visibility? Name ':' ascribed_type:TypeRef |
90 | 90 | ||
91 | TupleFieldList = | 91 | TupleFieldList = |
92 | '(' fields:TupleField* ')' | 92 | '(' fields:(TupleField (',' TupleField)* ','?)? ')' |
93 | 93 | ||
94 | TupleField = | 94 | TupleField = |
95 | Attr* Visibility? Name TypeRef | 95 | Attr* Visibility? TypeRef |
96 | 96 | ||
97 | FieldList = | 97 | FieldList = |
98 | RecordFieldList | 98 | RecordFieldList |
99 | | TupleFieldList | 99 | | TupleFieldList |
100 | 100 | ||
101 | |||
102 | UnionDef = | 101 | UnionDef = |
103 | Attr* Visibility? 'union' Name GenericParamList? WhereClause? | 102 | Attr* Visibility? 'union' Name GenericParamList? WhereClause? |
104 | RecordFieldList | 103 | RecordFieldList |