File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -386,8 +386,9 @@ Template ::= InheritClauses [TemplateBody]
386
386
InheritClauses ::= [‘extends’ ConstrApps] [‘derives’ QualId {‘,’ QualId}]
387
387
ConstrApps ::= ConstrApp {‘with’ ConstrApp}
388
388
| ConstrApp {‘,’ ConstrApp}
389
- ConstrApp ::= AnnotType {ArgumentExprs} Apply(tp, args)
390
- | ‘(’ ConstrApp {‘given’ (InfixExpr | ParArgumentExprs)} ‘)’
389
+ ConstrApp ::= SimpleConstrApp
390
+ | ‘(’ SimpleConstrApp {‘given’ (PrefixExpr | ParArgumentExprs)} ‘)’
391
+ SimpleConstrApp ::= AnnotType {ArgumentExprs} Apply(tp, args)
391
392
ConstrExpr ::= SelfInvocation
392
393
| ConstrBlock
393
394
SelfInvocation ::= ‘this’ ArgumentExprs {ArgumentExprs}
Original file line number Diff line number Diff line change @@ -75,8 +75,9 @@ TmplDef ::= ...
75
75
InstanceDef ::= [id] [DefTypeParamClause] InstanceBody
76
76
InstanceBody ::= [‘for’ ConstrApp {‘,’ ConstrApp }] {GivenParamClause} [TemplateBody]
77
77
| ‘for’ Type {GivenParamClause} ‘=’ Expr
78
- ConstrApp ::= AnnotType {ArgumentExprs}
79
- | ‘(’ ConstrApp {‘given’ (InfixExpr | ParArgumentExprs)} ‘)’
78
+ ConstrApp ::= SimpleConstrApp
79
+ | ‘(’ SimpleConstrApp {‘given’ (PrefixExpr | ParArgumentExprs)} ‘)’
80
+ SimpleConstrApp ::= AnnotType {ArgumentExprs}
80
81
GivenParamClause ::= ‘given’ (‘(’ [DefParams] ‘)’ | GivenTypes)
81
82
GivenTypes ::= AnnotType {‘,’ AnnotType}
82
83
```
Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ GivenParamClause ::= ‘given’ (‘(’ [DefParams] ‘)’ | GivenTypes)
72
72
InstanceBody ::= [‘for’ ConstrApp {‘,’ ConstrApp }] [TemplateBody]
73
73
| ‘for’ Type ‘=’ Expr
74
74
GivenTypes ::= AnnotType {‘,’ AnnotType}
75
+ ConstrApp ::= SimpleConstrApp
76
+ | ‘(’ SimpleConstrApp {‘given’ (PrefixExpr | ParArgumentExprs)} ‘)’
75
77
```
76
78
The identifier ` id ` can be omitted only if either the ` for ` part or the template body is present.
77
79
If the ` for ` part is missing, the template body must define at least one extension method.
You can’t perform that action at this time.
0 commit comments