Skip to content

Commit c832977

Browse files
author
Som Snytt
committed
Remove unused isPre
1 parent d52a937 commit c832977

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/compiler/scala/tools/nsc/ast/parser/Parsers.scala

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ self =>
218218

219219
override def blockExpr(): Tree = skipBraces(EmptyTree)
220220

221-
override def templateBody(isPre: Boolean) = skipBraces((noSelfType, EmptyTree.asList))
221+
override def templateBody() = skipBraces((noSelfType, EmptyTree.asList))
222222
}
223223

224224
class UnitParser(override val unit: global.CompilationUnit, patches: List[BracePatch]) extends SourceFileParser(unit.source) { uself =>
@@ -3322,7 +3322,7 @@ self =>
33223322
if (in.token == LBRACE) {
33233323
val braceOffset = in.offset
33243324
// @S: pre template body cannot stub like post body can!
3325-
val (self, body) = templateBody(isPre = true)
3325+
val (self, body) = templateBody()
33263326
if (in.token == WITH && (self eq noSelfType)) {
33273327
val advice =
33283328
if (currentRun.isScala3) "use trait parameters instead."
@@ -3404,16 +3404,15 @@ self =>
34043404
/** {{{
34053405
* TemplateBody ::= [nl] `{` TemplateStatSeq `}`
34063406
* }}}
3407-
* @param isPre specifies whether in early initializer (true) or not (false)
34083407
*/
3409-
def templateBody(isPre: Boolean) = inBraces(templateStatSeq(isPre)) match {
3408+
def templateBody() = inBraces(templateStatSeq()) match {
34103409
case (selfTypeVal, Nil) => (selfTypeVal, EmptyTree.asList)
34113410
case result => result
34123411
}
34133412
def templateBodyOpt(parenMeansSyntaxError: Boolean): (ValDef, List[Tree]) = {
34143413
newLineOptWhenFollowedBy(LBRACE)
34153414
if (in.token == LBRACE) {
3416-
templateBody(isPre = false)
3415+
templateBody()
34173416
} else {
34183417
if (in.token == LPAREN) {
34193418
if (parenMeansSyntaxError) syntaxError(s"traits or objects may not have parameters", skipIt = true)
@@ -3476,9 +3475,8 @@ self =>
34763475
/** {{{
34773476
* TemplateStatSeq ::= [id [`:` Type] `=>`] TemplateStats
34783477
* }}}
3479-
* @param isPre specifies whether in early initializer (true) or not (false)
34803478
*/
3481-
def templateStatSeq(isPre : Boolean): (ValDef, List[Tree]) = {
3479+
def templateStatSeq(): (ValDef, List[Tree]) = {
34823480
var self: ValDef = noSelfType
34833481
var firstOpt: Option[Tree] = None
34843482
if (isExprIntro) checkNoEscapingPlaceholders {

0 commit comments

Comments
 (0)