aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJonathan Brachthäuser <jonathan@b-studios.de>2016-12-21 21:52:30 +0100
committerJonathan Brachthäuser <jonathan@b-studios.de>2016-12-21 22:04:38 +0100
commitd40f9760145401981f50458982915a95bfec8563 (patch)
tree5e67cd07cf3cc38b0dc4303c6a6ecb0ca440e8c1 /docs
parent7ff9c9326ef6c66758b3e16e2d655138663ed613 (diff)
downloaddotty-d40f9760145401981f50458982915a95bfec8563.tar.gz
dotty-d40f9760145401981f50458982915a95bfec8563.tar.bz2
dotty-d40f9760145401981f50458982915a95bfec8563.zip
Cosmetique changes and fix typos
Diffstat (limited to 'docs')
-rw-r--r--docs/docs/internals/syntax.md25
1 files changed, 11 insertions, 14 deletions
diff --git a/docs/docs/internals/syntax.md b/docs/docs/internals/syntax.md
index 318d1e91f..c42edc389 100644
--- a/docs/docs/internals/syntax.md
+++ b/docs/docs/internals/syntax.md
@@ -120,7 +120,7 @@ Type ::= [‘implicit’] FunArgTypes ‘=>’ Type
| HkTypeParamClause ‘=>’ Type
| InfixType
FunArgTypes ::= InfixType
- | ‘(’ [ FunArgType {‘,’ FunArgType } ] ‘)’
+ | ‘(’ [ FunArgType {‘,’ FunArgType } ] ‘)’
InfixType ::= RefinedType {id [nl] RefinedType}
RefinedType ::= WithType {[nl] Refinement}
WithType ::= AnnotType {‘with’ AnnotType}
@@ -134,7 +134,7 @@ SimpleType ::= SimpleType (TypeArgs | NamedTypeArgs)
| Refinement
| SimpleLiteral
ArgTypes ::= Type {‘,’ Type}
- | NamedTypeArg {‘,’ NamedTypeArg }
+ | NamedTypeArg {‘,’ NamedTypeArg}
FunArgType ::= Type
| ‘=>’ Type
ParamType ::= [‘=>’] ParamValueType
@@ -143,7 +143,7 @@ TypeArgs ::= ‘[’ ArgTypes ‘]’
NamedTypeArg ::= id ‘=’ Type
NamedTypeArgs ::= ‘[’ NamedTypeArg {‘,’ NamedTypeArg} ‘]’
Refinement ::= ‘{’ [Dcl] {semi [Dcl]} ‘}’
-TypeBounds ::= [‘>:’ Type] [`<: Type] | INT
+TypeBounds ::= [‘>:’ Type] [‘<:’ Type] | INT
TypeParamBounds ::= TypeBounds {‘<%’ Type} {‘:’ Type}
Expr ::= [‘implicit’] FunParams ‘=>’ Expr
@@ -181,7 +181,7 @@ SimpleExpr ::= ‘new’ Template
SimpleExpr1 ::= Literal
| Path
| ‘_’
- | ‘(’ ExprsInParens2 ‘)’
+ | ‘(’ ExprsInParens ‘)’
| SimpleExpr ‘.’ id
| SimpleExpr (TypeArgs | NamedTypeArgs)
| SimpleExpr1 ArgumentExprs
@@ -231,7 +231,7 @@ PatVar ::= varid
| ‘_’
Patterns ::= Pattern {‘,’ Pattern}
ArgumentPatterns ::= ‘(’ [Patterns] ‘)’
- | ‘(’ [Patterns ‘,’] Pattern2 ‘:’ ‘_’ ‘*’ ')
+ | ‘(’ [Patterns ‘,’] Pattern2 ‘:’ ‘_’ ‘*’ ‘)’
```
### Type and Value Parameters
@@ -243,7 +243,7 @@ ClsTypeParam ::= {Annotation} [{Modifier} type] [‘+’ | ‘-’]
DefTypeParamClause::= ‘[’ DefTypeParam {‘,’ DefTypeParam} ‘]’
DefTypeParam ::= {Annotation} id [HkTypeParamClause] TypeParamBounds
-TypTypeParamCaluse::= ‘[’ TypTypeParam {‘,’ TypTypeParam} ‘]’
+TypTypeParamClause::= ‘[’ TypTypeParam {‘,’ TypTypeParam} ‘]’
TypTypeParam ::= {Annotation} id [HkTypeParamClause] TypeBounds
HkTypeParamClause ::= ‘[’ HkTypeParam {‘,’ HkTypeParam} ‘]’
@@ -252,9 +252,8 @@ HkTypeParam ::= {Annotation} [‘+’ | ‘-’] (Id[HkTypeParamClause] |
ClsParamClauses ::= {ClsParamClause} [[nl] ‘(’ ‘implicit’ ClsParams ‘)’]
ClsParamClause ::= [nl] ‘(’ [ClsParams] ‘)’
-ClsParams ::= ClsParam {‘’ ClsParam}
-ClsParam ::= {Annotation}
- [{Modifier} (‘val’ | ‘var’) | ‘inline’] Param
+ClsParams ::= ClsParam {‘,’ ClsParam}
+ClsParam ::= {Annotation} [{Modifier} (‘val’ | ‘var’) | ‘inline’] Param
Param ::= id ‘:’ ParamType [‘=’ Expr]
| INT
@@ -266,7 +265,7 @@ DefParam ::= {Annotation} [‘inline’] Param
### Bindings and Imports
```ebnf
-Bindings ::= ‘(’ Binding {‘,’ Binding}] ‘)’
+Bindings ::= ‘(’ Binding {‘,’ Binding} ‘)’
Binding ::= (id | ‘_’) [‘:’ Type]
Modifier ::= LocalModifier
@@ -282,14 +281,13 @@ AccessQualifier ::= ‘[’ (id | ‘this’) ‘]’
Annotation ::= ‘@’ SimpleType {ParArgumentExprs}
-TemplateBody ::= [nl] ‘{’ [SelfType] TemplateStat {semi TemplateStat} `}
+TemplateBody ::= [nl] ‘{’ [SelfType] TemplateStat {semi TemplateStat} ‘}’
TemplateStat ::= Import
| {Annotation [nl]} {Modifier} Def
| {Annotation [nl]} {Modifier} Dcl
| Expr1
- |
SelfType ::= id [‘:’ InfixType] ‘=>’
- | ‘this’ ‘:’ InfixType `=>
+ | ‘this’ ‘:’ InfixType ‘=>’
Import ::= ‘import’ ImportExpr {‘,’ ImportExpr}
ImportExpr ::= StableId ‘.’ (id | ‘_’ | ImportSelectors)
@@ -305,7 +303,6 @@ Dcl ::= ‘val’ ValDcl
| ‘type’ {nl} TypeDcl
| INT
-
ValDcl ::= ids ‘:’ Type
VarDcl ::= ids ‘:’ Type
DefDcl ::= DefSig [‘:’ Type]