Skip to content

Commit 1f783fb

Browse files
authored
Merge pull request #53 from Sporarum/patch-1
Fix and simplify grammar in SIP - 47
2 parents 089142b + ca69d58 commit 1f783fb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

content/clause-interleaving.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,13 @@ It provides the best of all worlds:
103103

104104
### Specification
105105
We amend the syntax of def parameter clauses as follows:
106-
107106
~~~
108107
DefDcl ::= DefSig ‘:’ Type
109108
DefDef ::= DefSig [‘:’ Type] ‘=’ Expr
110109
DefSig ::= id [DefParamClauses] [DefImplicitClause]
111-
DefParamClauses ::= DefParamClauseChunk {DefParamClauseChunk}
112-
DefParamClauseChunk ::= [DefTypeParamClause] TermOrUsingParamClause {TermOrUsingParamClause}
113-
TermOrUsingParamClause ::= DefTermParamClause
110+
DefParamClauses ::= DefParamClause { DefParamClause } -- and two DefTypeParamClause cannot be adjacent
111+
DefParamClause ::= DefTypeParamClause
112+
| DefTermParamClause
114113
| UsingParamClause
115114
DefTypeParamClause ::= [nl] ‘[’ DefTypeParam {‘,’ DefTypeParam} ‘]’
116115
DefTypeParam ::= {Annotation} id [HkTypeParamClause] TypeParamBounds

0 commit comments

Comments
 (0)