Skip to content
This repository was archived by the owner on Nov 9, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions rust.ungram
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ ExternItemList =
'{' Attr* ExternItem* '}'

ExternItem =
Fn | Static | MacroCall
Fn
| MacroCall
| Static

GenericParamList =
'<' (GenericParam (',' GenericParam)* ','?)? '>'
Expand Down Expand Up @@ -399,7 +401,7 @@ RecordExpr =
RecordExprFieldList =
'{'
Attr*
fields:(RecordExprField (',' RecordExprField)* ','?)
fields:(RecordExprField (',' RecordExprField)* ','?)?
('..' spread:Expr)?
'}'

Expand Down Expand Up @@ -485,15 +487,15 @@ BoxExpr =
Type =
ArrayType
| DynTraitType
| FnPointerType
| FnPtrType
| ForType
| ImplTraitType
| InferType
| NeverType
| ParenType
| PathType
| PointerType
| ReferenceType
| PtrType
| RefType
| SliceType
| TupleType

Expand All @@ -509,10 +511,10 @@ PathType =
TupleType =
'(' fields:(Type (',' Type)* ','?)? ')'

PointerType =
PtrType =
'*' ('const' | 'mut') Type

ReferenceType =
RefType =
'&' 'lifetime'? 'mut'? Type

ArrayType =
Expand All @@ -524,7 +526,7 @@ SliceType =
InferType =
'_'

FnPointerType =
FnPtrType =
'const'? 'async'? 'unsafe'? Abi? 'fn' ParamList RetType?

ForType =
Expand Down Expand Up @@ -584,7 +586,7 @@ RecordPat =

RecordPatFieldList =
'{'
fields:(RecordPatField (',' RecordPatField)* ','?)
fields:(RecordPatField (',' RecordPatField)* ','?)?
'..'?
'}'

Expand Down