Skip to content

Commit 6cf4ee9

Browse files
committed
Reorder new syntax
1 parent ba9c2fd commit 6cf4ee9

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

docs/docs/internals/syntax.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,6 @@ ClsTypeParamClause::= ‘[’ ClsTypeParam {‘,’ ClsTypeParam} ‘]’
319319
ClsTypeParam ::= {Annotation} [‘+’ | ‘-’] TypeDef(Modifiers, name, tparams, bounds)
320320
id [HkTypeParamClause] TypeParamBounds Bound(below, above, context)
321321
322-
DefTypeParamClause::= [nl] ‘[’ DefTypeParam {‘,’ DefTypeParam} ‘]’
323-
DefTypeParam ::= {Annotation} id [HkTypeParamClause] TypeParamBounds
324-
325322
TypTypeParamClause::= ‘[’ TypTypeParam {‘,’ TypTypeParam} ‘]’
326323
TypTypeParam ::= {Annotation} id [HkTypeParamClause] TypeBounds
327324
@@ -335,20 +332,24 @@ ClsParamClause ::= [nl] ‘(’ ClsParams ‘)’
335332
ClsParams ::= ClsParam {‘,’ ClsParam}
336333
ClsParam ::= {Annotation} ValDef(mods, id, tpe, expr) -- point of mods on val/var
337334
[{Modifier} (‘val’ | ‘var’) | ‘inline’] Param
338-
Param ::= id ‘:’ ParamType [‘=’ Expr]
339335
340336
DefParamClauses ::= DefParamClause { DefParamClause }
341337
DefParamClause ::= DefTypeParamClause
342338
| DefTermParamClause
343339
| UsingParamClause
344-
DefTermParamClause::= [nl] ‘(’ [DefTermParams] ‘)’
345-
UsingParamClause ::= [nl] ‘(’ ‘using’ (DefTermParams | FunArgTypes) ‘)’
346-
DefTermParams ::= DefTermParam {‘,’ DefTermParam}
347-
DefTermParam ::= {Annotation} [‘inline’] Param ValDef(mods, id, tpe, expr) -- point of mods at id.
348340
TypelessClauses ::= TypelessClause {TypelessClause}
349341
TypelessClause ::= DefTermParamClause
350342
| UsingParamClause
343+
344+
DefTypeParamClause::= [nl] ‘[’ DefTypeParam {‘,’ DefTypeParam} ‘]’
345+
DefTypeParam ::= {Annotation} id [HkTypeParamClause] TypeParamBounds
346+
DefTermParamClause::= [nl] ‘(’ [DefTermParams] ‘)’
347+
UsingParamClause ::= [nl] ‘(’ ‘using’ (DefTermParams | FunArgTypes) ‘)’
351348
DefImplicitClause ::= [nl] ‘(’ ‘implicit’ DefTermParams ‘)’
349+
350+
DefTermParams ::= DefTermParam {‘,’ DefTermParam}
351+
DefTermParam ::= {Annotation} [‘inline’] Param ValDef(mods, id, tpe, expr) -- point of mods at id.
352+
Param ::= id ‘:’ ParamType [‘=’ Expr]
352353
```
353354

354355
### Bindings and Imports

0 commit comments

Comments
 (0)