@@ -26,7 +26,7 @@ upper ::= ‘A’ | … | ‘Z’ | ‘\$’ | ‘_’ “… and U
2626lower ::= ‘a’ | … | ‘z’ “… and Unicode category Ll”
2727letter ::= upper | lower “… and Unicode categories Lo, Lt, Nl”
2828digit ::= ‘0’ | … | ‘9’
29- paren ::= ‘(’ | ‘)’ | ‘[’ | ‘]’ | ‘{’ | ‘}’
29+ paren ::= ‘(’ | ‘)’ | ‘[’ | ‘]’ | ‘{’ | ‘}’ | ‘'(’ | ‘'[’ | ‘'{’
3030delim ::= ‘`’ | ‘'’ | ‘"’ | ‘.’ | ‘;’ | ‘,’
3131opchar ::= “printableChar not matched by (whiteSpace | upper | lower |
3232 letter | digit | paren | delim | opchar | Unicode_Sm |
@@ -183,9 +183,9 @@ InfixExpr ::= PrefixExpr
183183PrefixExpr ::= [‘-’ | ‘+’ | ‘~’ | ‘!’] SimpleExpr PrefixOp(expr, op)
184184SimpleExpr ::= ‘new’ Template New(templ)
185185 | BlockExpr
186- | ‘'’ BlockExpr
187- | ‘'’ ‘ (’ ExprsInParens ‘)’
188- | ‘'’ ‘ [’ Type ‘]’
186+ | ''{’ BlockExprContents ‘}’
187+ | ‘'(’ ExprsInParens ‘)’
188+ | ‘'[’ Type ‘]’
189189 | SimpleExpr1 [‘_’] PostfixOp(expr, _)
190190SimpleExpr1 ::= Literal
191191 | Path
@@ -202,8 +202,8 @@ ParArgumentExprs ::= ‘(’ ExprsInParens ‘)’
202202 | ‘(’ [ExprsInParens] PostfixExpr ‘:’ ‘_’ ‘*’ ‘)’ exprs :+ Typed(expr, Ident(wildcardStar))
203203ArgumentExprs ::= ParArgumentExprs
204204 | [nl] BlockExpr
205- BlockExpr ::= ‘{’ CaseClauses ‘}’ Match(EmptyTree, cases)
206- | ‘{’ Block ‘}’ block // starts at {
205+ BlockExpr ::= ‘{’ BlockExprContents ‘}’
206+ BlockExprContents ::= CaseClauses | Block
207207Block ::= {BlockStat semi} [BlockResult] Block(stats, expr?)
208208BlockStat ::= Import
209209 | {Annotation} [‘implicit’ | ‘lazy’] Def
@@ -220,8 +220,8 @@ Enumerator ::= Generator
220220Generator ::= Pattern1 ‘<-’ Expr GenFrom(pat, expr)
221221Guard ::= ‘if’ PostfixExpr
222222
223- CaseClauses ::= CaseClause { CaseClause } CaseDef(pat, guard?, block) // block starts at =>
224- CaseClause ::= ‘case’ (Pattern [Guard] ‘=>’ Block | INT)
223+ CaseClauses ::= CaseClause { CaseClause } Match(EmptyTree, cases)
224+ CaseClause ::= ‘case’ (Pattern [Guard] ‘=>’ Block | INT) CaseDef(pat, guard?, block) // block starts at =>
225225
226226Pattern ::= Pattern1 { ‘|’ Pattern1 } Alternative(pats)
227227Pattern1 ::= PatVar ‘:’ RefinedType Bind(name, Typed(Ident(wildcard), tpe))
0 commit comments