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]
386386InheritClauses ::= [‘extends’ ConstrApps] [‘derives’ QualId {‘,’ QualId}]
387387ConstrApps ::= ConstrApp {‘with’ ConstrApp}
388388 | 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)
391392ConstrExpr ::= SelfInvocation
392393 | ConstrBlock
393394SelfInvocation ::= ‘this’ ArgumentExprs {ArgumentExprs}
Original file line number Diff line number Diff line change @@ -75,8 +75,9 @@ TmplDef ::= ...
7575InstanceDef ::= [id] [DefTypeParamClause] InstanceBody
7676InstanceBody ::= [‘for’ ConstrApp {‘,’ ConstrApp }] {GivenParamClause} [TemplateBody]
7777 | ‘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}
8081GivenParamClause ::= ‘given’ (‘(’ [DefParams] ‘)’ | GivenTypes)
8182GivenTypes ::= AnnotType {‘,’ AnnotType}
8283```
Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ GivenParamClause ::= ‘given’ (‘(’ [DefParams] ‘)’ | GivenTypes)
7272InstanceBody ::= [‘for’ ConstrApp {‘,’ ConstrApp }] [TemplateBody]
7373 | ‘for’ Type ‘=’ Expr
7474GivenTypes ::= AnnotType {‘,’ AnnotType}
75+ ConstrApp ::= SimpleConstrApp
76+ | ‘(’ SimpleConstrApp {‘given’ (PrefixExpr | ParArgumentExprs)} ‘)’
7577```
7678The identifier ` id ` can be omitted only if either the ` for ` part or the template body is present.
7779If 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