summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2005-11-30 17:16:11 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2005-11-30 17:16:11 +0000
commit89c583a548bfa2c113cb5bff5668895107bee70e (patch)
tree2267fa0064d587646a214d5e1bfc637cb2de93d9 /sources
parent31168656d770558c52c7cd1555621ce52ea8cfca (diff)
downloadscala-89c583a548bfa2c113cb5bff5668895107bee70e.tar.gz
scala-89c583a548bfa2c113cb5bff5668895107bee70e.tar.bz2
scala-89c583a548bfa2c113cb5bff5668895107bee70e.zip
SCABBUS now also supports the "print" option.
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/tools/nsc/ant/NSC.scala20
1 files changed, 18 insertions, 2 deletions
diff --git a/sources/scala/tools/nsc/ant/NSC.scala b/sources/scala/tools/nsc/ant/NSC.scala
index 008958857c..3502a01e37 100644
--- a/sources/scala/tools/nsc/ant/NSC.scala
+++ b/sources/scala/tools/nsc/ant/NSC.scala
@@ -52,6 +52,7 @@ package scala.tools.nsc.ant {
* <li>stop,</li>
* <li>skip,</li>
* <li>check,</li>
+ * <li>print,</li>
* <li>showicode,</li>
* <li>log,</li>
* <li>debuginfo.</li>
@@ -133,6 +134,8 @@ package scala.tools.nsc.ant {
private var logPhase: List[String] = Nil;
/** Which compilation phases results should be checked for consistency. */
private var check: List[String] = Nil;
+ /** Which compilation phases results should be printed-out. */
+ private var print: List[String] = Nil;
/** Print ICode files along with class files (debug option). */
private var showICode: Boolean = false;
@@ -426,8 +429,8 @@ package scala.tools.nsc.ant {
}
/**
- * Sets the force attribute. Used by Ant.
- * @param input The value for <code>force</code>.
+ * Sets the check attribute. Used by Ant.
+ * @param input The value for <code>check</code>.
*/
def setCheck (input: String) = {
check = List.fromArray(input.split(",")).flatMap(s: String => {
@@ -437,6 +440,18 @@ package scala.tools.nsc.ant {
});
}
+ /**
+ * Sets the print attribute. Used by Ant.
+ * @param input The value for <code>print</code>.
+ */
+ def setPrint (input: String) = {
+ print = 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 print does not exist."); Nil}
+ });
+ }
+
def setShowicode(input: Boolean): Unit =
showICode = input;
@@ -598,6 +613,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 (!print.isEmpty) settings.print.value = print;
settings.Xshowicode.value = showICode;
settings.debuginfo.value = debugInfo;
if (!logPhase.isEmpty) settings.log.value = logPhase;