Skip to content

Commit

Permalink
Remove unused methods
Browse files Browse the repository at this point in the history
Not fixup'ed with another commit to keep a trace of the original version of these methods.
  • Loading branch information
Quentin Bernet committed Feb 2, 2023
1 parent e7ad49a commit 0b67f48
Showing 1 changed file with 3 additions and 28 deletions.
31 changes: 3 additions & 28 deletions compiler/src/dotty/tools/dotc/parsing/Parsers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3079,35 +3079,13 @@ object Parsers {

/* -------- PARAMETERS ------------------------------------------- */

/** DefParamClause ::= DefTypeParamClause
* | DefTermParamClause
* | UsingParamClause
*/
def typeOrTermParamClause(
ownerKind: ParamOwner,
nparams: Int, // number of parameters preceding this clause
ofClass: Boolean = false, // owner is a class
ofCaseClass: Boolean = false, // owner is a case class
prefix: Boolean = false, // clause precedes name of an extension method
givenOnly: Boolean = false, // only given parameters allowed
firstClause: Boolean = false // clause is the first in regular list of clauses
): List[TypeDef] | List[ValDef] =
if (in.token == LPAREN)
termParamClause(nparams, ofClass, ofCaseClass, prefix, givenOnly, firstClause)
else if (in.token == LBRACKET)
typeParamClause(ownerKind)
else
Nil

end typeOrTermParamClause

/** DefParamClauses ::= DefParamClause { DefParamClause } -- and two DefTypeParamClause cannot be adjacent
* DefParamClause ::= DefTypeParamClause
* | DefTermParamClause
* | UsingParamClause
*/
def typeOrTermParamClauses(
ownerKind: ParamOwner,
ofClass: Boolean = false,
ofCaseClass: Boolean = false,
givenOnly: Boolean = false,
numLeadParams: Int = 0
): List[List[TypeDef] | List[ValDef]] =

Expand All @@ -3118,9 +3096,6 @@ object Parsers {
val paramsStart = in.offset
val params = termParamClause(
numLeadParams,
ofClass = ofClass,
ofCaseClass = ofCaseClass,
givenOnly = givenOnly,
firstClause = firstClause)
val lastClause = params.nonEmpty && params.head.mods.flags.is(Implicit)
params :: (
Expand Down

0 comments on commit 0b67f48

Please sign in to comment.