Skip to content
Merged
Show file tree
Hide file tree
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: 3 additions & 3 deletions compiler/src/dotty/tools/dotc/parsing/Parsers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3555,7 +3555,7 @@ object Parsers {
* ClsParams ::= ClsParam {‘,’ ClsParam}
* ClsParam ::= {Annotation}
* [{Modifier} (‘val’ | ‘var’)] Param
* TypelessClause ::= DefTermParamClause
* ConstrParamClause ::= DefTermParamClause
* | UsingParamClause
*
* DefTermParamClause::= [nl] ‘(’ [DefTermParams] ‘)’
Expand Down Expand Up @@ -3681,7 +3681,7 @@ object Parsers {
}

/** ClsTermParamClauses ::= {ClsTermParamClause} [[nl] ‘(’ [‘implicit’] ClsParams ‘)’]
* TypelessClauses ::= TypelessClause {TypelessClause}
* ConstrParamClauses ::= ConstrParamClause {ConstrParamClause}
*
* @return The parameter definitions
*/
Expand Down Expand Up @@ -3955,7 +3955,7 @@ object Parsers {
}

/** DefDef ::= DefSig [‘:’ Type] [‘=’ Expr]
* | this TypelessClauses [DefImplicitClause] `=' ConstrExpr
* | this ConstrParamClauses [DefImplicitClause] `=' ConstrExpr
* DefSig ::= id [DefParamClauses] [DefImplicitClause]
*/
def defDefOrDcl(start: Offset, mods: Modifiers, numLeadParams: Int = 0): DefDef = atSpan(start, nameStart) {
Expand Down
6 changes: 3 additions & 3 deletions docs/_docs/internals/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ DefParamClauses ::= DefParamClause { DefParamClause } -- and two DefTypeParam
DefParamClause ::= DefTypeParamClause
| DefTermParamClause
| UsingParamClause
TypelessClauses ::= TypelessClause {TypelessClause}
TypelessClause ::= DefTermParamClause
ConstrParamClauses::= ConstrParamClause {ConstrParamClause}
ConstrParamClause ::= DefTermParamClause
| UsingParamClause
DefTermParamClause::= [nl] ‘(’ [DefTermParams] ‘)’
UsingParamClause ::= [nl] ‘(’ ‘using’ (DefTermParams | FunArgTypes) ‘)’
Expand Down Expand Up @@ -459,7 +459,7 @@ Def ::= ‘val’ PatDef
PatDef ::= ids [‘:’ Type] [‘=’ Expr]
| Pattern2 [‘:’ Type] [‘=’ Expr] PatDef(_, pats, tpe?, expr)
DefDef ::= DefSig [‘:’ Type] [‘=’ Expr] DefDef(_, name, paramss, tpe, expr)
| ‘this’ TypelessClauses [DefImplicitClause] ‘=’ ConstrExpr DefDef(_, <init>, vparamss, EmptyTree, expr | Block)
| ‘this’ ConstrParamClauses [DefImplicitClause] ‘=’ ConstrExpr DefDef(_, <init>, vparamss, EmptyTree, expr | Block)
DefSig ::= id [DefParamClauses] [DefImplicitClause]
TypeDef ::= id [HkTypeParamClause] {FunParamClause} TypeAndCtxBounds TypeDefTree(_, name, tparams, bound
[‘=’ Type]
Expand Down
6 changes: 3 additions & 3 deletions docs/_docs/reference/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ DefParamClauses ::= DefParamClause { DefParamClause } -- and two DefTypeParam
DefParamClause ::= DefTypeParamClause
| DefTermParamClause
| UsingParamClause
TypelessClauses ::= TypelessClause {TypelessClause}
TypelessClause ::= DefTermParamClause
ConstrParamClauses::= ConstrParamClause {ConstrParamClause}
ConstrParamClause ::= DefTermParamClause
| UsingParamClause

DefTermParamClause::= [nl] ‘(’ [DefTermParams] ‘)’
Expand Down Expand Up @@ -433,7 +433,7 @@ Def ::= ‘val’ PatDef
PatDef ::= ids [‘:’ Type] [‘=’ Expr]
| Pattern2 [‘:’ Type] [‘=’ Expr] PatDef(_, pats, tpe?, expr)
DefDef ::= DefSig [‘:’ Type] [‘=’ Expr] DefDef(_, name, paramss, tpe, expr)
| ‘this’ TypelessClauses [DefImplicitClause] ‘=’ ConstrExpr DefDef(_, <init>, vparamss, EmptyTree, expr | Block)
| ‘this’ ConstrParamClauses [DefImplicitClause] ‘=’ ConstrExpr DefDef(_, <init>, vparamss, EmptyTree, expr | Block)
DefSig ::= id [DefParamClauses] [DefImplicitClause]
TypeDef ::= id [HkTypeParamClause] {FunParamClause}TypeBounds TypeDefTree(_, name, tparams, bound
[‘=’ Type]
Expand Down
Loading