@@ -145,17 +145,19 @@ NamedTypeArgs ::= ‘[’ NamedTypeArg {‘,’ NamedTypeArg} ‘]’
145
145
Refinement ::= ‘{’ [Dcl] {semi [Dcl]} ‘}’
146
146
TypeBounds ::= [‘>:’ Type] [‘<:’ Type] | INT
147
147
TypeParamBounds ::= TypeBounds {‘<%’ Type} {‘:’ Type}
148
+ ```
148
149
150
+ ### Expressions
151
+ ``` ebnf
149
152
Expr ::= [‘implicit’] FunParams ‘=>’ Expr
153
+ | Expr1
154
+ BlockResult ::= [‘implicit’] FunParams ‘=>’ Block
155
+ | Expr1
150
156
FunParams ::= Bindings
151
157
| id
152
158
| ‘_’
153
- ExprInParens ::= PostfixExpr ‘:’ Type
154
- | Expr
155
- BlockResult ::= [‘implicit’] FunParams ‘=>’ Block
156
- | Expr1
157
- Expr1 ::= ‘if’ ‘(’ Expr ‘)’ {nl} Expr [[semi] else Expr]
158
- | ‘if’ Expr ‘then’ Expr [[semi] else Expr]
159
+ Expr1 ::= ‘if’ ‘(’ Expr ‘)’ {nl} Expr [[semi] ‘else’ Expr]
160
+ | ‘if’ Expr ‘then’ Expr [[semi] ‘else’ Expr]
159
161
| ‘while’ ‘(’ Expr ‘)’ {nl} Expr
160
162
| ‘while’ Expr ‘do’ Expr
161
163
| ‘do’ Expr [semi] ‘while’ Expr
@@ -187,8 +189,10 @@ SimpleExpr1 ::= Literal
187
189
| SimpleExpr1 ArgumentExprs
188
190
| XmlExpr
189
191
ExprsInParens ::= ExprInParens {‘,’ ExprInParens}
190
- ParArgumentExprs ::= ‘(’ [ExprsInParens] ‘)’
191
- | ‘(’ [ExprsInParens ‘,’] PostfixExpr ‘:’ ‘_’ ‘*’ ‘)’
192
+ ExprInParens ::= PostfixExpr ‘:’ Type
193
+ | Expr
194
+ ParArgumentExprs ::= ‘(’ ExprsInParens ‘)’
195
+ | ‘(’ [ExprsInParens] PostfixExpr ‘:’ ‘_’ ‘*’ ‘)’
192
196
ArgumentExprs ::= ParArgumentExprs
193
197
| [nl] BlockExpr
194
198
BlockExpr ::= ‘{’ CaseClauses ‘}’
0 commit comments