Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/_docs/reference/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ SimpleType ::= SimpleLiteral
| Singleton ‘.’ id
| Singleton ‘.’ ‘type’
| ‘(’ [Types] ‘)’
| ‘(’ NameAndType {‘,’ NameAndType} ‘)’
| Refinement
| SimpleType TypeArgs
| SimpleType ‘#’ id
Expand All @@ -220,6 +221,7 @@ ContextBounds ::= ContextBound
| '{' ContextBound {',' ContextBound} '}'
ContextBound ::= Type ['as' id]
Types ::= Type {‘,’ Type}
NameAndType ::= id ‘:’ Type
```

### Expressions
Expand Down Expand Up @@ -268,6 +270,7 @@ SimpleExpr ::= SimpleRef
| ‘new’ ConstrApp {‘with’ ConstrApp} [TemplateBody]
| ‘new’ TemplateBody
| ‘(’ [ExprsInParens] ‘)’
| ‘(’ NamedExprInParens {‘,’ NamedExprInParens} ‘)’
| SimpleExpr ‘.’ id
| SimpleExpr ‘.’ MatchClause
| SimpleExpr TypeArgs
Expand All @@ -287,6 +290,7 @@ ExprInParens ::= PostfixExpr ‘:’ Type | Expr
ParArgumentExprs ::= ‘(’ [ExprsInParens] ‘)’
| ‘(’ ‘using’ ExprsInParens ‘)’
| ‘(’ [ExprsInParens ‘,’] PostfixExpr ‘*’ ‘)’
NamedExprInParens ::= id ‘=’ ExprInParens
ArgumentExprs ::= ParArgumentExprs
| BlockExpr
BlockExpr ::= <<< (CaseClauses | Block) >>>
Expand Down Expand Up @@ -333,7 +337,9 @@ SimplePattern1 ::= SimpleRef
| SimplePattern1 ‘.’ id
PatVar ::= varid
| ‘_’
NamedPattern ::= id ‘=’ Pattern
Patterns ::= Pattern {‘,’ Pattern}
| NamedPattern {‘,’ NamedPattern}

ArgumentPatterns ::= ‘(’ [Patterns] ‘)’
| ‘(’ [Patterns ‘,’] PatVar ‘*’ ‘)’
Expand Down
Loading