diff options
author | Lex Spoon <lex@lexspoon.org> | 2007-06-18 13:41:55 +0000 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2007-06-18 13:41:55 +0000 |
commit | 4dc591846225fb4a97aeaea15556d8132505eda3 (patch) | |
tree | 1ae84bf78a4f57b6398412c38177a3528da293bc /src/compiler | |
parent | 2ec348815b8b39be06ee09481cc6eb3531a8af51 (diff) | |
download | scala-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')
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 5 |
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) |