summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2005-10-18 11:54:14 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2005-10-18 11:54:14 +0000
commit9e1ed625367326b0afbac2235ce08bf6c98d0a43 (patch)
treeced67d3aea04ffb2e1c8d3fb4fbdda1bddbc1ba4 /sources
parent0b87051d35bbf9ca3e75fdab4c13819b6a09493b (diff)
downloadscala-9e1ed625367326b0afbac2235ce08bf6c98d0a43.tar.gz
scala-9e1ed625367326b0afbac2235ce08bf6c98d0a43.tar.bz2
scala-9e1ed625367326b0afbac2235ce08bf6c98d0a43.zip
Added the log option.
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/tools/nsc/ant/NSC.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/sources/scala/tools/nsc/ant/NSC.scala b/sources/scala/tools/nsc/ant/NSC.scala
index 1fdaa249b7..2616d41322 100644
--- a/sources/scala/tools/nsc/ant/NSC.scala
+++ b/sources/scala/tools/nsc/ant/NSC.scala
@@ -51,6 +51,7 @@ package scala.tools.nsc.ant {
* <li>force,</li>
* <li>stop,</li>
* <li>skip,</li>
+ * <li>log,</li>
* <li>check.</li>
* </ul>
* It also takes the following parameters as nested elements:<ul>
@@ -126,6 +127,8 @@ package scala.tools.nsc.ant {
private var stop: Option[String] = None;
/** Which compilation phases should be skipped during compilation. */
private var skip: List[String] = Nil;
+ /** Which compilation phases should be logged during compilation. */
+ private var logPhase: List[String] = Nil;
/** Which compilation phases results should be checked for consistency. */
private var check: List[String] = Nil;
@@ -403,6 +406,18 @@ package scala.tools.nsc.ant {
}
/**
+ * Sets the log attribute. Used by Ant.
+ * @param input The value for <code>logPhase</code>.
+ */
+ def setLog (input: String) = {
+ logPhase = List.fromArray(input.split(",")).flatMap(s: String => {
+ val st = s.trim();
+ if (CompilerPhase.isPermissible(st)) (if (input != "") List(st) else Nil)
+ else {error("Phase " + st + " in log does not exist."); Nil}
+ });
+ }
+
+ /**
* Sets the force attribute. Used by Ant.
* @param input The value for <code>force</code>.
*/
@@ -566,6 +581,7 @@ package scala.tools.nsc.ant {
if (!stop.isEmpty) settings.stop.value = List(stop.get);
if (!skip.isEmpty) settings.skip.value = skip;
if (!check.isEmpty) settings.check.value = check;
+ if (!logPhase.isEmpty) settings.log.value = logPhase;
// Sets path properties to prevent ClassPath from being corrupted.
// It this isn't done, classpath will contain more than