@@ -199,6 +199,7 @@ SimpleType ::= SimpleLiteral
199
199
| Singleton ‘.’ id
200
200
| Singleton ‘.’ ‘type’
201
201
| ‘(’ [Types] ‘)’
202
+ | ‘(’ NameAndType {‘,’ NameAndType} ‘)’
202
203
| Refinement
203
204
| SimpleType TypeArgs
204
205
| SimpleType ‘#’ id
@@ -220,6 +221,7 @@ ContextBounds ::= ContextBound
220
221
| '{' ContextBound {',' ContextBound} '}'
221
222
ContextBound ::= Type ['as' id]
222
223
Types ::= Type {‘,’ Type}
224
+ NameAndType ::= id ‘:’ Type
223
225
```
224
226
225
227
### Expressions
@@ -268,6 +270,7 @@ SimpleExpr ::= SimpleRef
268
270
| ‘new’ ConstrApp {‘with’ ConstrApp} [TemplateBody]
269
271
| ‘new’ TemplateBody
270
272
| ‘(’ [ExprsInParens] ‘)’
273
+ | ‘(’ NamedExprInParens {‘,’ NamedExprInParens} ‘)’
271
274
| SimpleExpr ‘.’ id
272
275
| SimpleExpr ‘.’ MatchClause
273
276
| SimpleExpr TypeArgs
@@ -287,6 +290,7 @@ ExprInParens ::= PostfixExpr ‘:’ Type | Expr
287
290
ParArgumentExprs ::= ‘(’ [ExprsInParens] ‘)’
288
291
| ‘(’ ‘using’ ExprsInParens ‘)’
289
292
| ‘(’ [ExprsInParens ‘,’] PostfixExpr ‘*’ ‘)’
293
+ NamedExprInParens ::= id ‘=’ ExprInParens
290
294
ArgumentExprs ::= ParArgumentExprs
291
295
| BlockExpr
292
296
BlockExpr ::= <<< (CaseClauses | Block) >>>
@@ -333,7 +337,9 @@ SimplePattern1 ::= SimpleRef
333
337
| SimplePattern1 ‘.’ id
334
338
PatVar ::= varid
335
339
| ‘_’
340
+ NamedPattern ::= id ‘=’ Pattern
336
341
Patterns ::= Pattern {‘,’ Pattern}
342
+ | NamedPattern {‘,’ NamedPattern}
337
343
338
344
ArgumentPatterns ::= ‘(’ [Patterns] ‘)’
339
345
| ‘(’ [Patterns ‘,’] PatVar ‘*’ ‘)’
0 commit comments