@@ -149,7 +149,7 @@ FunArgTypes ::= InfixType
149149TypedFunParam ::= id ‘:’ Type
150150MatchType ::= InfixType `match` ‘{’ TypeCaseClauses ‘}’
151151InfixType ::= RefinedType {id [nl] RefinedType} InfixOp(t1, op, t2)
152- RefinedType ::= WithType {[nl | ‘with’ ] Refinement} RefinedTypeTree(t, ds)
152+ RefinedType ::= WithType {[nl] Refinement} RefinedTypeTree(t, ds)
153153WithType ::= AnnotType {‘with’ AnnotType} (deprecated)
154154AnnotType ::= SimpleType {Annotation} Annotated(t, annot)
155155SimpleType ::= SimpleType TypeArgs AppliedTypeTree(t, args)
@@ -214,7 +214,7 @@ SimpleExpr ::= Path
214214 | ‘$’ ‘{’ Block ‘}’
215215 | Quoted
216216 | quoteId // only inside splices
217- | ‘new’ ConstrApp {‘with’ ConstrApp} [[‘with’] TemplateBody] New(constr | templ)
217+ | ‘new’ ConstrApp {‘with’ ConstrApp} [TemplateBody] New(constr | templ)
218218 | ‘new’ TemplateBody
219219 | ‘(’ ExprsInParens ‘)’ Parens(exprs)
220220 | SimpleExpr ‘.’ id Select(expr, id)
@@ -383,16 +383,16 @@ ClassDef ::= id ClassConstr [Template]
383383ClassConstr ::= [ClsTypeParamClause] [ConstrMods] ClsParamClauses with DefDef(_, <init>, Nil, vparamss, EmptyTree, EmptyTree) as first stat
384384ConstrMods ::= {Annotation} [AccessModifier]
385385ObjectDef ::= id [Template] ModuleDef(mods, name, template) // no constructor
386- EnumDef ::= id ClassConstr InheritClauses [‘with’] EnumBody EnumDef(mods, name, tparams, template)
386+ EnumDef ::= id ClassConstr InheritClauses EnumBody EnumDef(mods, name, tparams, template)
387387GivenDef ::= [GivenSig (‘:’ | <:)] {FunArgTypes ‘=>’}
388388 AnnotType ‘=’ Expr
389389 | [GivenSig ‘:’] {FunArgTypes ‘=>’}
390- ConstrApps [[‘with’] TemplateBody]
390+ ConstrApps [TemplateBody]
391391GivenSig ::= [id] [DefTypeParamClause] {GivenParamClause}
392- ExtensionDef ::= [id] ‘of ’ ExtParamClause {GivenParamClause} ExtMethods
392+ ExtensionDef ::= [id] ‘on ’ ExtParamClause {GivenParamClause} ExtMethods
393393ExtMethods ::= [nl] ‘{’ ‘def’ DefDef {semi ‘def’ DefDef} ‘}’
394394ExtParamClause ::= [DefTypeParamClause] ‘(’ DefParam ‘)’
395- Template ::= InheritClauses [[‘with’] TemplateBody] Template(constr, parents, self, stats)
395+ Template ::= InheritClauses [TemplateBody] Template(constr, parents, self, stats)
396396InheritClauses ::= [‘extends’ ConstrApps] [‘derives’ QualId {‘,’ QualId}]
397397ConstrApps ::= ConstrApp {(‘,’ | ‘with’) ConstrApp}
398398ConstrApp ::= AnnotType {ParArgumentExprs} Apply(tp, args)
@@ -410,7 +410,7 @@ TemplateStat ::= Import
410410SelfType ::= id [‘:’ InfixType] ‘=>’ ValDef(_, name, tpt, _)
411411 | ‘this’ ‘:’ InfixType ‘=>’
412412
413- EnumBody ::= [nl | ‘with’ ] ‘{’ [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 [nl | ‘with’ ] ‘{’ 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} TopStatSeq Package(qid, stats)
0 commit comments