Skip to content

Commit 974a5d7

Browse files
Sporarumodersky
authored andcommitted
Fix and simplify grammar in SIP - scala#47
As noted in scala#47, the grammar did not correspond to the rest of the proposal, this PR solves that
1 parent a55f5e9 commit 974a5d7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

content/clause-interleaving.md

Lines changed: 4 additions & 5 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
110-
DefSig ::= id [DefParamClauses] [DefImplicitClause]
111-
DefParamClauses ::= DefParamClauseChunk {DefParamClauseChunk}
112-
DefParamClauseChunk ::= [DefTypeParamClause] TermOrUsingParamClause {TermOrUsingParamClause}
113-
TermOrUsingParamClause ::= DefTermParamClause
109+
DefSig ::= id [DefParamClauses] [DefImplicitClause] -- and two DefTypeParamClause cannot be adjacent
110+
DefParamClauses ::= DefParamClause { DefParamClause }
111+
DefParamClause ::= DefTypeParamClause
112+
| DefTermParamClause
114113
| UsingParamClause
115114
DefTypeParamClause ::= [nl] ‘[’ DefTypeParam {‘,’ DefTypeParam} ‘]’
116115
DefTypeParam ::= {Annotation} id [HkTypeParamClause] TypeParamBounds

0 commit comments

Comments
 (0)