summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/Global.scala
diff options
context:
space:
mode:
authorLex Spoon <lex@lexspoon.org>2007-06-18 13:41:55 +0000
committerLex Spoon <lex@lexspoon.org>2007-06-18 13:41:55 +0000
commit4dc591846225fb4a97aeaea15556d8132505eda3 (patch)
tree1ae84bf78a4f57b6398412c38177a3528da293bc /src/compiler/scala/tools/nsc/Global.scala
parent2ec348815b8b39be06ee09481cc6eb3531a8af51 (diff)
downloadscala-4dc591846225fb4a97aeaea15556d8132505eda3.tar.gz
scala-4dc591846225fb4a97aeaea15556d8132505eda3.tar.bz2
scala-4dc591846225fb4a97aeaea15556d8132505eda3.zip
allow the choice of ScriptRunner to be overridd...
allow the choice of ScriptRunner to be overridden by subclasses
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index b6ccbf4ad2..65b358610c 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -47,6 +47,9 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable
//def this() = this(new Settings, new ConsoleReporter)
+ // helper modules
+ val scriptRunner: ScriptRunner = ScriptRunner
+
// sub-components --------------------------------------------------
object nodePrinters extends NodePrinters {
val global: Global.this.type = Global.this
@@ -599,7 +602,7 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable
error("can only compile one script at a time")
val sources = filenames map (
if (scriptMain != "")
- (x => ScriptRunner.wrappedScript(scriptMain, x, getSourceFile _))
+ (x => scriptRunner.wrappedScript(scriptMain, x, getSourceFile _))
else
getSourceFile)
compileSources(sources)