@@ -149,7 +149,7 @@ FunArgTypes ::= InfixType
149
149
TypedFunParam ::= id ‘:’ Type
150
150
MatchType ::= InfixType `match` ‘{’ TypeCaseClauses ‘}’
151
151
InfixType ::= 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)
153
153
WithType ::= AnnotType {‘with’ AnnotType} (deprecated)
154
154
AnnotType ::= SimpleType {Annotation} Annotated(t, annot)
155
155
SimpleType ::= SimpleType TypeArgs AppliedTypeTree(t, args)
@@ -214,7 +214,7 @@ SimpleExpr ::= Path
214
214
| ‘$’ ‘{’ Block ‘}’
215
215
| Quoted
216
216
| quoteId // only inside splices
217
- | ‘new’ ConstrApp {‘with’ ConstrApp} [[‘with’] TemplateBody] New(constr | templ)
217
+ | ‘new’ ConstrApp {‘with’ ConstrApp} [TemplateBody] New(constr | templ)
218
218
| ‘new’ TemplateBody
219
219
| ‘(’ ExprsInParens ‘)’ Parens(exprs)
220
220
| SimpleExpr ‘.’ id Select(expr, id)
@@ -383,16 +383,16 @@ ClassDef ::= id ClassConstr [Template]
383
383
ClassConstr ::= [ClsTypeParamClause] [ConstrMods] ClsParamClauses with DefDef(_, <init>, Nil, vparamss, EmptyTree, EmptyTree) as first stat
384
384
ConstrMods ::= {Annotation} [AccessModifier]
385
385
ObjectDef ::= 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)
387
387
GivenDef ::= [GivenSig (‘:’ | <:)] {FunArgTypes ‘=>’}
388
388
AnnotType ‘=’ Expr
389
389
| [GivenSig ‘:’] {FunArgTypes ‘=>’}
390
- ConstrApps [[‘with’] TemplateBody]
390
+ ConstrApps [TemplateBody]
391
391
GivenSig ::= [id] [DefTypeParamClause] {GivenParamClause}
392
- ExtensionDef ::= [id] ‘of ’ ExtParamClause {GivenParamClause} ExtMethods
392
+ ExtensionDef ::= [id] ‘on ’ ExtParamClause {GivenParamClause} ExtMethods
393
393
ExtMethods ::= [nl] ‘{’ ‘def’ DefDef {semi ‘def’ DefDef} ‘}’
394
394
ExtParamClause ::= [DefTypeParamClause] ‘(’ DefParam ‘)’
395
- Template ::= InheritClauses [[‘with’] TemplateBody] Template(constr, parents, self, stats)
395
+ Template ::= InheritClauses [TemplateBody] Template(constr, parents, self, stats)
396
396
InheritClauses ::= [‘extends’ ConstrApps] [‘derives’ QualId {‘,’ QualId}]
397
397
ConstrApps ::= ConstrApp {(‘,’ | ‘with’) ConstrApp}
398
398
ConstrApp ::= AnnotType {ParArgumentExprs} Apply(tp, args)
@@ -410,7 +410,7 @@ TemplateStat ::= Import
410
410
SelfType ::= id [‘:’ InfixType] ‘=>’ ValDef(_, name, tpt, _)
411
411
| ‘this’ ‘:’ InfixType ‘=>’
412
412
413
- EnumBody ::= [nl | ‘with’ ] ‘{’ [SelfType] EnumStat {semi EnumStat} ‘}’
413
+ EnumBody ::= [nl] ‘{’ [SelfType] EnumStat {semi EnumStat} ‘}’
414
414
EnumStat ::= TemplateStat
415
415
| {Annotation [nl]} {Modifier} EnumCase
416
416
EnumCase ::= ‘case’ (id ClassConstr [‘extends’ ConstrApps]] | ids)
@@ -422,7 +422,7 @@ TopStat ::= Import
422
422
| Packaging
423
423
| PackageObject
424
424
|
425
- Packaging ::= ‘package’ QualId [nl | ‘with’ ] ‘{’ TopStatSeq ‘}’ Package(qid, stats)
425
+ Packaging ::= ‘package’ QualId [nl] ‘{’ TopStatSeq ‘}’ Package(qid, stats)
426
426
PackageObject ::= ‘package’ ‘object’ ObjectDef object with package in mods.
427
427
428
428
CompilationUnit ::= {‘package’ QualId semi} TopStatSeq Package(qid, stats)
0 commit comments