diff --git a/docs/_docs/reference/syntax.md b/docs/_docs/reference/syntax.md index ccba2ec9578a..f2be16f3351c 100644 --- a/docs/_docs/reference/syntax.md +++ b/docs/_docs/reference/syntax.md @@ -199,6 +199,7 @@ SimpleType ::= SimpleLiteral | Singleton ‘.’ id | Singleton ‘.’ ‘type’ | ‘(’ [Types] ‘)’ + | ‘(’ NameAndType {‘,’ NameAndType} ‘)’ | Refinement | SimpleType TypeArgs | SimpleType ‘#’ id @@ -220,6 +221,7 @@ ContextBounds ::= ContextBound | '{' ContextBound {',' ContextBound} '}' ContextBound ::= Type ['as' id] Types ::= Type {‘,’ Type} +NameAndType ::= id ‘:’ Type ``` ### Expressions @@ -268,6 +270,7 @@ SimpleExpr ::= SimpleRef | ‘new’ ConstrApp {‘with’ ConstrApp} [TemplateBody] | ‘new’ TemplateBody | ‘(’ [ExprsInParens] ‘)’ + | ‘(’ NamedExprInParens {‘,’ NamedExprInParens} ‘)’ | SimpleExpr ‘.’ id | SimpleExpr ‘.’ MatchClause | SimpleExpr TypeArgs @@ -287,6 +290,7 @@ ExprInParens ::= PostfixExpr ‘:’ Type | Expr ParArgumentExprs ::= ‘(’ [ExprsInParens] ‘)’ | ‘(’ ‘using’ ExprsInParens ‘)’ | ‘(’ [ExprsInParens ‘,’] PostfixExpr ‘*’ ‘)’ +NamedExprInParens ::= id ‘=’ ExprInParens ArgumentExprs ::= ParArgumentExprs | BlockExpr BlockExpr ::= <<< (CaseClauses | Block) >>> @@ -333,7 +337,9 @@ SimplePattern1 ::= SimpleRef | SimplePattern1 ‘.’ id PatVar ::= varid | ‘_’ +NamedPattern ::= id ‘=’ Pattern Patterns ::= Pattern {‘,’ Pattern} + | NamedPattern {‘,’ NamedPattern} ArgumentPatterns ::= ‘(’ [Patterns] ‘)’ | ‘(’ [Patterns ‘,’] PatVar ‘*’ ‘)’