diff options
author | michelou <michelou@epfl.ch> | 2006-11-08 10:34:03 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2006-11-08 10:34:03 +0000 |
commit | 4fb358b4ae286de7dd30fd3143aeabc689636876 (patch) | |
tree | 60db62d7b16c7e17100076566bd4e6c8fef74a63 /src/compiler/scala/tools/ant/Scalac.scala | |
parent | 1e1a2160bcd84fcfe58132a4da1e1f9d16fa939f (diff) | |
download | scala-4fb358b4ae286de7dd30fd3143aeabc689636876.tar.gz scala-4fb358b4ae286de7dd30fd3143aeabc689636876.tar.bz2 scala-4fb358b4ae286de7dd30fd3143aeabc689636876.zip |
added ant task "FastScalac" and updated test su...
added ant task "FastScalac" and updated test suite accordingly
Diffstat (limited to 'src/compiler/scala/tools/ant/Scalac.scala')
-rw-r--r-- | src/compiler/scala/tools/ant/Scalac.scala | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/ant/Scalac.scala b/src/compiler/scala/tools/ant/Scalac.scala index c373e68f6a..6ef3fa50f5 100644 --- a/src/compiler/scala/tools/ant/Scalac.scala +++ b/src/compiler/scala/tools/ant/Scalac.scala @@ -486,9 +486,8 @@ package scala.tools.ant { ** The big execute method ** \*============================================================================*/ - /** Performs the compilation. */ - override def execute() = { - + /** Initializes settings and source files */ + protected def initialize: Pair[Settings, List[File]] = { // Tests if all mandatory attributes are set and valid. if (origin.isEmpty) error("Attribute 'srcdir' is not set.") if (getOrigin.isEmpty) error("Attribute 'srcdir' is not set.") @@ -541,7 +540,6 @@ package scala.tools.ant { // Builds-up the compilation settings for Scalac with the existing Ant // parameters. - val reporter = new ConsoleReporter() val settings = new Settings(error) settings.outdir.value = asString(destination.get) if (!classpath.isEmpty) @@ -579,6 +577,13 @@ package scala.tools.ant { if (argsBuf eq args) error("Parameter '" + args.head + "' is not recognised by Scalac.") } + Pair(settings, sourceFiles) + } + + /** Performs the compilation. */ + override def execute() = { + val reporter = new ConsoleReporter() + val Pair(settings, sourceFiles) = initialize // Compiles the actual code val compiler = new Global(settings, reporter) |