Skip to content

Commit d40f976

Browse files
committed
Cosmetique changes and fix typos
1 parent 7ff9c93 commit d40f976

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

docs/docs/internals/syntax.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Type ::= [‘implicit’] FunArgTypes ‘=>’ Type
120120
| HkTypeParamClause ‘=>’ Type
121121
| InfixType
122122
FunArgTypes ::= InfixType
123-
| ‘(’ [ FunArgType {‘,’ FunArgType } ] ‘)’
123+
| ‘(’ [ FunArgType {‘,’ FunArgType } ] ‘)’
124124
InfixType ::= RefinedType {id [nl] RefinedType}
125125
RefinedType ::= WithType {[nl] Refinement}
126126
WithType ::= AnnotType {‘with’ AnnotType}
@@ -134,7 +134,7 @@ SimpleType ::= SimpleType (TypeArgs | NamedTypeArgs)
134134
| Refinement
135135
| SimpleLiteral
136136
ArgTypes ::= Type {‘,’ Type}
137-
| NamedTypeArg {‘,’ NamedTypeArg }
137+
| NamedTypeArg {‘,’ NamedTypeArg}
138138
FunArgType ::= Type
139139
| ‘=>’ Type
140140
ParamType ::= [‘=>’] ParamValueType
@@ -143,7 +143,7 @@ TypeArgs ::= ‘[’ ArgTypes ‘]’
143143
NamedTypeArg ::= id ‘=’ Type
144144
NamedTypeArgs ::= ‘[’ NamedTypeArg {‘,’ NamedTypeArg} ‘]’
145145
Refinement ::= ‘{’ [Dcl] {semi [Dcl]} ‘}’
146-
TypeBounds ::= [‘>:’ Type] [`<: Type] | INT
146+
TypeBounds ::= [‘>:’ Type] [‘<:’ Type] | INT
147147
TypeParamBounds ::= TypeBounds {‘<%’ Type} {‘:’ Type}
148148
149149
Expr ::= [‘implicit’] FunParams ‘=>’ Expr
@@ -181,7 +181,7 @@ SimpleExpr ::= ‘new’ Template
181181
SimpleExpr1 ::= Literal
182182
| Path
183183
| ‘_’
184-
| ‘(’ ExprsInParens2 ‘)’
184+
| ‘(’ ExprsInParens ‘)’
185185
| SimpleExpr ‘.’ id
186186
| SimpleExpr (TypeArgs | NamedTypeArgs)
187187
| SimpleExpr1 ArgumentExprs
@@ -231,7 +231,7 @@ PatVar ::= varid
231231
| ‘_’
232232
Patterns ::= Pattern {‘,’ Pattern}
233233
ArgumentPatterns ::= ‘(’ [Patterns] ‘)’
234-
| ‘(’ [Patterns ‘,’] Pattern2 ‘:’ ‘_’ ‘*’ ')
234+
| ‘(’ [Patterns ‘,’] Pattern2 ‘:’ ‘_’ ‘*’ ‘)’
235235
```
236236

237237
### Type and Value Parameters
@@ -243,7 +243,7 @@ ClsTypeParam ::= {Annotation} [{Modifier} type] [‘+’ | ‘-’]
243243
DefTypeParamClause::= ‘[’ DefTypeParam {‘,’ DefTypeParam} ‘]’
244244
DefTypeParam ::= {Annotation} id [HkTypeParamClause] TypeParamBounds
245245
246-
TypTypeParamCaluse::= ‘[’ TypTypeParam {‘,’ TypTypeParam} ‘]’
246+
TypTypeParamClause::= ‘[’ TypTypeParam {‘,’ TypTypeParam} ‘]’
247247
TypTypeParam ::= {Annotation} id [HkTypeParamClause] TypeBounds
248248
249249
HkTypeParamClause ::= ‘[’ HkTypeParam {‘,’ HkTypeParam} ‘]’
@@ -252,9 +252,8 @@ HkTypeParam ::= {Annotation} [‘+’ | ‘-’] (Id[HkTypeParamClause] |
252252
253253
ClsParamClauses ::= {ClsParamClause} [[nl] ‘(’ ‘implicit’ ClsParams ‘)’]
254254
ClsParamClause ::= [nl] ‘(’ [ClsParams] ‘)’
255-
ClsParams ::= ClsParam {‘’ ClsParam}
256-
ClsParam ::= {Annotation}
257-
[{Modifier} (‘val’ | ‘var’) | ‘inline’] Param
255+
ClsParams ::= ClsParam {‘,’ ClsParam}
256+
ClsParam ::= {Annotation} [{Modifier} (‘val’ | ‘var’) | ‘inline’] Param
258257
Param ::= id ‘:’ ParamType [‘=’ Expr]
259258
| INT
260259
@@ -266,7 +265,7 @@ DefParam ::= {Annotation} [‘inline’] Param
266265

267266
### Bindings and Imports
268267
```ebnf
269-
Bindings ::= ‘(’ Binding {‘,’ Binding}] ‘)’
268+
Bindings ::= ‘(’ Binding {‘,’ Binding} ‘)’
270269
Binding ::= (id | ‘_’) [‘:’ Type]
271270
272271
Modifier ::= LocalModifier
@@ -282,14 +281,13 @@ AccessQualifier ::= ‘[’ (id | ‘this’) ‘]’
282281
283282
Annotation ::= ‘@’ SimpleType {ParArgumentExprs}
284283
285-
TemplateBody ::= [nl] ‘{’ [SelfType] TemplateStat {semi TemplateStat} `}
284+
TemplateBody ::= [nl] ‘{’ [SelfType] TemplateStat {semi TemplateStat} ‘}’
286285
TemplateStat ::= Import
287286
| {Annotation [nl]} {Modifier} Def
288287
| {Annotation [nl]} {Modifier} Dcl
289288
| Expr1
290-
|
291289
SelfType ::= id [‘:’ InfixType] ‘=>’
292-
| ‘this’ ‘:’ InfixType `=>
290+
| ‘this’ ‘:’ InfixType ‘=>’
293291
294292
Import ::= ‘import’ ImportExpr {‘,’ ImportExpr}
295293
ImportExpr ::= StableId ‘.’ (id | ‘_’ | ImportSelectors)
@@ -305,7 +303,6 @@ Dcl ::= ‘val’ ValDcl
305303
| ‘type’ {nl} TypeDcl
306304
| INT
307305
308-
309306
ValDcl ::= ids ‘:’ Type
310307
VarDcl ::= ids ‘:’ Type
311308
DefDcl ::= DefSig [‘:’ Type]

0 commit comments

Comments
 (0)