@@ -120,7 +120,7 @@ Type ::= [‘implicit’] FunArgTypes ‘=>’ Type
120
120
| HkTypeParamClause ‘=>’ Type
121
121
| InfixType
122
122
FunArgTypes ::= InfixType
123
- | ‘(’ [ FunArgType {‘,’ FunArgType } ] ‘)’
123
+ | ‘(’ [ FunArgType {‘,’ FunArgType } ] ‘)’
124
124
InfixType ::= RefinedType {id [nl] RefinedType}
125
125
RefinedType ::= WithType {[nl] Refinement}
126
126
WithType ::= AnnotType {‘with’ AnnotType}
@@ -134,7 +134,7 @@ SimpleType ::= SimpleType (TypeArgs | NamedTypeArgs)
134
134
| Refinement
135
135
| SimpleLiteral
136
136
ArgTypes ::= Type {‘,’ Type}
137
- | NamedTypeArg {‘,’ NamedTypeArg }
137
+ | NamedTypeArg {‘,’ NamedTypeArg}
138
138
FunArgType ::= Type
139
139
| ‘=>’ Type
140
140
ParamType ::= [‘=>’] ParamValueType
@@ -143,7 +143,7 @@ TypeArgs ::= ‘[’ ArgTypes ‘]’
143
143
NamedTypeArg ::= id ‘=’ Type
144
144
NamedTypeArgs ::= ‘[’ NamedTypeArg {‘,’ NamedTypeArg} ‘]’
145
145
Refinement ::= ‘{’ [Dcl] {semi [Dcl]} ‘}’
146
- TypeBounds ::= [‘>:’ Type] [`<: Type] | INT
146
+ TypeBounds ::= [‘>:’ Type] [‘<:’ Type] | INT
147
147
TypeParamBounds ::= TypeBounds {‘<%’ Type} {‘:’ Type}
148
148
149
149
Expr ::= [‘implicit’] FunParams ‘=>’ Expr
@@ -181,7 +181,7 @@ SimpleExpr ::= ‘new’ Template
181
181
SimpleExpr1 ::= Literal
182
182
| Path
183
183
| ‘_’
184
- | ‘(’ ExprsInParens2 ‘)’
184
+ | ‘(’ ExprsInParens ‘)’
185
185
| SimpleExpr ‘.’ id
186
186
| SimpleExpr (TypeArgs | NamedTypeArgs)
187
187
| SimpleExpr1 ArgumentExprs
@@ -231,7 +231,7 @@ PatVar ::= varid
231
231
| ‘_’
232
232
Patterns ::= Pattern {‘,’ Pattern}
233
233
ArgumentPatterns ::= ‘(’ [Patterns] ‘)’
234
- | ‘(’ [Patterns ‘,’] Pattern2 ‘:’ ‘_’ ‘*’ ')
234
+ | ‘(’ [Patterns ‘,’] Pattern2 ‘:’ ‘_’ ‘*’ ‘)’
235
235
```
236
236
237
237
### Type and Value Parameters
@@ -243,7 +243,7 @@ ClsTypeParam ::= {Annotation} [{Modifier} type] [‘+’ | ‘-’]
243
243
DefTypeParamClause::= ‘[’ DefTypeParam {‘,’ DefTypeParam} ‘]’
244
244
DefTypeParam ::= {Annotation} id [HkTypeParamClause] TypeParamBounds
245
245
246
- TypTypeParamCaluse ::= ‘[’ TypTypeParam {‘,’ TypTypeParam} ‘]’
246
+ TypTypeParamClause ::= ‘[’ TypTypeParam {‘,’ TypTypeParam} ‘]’
247
247
TypTypeParam ::= {Annotation} id [HkTypeParamClause] TypeBounds
248
248
249
249
HkTypeParamClause ::= ‘[’ HkTypeParam {‘,’ HkTypeParam} ‘]’
@@ -252,9 +252,8 @@ HkTypeParam ::= {Annotation} [‘+’ | ‘-’] (Id[HkTypeParamClause] |
252
252
253
253
ClsParamClauses ::= {ClsParamClause} [[nl] ‘(’ ‘implicit’ ClsParams ‘)’]
254
254
ClsParamClause ::= [nl] ‘(’ [ClsParams] ‘)’
255
- ClsParams ::= ClsParam {‘’ ClsParam}
256
- ClsParam ::= {Annotation}
257
- [{Modifier} (‘val’ | ‘var’) | ‘inline’] Param
255
+ ClsParams ::= ClsParam {‘,’ ClsParam}
256
+ ClsParam ::= {Annotation} [{Modifier} (‘val’ | ‘var’) | ‘inline’] Param
258
257
Param ::= id ‘:’ ParamType [‘=’ Expr]
259
258
| INT
260
259
@@ -266,7 +265,7 @@ DefParam ::= {Annotation} [‘inline’] Param
266
265
267
266
### Bindings and Imports
268
267
``` ebnf
269
- Bindings ::= ‘(’ Binding {‘,’ Binding}] ‘)’
268
+ Bindings ::= ‘(’ Binding {‘,’ Binding} ‘)’
270
269
Binding ::= (id | ‘_’) [‘:’ Type]
271
270
272
271
Modifier ::= LocalModifier
@@ -282,14 +281,13 @@ AccessQualifier ::= ‘[’ (id | ‘this’) ‘]’
282
281
283
282
Annotation ::= ‘@’ SimpleType {ParArgumentExprs}
284
283
285
- TemplateBody ::= [nl] ‘{’ [SelfType] TemplateStat {semi TemplateStat} `}
284
+ TemplateBody ::= [nl] ‘{’ [SelfType] TemplateStat {semi TemplateStat} ‘}’
286
285
TemplateStat ::= Import
287
286
| {Annotation [nl]} {Modifier} Def
288
287
| {Annotation [nl]} {Modifier} Dcl
289
288
| Expr1
290
- |
291
289
SelfType ::= id [‘:’ InfixType] ‘=>’
292
- | ‘this’ ‘:’ InfixType `=>
290
+ | ‘this’ ‘:’ InfixType ‘=>’
293
291
294
292
Import ::= ‘import’ ImportExpr {‘,’ ImportExpr}
295
293
ImportExpr ::= StableId ‘.’ (id | ‘_’ | ImportSelectors)
@@ -305,7 +303,6 @@ Dcl ::= ‘val’ ValDcl
305
303
| ‘type’ {nl} TypeDcl
306
304
| INT
307
305
308
-
309
306
ValDcl ::= ids ‘:’ Type
310
307
VarDcl ::= ids ‘:’ Type
311
308
DefDcl ::= DefSig [‘:’ Type]
0 commit comments