Skip to content

Commit a592bfb

Browse files
committed
Update internal syntax
1 parent 09bb2c8 commit a592bfb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/_docs/internals/syntax.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ type val var while with yield
140140
### Soft keywords
141141

142142
```
143-
as derives end extension infix inline opaque open throws transparent using | * + -
143+
as derives end erased extension infix inline opaque open throws transparent using | * + -
144144
```
145145

146146
See the [separate section on soft keywords](../reference/soft-modifier.md) for additional
@@ -180,13 +180,13 @@ Type ::= FunType
180180
| FunParamClause ‘=>>’ Type TermLambdaTypeTree(ps, t)
181181
| MatchType
182182
| InfixType
183-
FunType ::= FunTypeArgs (‘=>’ | ‘?=>’) Type Function(ts, t)
183+
FunType ::= FunTypeArgs (‘=>’ | ‘?=>’) Type Function(ts, t) | FunctionWithMods(ts, t, mods, erasedParams)
184184
| HKTypeParamClause '=>' Type PolyFunction(ps, t)
185185
FunTypeArgs ::= InfixType
186186
| ‘(’ [ FunArgTypes ] ‘)’
187187
| FunParamClause
188188
FunParamClause ::= ‘(’ TypedFunParam {‘,’ TypedFunParam } ‘)’
189-
TypedFunParam ::= id ‘:’ Type
189+
TypedFunParam ::= [`erased`] id ‘:’ Type
190190
MatchType ::= InfixType `match` <<< TypeCaseClauses >>>
191191
InfixType ::= RefinedType {id [nl] RefinedType} InfixOp(t1, op, t2)
192192
RefinedType ::= AnnotType {[nl] Refinement} RefinedTypeTree(t, ds)
@@ -207,8 +207,8 @@ Singleton ::= SimpleRef
207207
| SimpleLiteral
208208
| Singleton ‘.’ id
209209
Singletons ::= Singleton { ‘,’ Singleton }
210-
FunArgType ::= Type
211-
| ‘=>’ Type PrefixOp(=>, t)
210+
FunArgType ::= [`erased`] Type
211+
| [`erased`] ‘=>’ Type PrefixOp(=>, t)
212212
FunArgTypes ::= FunArgType { ‘,’ FunArgType }
213213
ParamType ::= [‘=>’] ParamValueType
214214
ParamValueType ::= [‘into’] ExactParamType Into(t)
@@ -229,7 +229,7 @@ BlockResult ::= FunParams (‘=>’ | ‘?=>’) Block
229229
| HkTypeParamClause ‘=>’ Block
230230
| Expr1
231231
FunParams ::= Bindings
232-
| id
232+
| [`erased`] id
233233
| ‘_’
234234
Expr1 ::= [‘inline’] ‘if’ ‘(’ Expr ‘)’ {nl} Expr [[semi] ‘else’ Expr] If(Parens(cond), thenp, elsep?)
235235
| [‘inline’] ‘if’ Expr ‘then’ Expr [[semi] ‘else’ Expr] If(cond, thenp, elsep?)
@@ -369,12 +369,12 @@ DefParamClauses ::= {DefParamClause} [[nl] ‘(’ [‘implicit’] DefParams
369369
DefParamClause ::= [nl] ‘(’ DefParams ‘)’ | UsingParamClause
370370
UsingParamClause ::= [nl] ‘(’ ‘using’ (DefParams | FunArgTypes) ‘)’
371371
DefParams ::= DefParam {‘,’ DefParam}
372-
DefParam ::= {Annotation} [‘inline’] Param ValDef(mods, id, tpe, expr) -- point of mods at id.
372+
DefParam ::= {Annotation} [`erased`] [‘inline’] Param ValDef(mods, id, tpe, expr) -- point of mods at id.
373373
```
374374

375375
### Bindings and Imports
376376
```ebnf
377-
Bindings ::= ‘(’ [Binding {‘,’ Binding}] ‘)’
377+
Bindings ::= ‘(’[`erased`] [Binding {‘,’ [`erased`] Binding}] ‘)’
378378
Binding ::= (id | ‘_’) [‘:’ Type] ValDef(_, id, tpe, EmptyTree)
379379
380380
Modifier ::= LocalModifier

0 commit comments

Comments
 (0)