Skip to content

Commit 06bd529

Browse files
committed
Change syntax to "this modifier" scheme
1 parent d6ba157 commit 06bd529

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/docs/internals/syntax.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ Param ::= id ‘:’ ParamType [‘=’ Expr]
274274
275275
DefParamClauses ::= {DefParamClause} [[nl] ‘(’ [FunArgMods] DefParams ‘)’]
276276
DefParamClause ::= [nl] ‘(’ [DefParams] ‘)’
277+
ExtParamClause ::= [nl] ‘(’ ‘this’ DefParam] ‘)’
277278
DefParams ::= DefParam {‘,’ DefParam}
278279
DefParam ::= {Annotation} [‘transparent’] Param ValDef(mods, id, tpe, expr) -- point of mods at id.
279280
```
@@ -316,7 +317,7 @@ Dcl ::= RefineDcl
316317
ValDcl ::= ids ‘:’ Type PatDef(_, ids, tpe, EmptyTree)
317318
VarDcl ::= ids ‘:’ Type PatDef(_, ids, tpe, EmptyTree)
318319
DefDcl ::= DefSig [‘:’ Type] DefDef(_, name, tparams, vparamss, tpe, EmptyTree)
319-
DefSig ::= id [DefTypeParamClause] DefParamClauses
320+
DefSig ::= id [DefTypeParamClause] [ExtParamClause] DefParamClauses
320321
TypeDcl ::= id [TypeParamClause] (TypeBounds | ‘=’ Type) TypeDefTree(_, name, tparams, bounds)
321322
| id [TypeParamClause] <: Type = MatchType
322323

0 commit comments

Comments
 (0)