@@ -92,20 +92,20 @@ semi ::= ‘;’ | nl {nl}
92
92
### Regular keywords
93
93
94
94
```
95
- abstract case catch class def delegate do else
96
- enum export extends false final finally for given
97
- if implicit import lazy match new null object
98
- package private protected override return super sealed then
99
- throw trait true try type val var while
100
- with yield
95
+ abstract case catch class def do else enum
96
+ export extends false final finally for given if
97
+ implicit import lazy match new null object package
98
+ private protected override return super sealed then throw
99
+ trait true try type val var while with
100
+ yield
101
101
: = <- => <: :> # @
102
102
=>>
103
103
```
104
104
105
105
### Soft keywords
106
106
107
107
```
108
- derives inline opaque
108
+ as derives inline opaque
109
109
~ * | & + -
110
110
```
111
111
@@ -203,7 +203,7 @@ Expr1 ::= ‘if’ ‘(’ Expr ‘)’ {nl}
203
203
| SimpleExpr1 ArgumentExprs ‘=’ Expr Assign(expr, expr)
204
204
| Expr2
205
205
| [‘inline’] Expr2 ‘match’ ‘{’ CaseClauses ‘}’ Match(expr, cases) -- point on match
206
- | ‘implicit ’ ‘match’ ‘{’ ImplicitCaseClauses ‘}’
206
+ | ‘given ’ ‘match’ ‘{’ ImplicitCaseClauses ‘}’
207
207
Expr2 ::= PostfixExpr [Ascription]
208
208
Ascription ::= ‘:’ InfixType Typed(expr, tp)
209
209
| ‘:’ Annotation {Annotation} Typed(expr, Annotated(EmptyTree, annot)*)
@@ -336,14 +336,14 @@ AccessQualifier ::= ‘[’ (id | ‘this’) ‘]’
336
336
337
337
Annotation ::= ‘@’ SimpleType {ParArgumentExprs} Apply(tpe, args)
338
338
339
- Import ::= ‘import’ [‘delegate ’] ImportExpr {‘,’ ImportExpr}
339
+ Import ::= ‘import’ [‘given ’] ImportExpr {‘,’ ImportExpr}
340
340
ImportExpr ::= StableId ‘.’ (id | ‘_’ | ImportSelectors) Import(expr, sels)
341
341
ImportSelectors ::= ‘{’ {ImportSelector ‘,’} FinalSelector ‘}’
342
342
FinalSelector ::= ImportSelector Ident(name)
343
343
| ‘_’ Pair(id, id)
344
344
| ‘for’ InfixType {‘,’ InfixType} TypeBoundsTree(EmptyTree, tpt)
345
345
ImportSelector ::= id [‘=>’ id | ‘=>’ ‘_’]
346
- Export ::= ‘export’ [‘delegate ’] ImportExpr {‘,’ ImportExpr}
346
+ Export ::= ‘export’ [‘given ’] ImportExpr {‘,’ ImportExpr}
347
347
```
348
348
349
349
### Declarations and Definitions
@@ -379,16 +379,16 @@ DefDef ::= DefSig [(‘:’ | ‘<:’) Type] ‘=’ Expr
379
379
TmplDef ::= ([‘case’] ‘class’ | ‘trait’) ClassDef
380
380
| [‘case’] ‘object’ ObjectDef
381
381
| ‘enum’ EnumDef
382
- | ‘delegate’ DelegateDef
382
+ | ‘given’ GivenDef
383
383
| Export
384
384
ClassDef ::= id ClassConstr [Template] ClassDef(mods, name, tparams, templ)
385
385
ClassConstr ::= [ClsTypeParamClause] [ConstrMods] ClsParamClauses with DefDef(_, <init>, Nil, vparamss, EmptyTree, EmptyTree) as first stat
386
386
ConstrMods ::= {Annotation} [AccessModifier]
387
387
ObjectDef ::= id [Template] ModuleDef(mods, name, template) // no constructor
388
388
EnumDef ::= id ClassConstr InheritClauses EnumBody EnumDef(mods, name, tparams, template)
389
- DelegateDef ::= [id] [DefTypeParamClause] DelegateBody
390
- DelegateBody ::= [‘for’ ConstrApp {‘,’ ConstrApp }] {GivenParamClause} [TemplateBody]
391
- | ‘for ’ Type {GivenParamClause} ‘=’ Expr
389
+ GivenDef ::= [id] [DefTypeParamClause] GivenBody
390
+ GivenBody ::= [‘as ConstrApp {‘,’ ConstrApp }] {GivenParamClause} [TemplateBody]
391
+ | ‘as ’ Type {GivenParamClause} ‘=’ Expr
392
392
Template ::= InheritClauses [TemplateBody] Template(constr, parents, self, stats)
393
393
InheritClauses ::= [‘extends’ ConstrApps] [‘derives’ QualId {‘,’ QualId}]
394
394
ConstrApps ::= ConstrApp {‘with’ ConstrApp}
0 commit comments