diff options
author | Paul Phillips <paulp@improving.org> | 2013-03-04 14:47:01 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-03-04 14:48:07 -0800 |
commit | dc1cd96ffd44ddd47ea1d5be88b4b9e438bd9c3b (patch) | |
tree | f364545f8be08dba80fc8a9ce570ea48ca8270d1 /src/partest | |
parent | 8dc1bc78ca57876085bb3b384b002dd29bc0e5fe (diff) | |
download | scala-dc1cd96ffd44ddd47ea1d5be88b4b9e438bd9c3b.tar.gz scala-dc1cd96ffd44ddd47ea1d5be88b4b9e438bd9c3b.tar.bz2 scala-dc1cd96ffd44ddd47ea1d5be88b4b9e438bd9c3b.zip |
Disentangled RangePositions from interactive.
This is a stepping stone to having range positions all the
time, as well as to modularizing the presentation compiler.
It does not enable range positions by default, only places
them smoewhere where they can be.
Diffstat (limited to 'src/partest')
-rw-r--r-- | src/partest/scala/tools/partest/DirectTest.scala | 5 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/CompileManager.scala | 6 |
2 files changed, 2 insertions, 9 deletions
diff --git a/src/partest/scala/tools/partest/DirectTest.scala b/src/partest/scala/tools/partest/DirectTest.scala index 483cb491a1..3f61062073 100644 --- a/src/partest/scala/tools/partest/DirectTest.scala +++ b/src/partest/scala/tools/partest/DirectTest.scala @@ -42,10 +42,7 @@ abstract class DirectTest extends App { newCompiler(settings) } - def newCompiler(settings: Settings): Global = { - if (settings.Yrangepos.value) new Global(settings, reporter(settings)) with interactive.RangePositions - else new Global(settings, reporter(settings)) - } + def newCompiler(settings: Settings): Global = Global(settings, reporter(settings)) def reporter(settings: Settings): Reporter = new ConsoleReporter(settings) diff --git a/src/partest/scala/tools/partest/nest/CompileManager.scala b/src/partest/scala/tools/partest/nest/CompileManager.scala index 0e62f9a022..a8694cc0d6 100644 --- a/src/partest/scala/tools/partest/nest/CompileManager.scala +++ b/src/partest/scala/tools/partest/nest/CompileManager.scala @@ -10,7 +10,6 @@ package nest import scala.tools.nsc.{ Global, Settings, CompilerCommand, FatalError, io } import scala.reflect.io.{ Directory, File => SFile, FileOperationException } -import scala.tools.nsc.interactive.RangePositions import scala.tools.nsc.reporters.{ Reporter, ConsoleReporter } import scala.tools.nsc.util.{ ClassPath, FakePos } import scala.tools.nsc.Properties.{ setProp, propOrEmpty } @@ -52,10 +51,7 @@ abstract class SimpleCompiler { class DirectCompiler(val fileManager: FileManager) extends SimpleCompiler { def newGlobal(settings: Settings, reporter: Reporter): Global = - if (settings.Yrangepos.value) - new Global(settings, reporter) with RangePositions - else - new Global(settings, reporter) + Global(settings, reporter) def newGlobal(settings: Settings, logWriter: FileWriter): Global = newGlobal(settings, new ExtConsoleReporter(settings, new PrintWriter(logWriter))) |