Skip to content

Commit 72eabc0

Browse files
committed
Syntax for extension methods
1 parent 63d8b3a commit 72eabc0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/docs/internals/syntax.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,11 @@ ValDcl ::= ids ‘:’ Type
316316
VarDcl ::= ids ‘:’ Type PatDef(_, ids, tpe, EmptyTree)
317317
DefDcl ::= DefSig [‘:’ Type] DefDef(_, name, tparams, vparamss, tpe, EmptyTree)
318318
DefSig ::= id [DefTypeParamClause] DefParamClauses
319+
| DefParamClause ‘.’
320+
id [DefTypeParamClause] DefParamClauses
321+
| DefParamClause
322+
id [DefTypeParamClause] DefParamClause DefParamClauses
323+
319324
TypeDcl ::= id [TypTypeParamClause] [‘=’ Type] TypeDefTree(_, name, tparams, tpt)
320325
| id [HkTypeParamClause] TypeBounds TypeDefTree(_, name, tparams, bounds)
321326
@@ -329,7 +334,6 @@ PatDef ::= Pattern2 {‘,’ Pattern2} [‘:’ Type] ‘=’ Expr
329334
VarDef ::= PatDef
330335
| ids ‘:’ Type ‘=’ ‘_’
331336
DefDef ::= DefSig [‘:’ Type] ‘=’ Expr DefDef(_, name, tparams, vparamss, tpe, expr)
332-
| DefSig [nl] ‘{’ Block ‘}’ DefDef(_, name, tparams, vparamss, tpe, Block)
333337
| ‘this’ DefParamClause DefParamClauses DefDef(_, <init>, Nil, vparamss, EmptyTree, expr | Block)
334338
(‘=’ ConstrExpr | [nl] ConstrBlock)
335339

0 commit comments

Comments
 (0)