@@ -209,22 +209,22 @@ Ascription ::= ‘:’ InfixType
209209Catches ::= ‘catch’ Expr
210210PostfixExpr ::= InfixExpr [id] PostfixOp(expr, op)
211211InfixExpr ::= PrefixExpr
212- | InfixExpr id [cnl ] InfixExpr InfixOp(expr, op, expr)
212+ | InfixExpr id [nl ] InfixExpr InfixOp(expr, op, expr)
213213 | InfixExpr ‘given’ (InfixExpr | ParArgumentExprs)
214214PrefixExpr ::= [‘-’ | ‘+’ | ‘~’ | ‘!’] SimpleExpr PrefixOp(expr, op)
215- SimpleExpr ::= ‘new’ (ConstrApp [TemplateBody] | TemplateBody) New(constr | templ)
215+ SimpleExpr ::= Path
216+ | Literal
217+ | ‘_’
216218 | BlockExpr
217219 | ‘$’ ‘{’ Block ‘}’
218220 | Quoted
219221 | quoteId // only inside splices
220- | SimpleExpr1 [‘_’] PostfixOp(expr, _)
221- SimpleExpr1 ::= Literal
222- | Path
223- | ‘_’
222+ | ‘new’ (ConstrApp [TemplateBody] | TemplateBody) New(constr | templ)
224223 | ‘(’ ExprsInParens ‘)’ Parens(exprs)
225224 | SimpleExpr ‘.’ id Select(expr, id)
226- | SimpleExpr (TypeArgs | NamedTypeArgs) TypeApply(expr, args)
227- | SimpleExpr1 ArgumentExprs Apply(expr, args)
225+ | SimpleExpr TypeArgs TypeApply(expr, args)
226+ | SimpleExpr ArgumentExprs Apply(expr, args)
227+ | SimpleExpr ‘_’ PostfixOp(expr, _)
228228 | XmlExpr
229229Quoted ::= ‘'’ ‘{’ Block ‘}’
230230 | ‘'’ ‘[’ Type ‘]’
@@ -234,8 +234,8 @@ ExprInParens ::= PostfixExpr ‘:’ Type
234234ParArgumentExprs ::= ‘(’ [‘given’] ExprsInParens ‘)’ exprs
235235 | ‘(’ [ExprsInParens ‘,’] PostfixExpr ‘:’ ‘_’ ‘*’ ‘)’ exprs :+ Typed(expr, Ident(wildcardStar))
236236ArgumentExprs ::= ParArgumentExprs
237- | [cnl ] BlockExpr
238- BlockExpr ::= ‘{’ CaseClauses | Block ‘}’
237+ | [nl ] BlockExpr
238+ BlockExpr ::= ‘{’ ( CaseClauses | Block) ‘}’
239239Block ::= {BlockStat semi} [BlockResult] Block(stats, expr?)
240240BlockStat ::= Import
241241 | {Annotation [nl]} [‘implicit’ | ‘lazy’] Def
@@ -263,7 +263,7 @@ Pattern ::= Pattern1 { ‘|’ Pattern1 }
263263Pattern1 ::= Pattern2 [‘:’ RefinedType] Bind(name, Typed(Ident(wildcard), tpe))
264264 | ‘given’ PatVar ‘:’ RefinedType
265265Pattern2 ::= [id ‘@’] InfixPattern Bind(name, pat)
266- InfixPattern ::= SimplePattern { id [cnl ] SimplePattern } InfixOp(pat, op, pat)
266+ InfixPattern ::= SimplePattern { id [nl ] SimplePattern } InfixOp(pat, op, pat)
267267SimplePattern ::= PatVar Ident(wildcard)
268268 | Literal Bind(name, Ident(wildcard))
269269 | ‘(’ [Patterns] ‘)’ Parens(pats) Tuple(pats)
@@ -400,7 +400,7 @@ ConstrExpr ::= SelfInvocation
400400 | ‘{’ SelfInvocation {semi BlockStat} ‘}’
401401SelfInvocation ::= ‘this’ ArgumentExprs {ArgumentExprs}
402402
403- TemplateBody ::= [cnl ] ‘{’ [SelfType] TemplateStat {semi TemplateStat} ‘}’ (self, stats)
403+ TemplateBody ::= [nl ] ‘{’ [SelfType] TemplateStat {semi TemplateStat} ‘}’ (self, stats)
404404TemplateStat ::= Import
405405 | Export
406406 | {Annotation [nl]} {Modifier} Def
@@ -410,7 +410,7 @@ TemplateStat ::= Import
410410SelfType ::= id [‘:’ InfixType] ‘=>’ ValDef(_, name, tpt, _)
411411 | ‘this’ ‘:’ InfixType ‘=>’
412412
413- EnumBody ::= [cnl ] ‘{’ [SelfType] EnumStat {semi EnumStat} ‘}’
413+ EnumBody ::= [nl ] ‘{’ [SelfType] EnumStat {semi EnumStat} ‘}’
414414EnumStat ::= TemplateStat
415415 | {Annotation [nl]} {Modifier} EnumCase
416416EnumCase ::= ‘case’ (id ClassConstr [‘extends’ ConstrApps]] | ids)
@@ -422,7 +422,7 @@ TopStat ::= Import
422422 | Packaging
423423 | PackageObject
424424 |
425- Packaging ::= ‘package’ QualId [cnl ] ‘{’ TopStatSeq ‘}’ Package(qid, stats)
425+ Packaging ::= ‘package’ QualId [nl ] ‘{’ TopStatSeq ‘}’ Package(qid, stats)
426426PackageObject ::= ‘package’ ‘object’ ObjectDef object with package in mods.
427427
428428CompilationUnit ::= {‘package’ QualId (semi | cnl)} TopStatSeq Package(qid, stats)
0 commit comments