summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-09-27 09:20:48 -0700
committerPaul Phillips <paulp@improving.org>2013-09-27 09:23:49 -0700
commit9ea3a4ac2cb36ee8519deab04fd1bd6be81a89cb (patch)
tree6b962aa33f7f12043e0e4153cb832807a92ea4b0 /src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
parent1a3c16fd36407bb2308bbb84739601544ac4a2e5 (diff)
downloadscala-9ea3a4ac2cb36ee8519deab04fd1bd6be81a89cb.tar.gz
scala-9ea3a4ac2cb36ee8519deab04fd1bd6be81a89cb.tar.bz2
scala-9ea3a4ac2cb36ee8519deab04fd1bd6be81a89cb.zip
SI-6762 rename emptyValDef to noSelfType.
Looks like emptyValDef.isEmpty was already changed to return false, so now all that's left is a name which means something.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/Parsers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Parsers.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
index a894e38ab4..a7790bec43 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -217,7 +217,7 @@ self =>
override def blockExpr(): Tree = skipBraces(EmptyTree)
- override def templateBody(isPre: Boolean) = skipBraces((emptyValDef, EmptyTree.asList))
+ override def templateBody(isPre: Boolean) = skipBraces((noSelfType, EmptyTree.asList))
}
class UnitParser(override val unit: global.CompilationUnit, patches: List[BracePatch]) extends SourceFileParser(unit.source) { uself =>
@@ -429,7 +429,7 @@ self =>
// object Main
def moduleName = newTermName(ScriptRunner scriptMain settings)
- def moduleBody = Template(atInPos(scalaAnyRefConstr) :: Nil, emptyValDef, List(emptyInit, mainDef))
+ def moduleBody = Template(atInPos(scalaAnyRefConstr) :: Nil, noSelfType, List(emptyInit, mainDef))
def moduleDef = ModuleDef(NoMods, moduleName, moduleBody)
// package <empty> { ... }
@@ -958,7 +958,7 @@ self =>
// it still gets a CompoundTypeTree.
ts.toList match {
case tp :: Nil if !hasRefinement => tp // single type, no refinement, already positioned
- case tps => atPos(t.pos.startOrPoint)(CompoundTypeTree(Template(tps, emptyValDef, refinements)))
+ case tps => atPos(t.pos.startOrPoint)(CompoundTypeTree(Template(tps, noSelfType, refinements)))
}
}
@@ -2796,7 +2796,7 @@ self =>
if (in.token == LBRACE) {
// @S: pre template body cannot stub like post body can!
val (self, body) = templateBody(isPre = true)
- if (in.token == WITH && (self eq emptyValDef)) {
+ if (in.token == WITH && (self eq noSelfType)) {
val earlyDefs: List[Tree] = body.map(ensureEarlyDef).filter(_.nonEmpty)
in.nextToken()
val parents = templateParents()
@@ -2883,7 +2883,7 @@ self =>
if (parenMeansSyntaxError) syntaxError(s"traits or objects may not have parameters", skipIt = true)
else abort("unexpected opening parenthesis")
}
- (emptyValDef, List())
+ (noSelfType, List())
}
}
@@ -2939,7 +2939,7 @@ self =>
* @param isPre specifies whether in early initializer (true) or not (false)
*/
def templateStatSeq(isPre : Boolean): (ValDef, List[Tree]) = checkNoEscapingPlaceholders {
- var self: ValDef = emptyValDef
+ var self: ValDef = noSelfType
var firstOpt: Option[Tree] = None
if (isExprIntro) {
in.flushDoc