diff options
author | buraq <buraq@epfl.ch> | 2005-06-21 15:55:17 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2005-06-21 15:55:17 +0000 |
commit | 2c62148021670837a35f49b19f973025cbfea563 (patch) | |
tree | f76d46f0e56cf93c123df1af10ae7f0b0d89f507 /newsources | |
parent | fcafb7bed6af5ae92fb339a674e9b13391cff634 (diff) | |
download | scala-2c62148021670837a35f49b19f973025cbfea563.tar.gz scala-2c62148021670837a35f49b19f973025cbfea563.tar.bz2 scala-2c62148021670837a35f49b19f973025cbfea563.zip |
to compile and test nsc with ant
Diffstat (limited to 'newsources')
-rw-r--r-- | newsources/jaco/pizza/HackedPicoAdaptor.java | 33 | ||||
-rw-r--r-- | newsources/jaco/pizza/HackedPicoTask.java | 14 | ||||
-rwxr-xr-x | newsources/scala/ScalaObject.scala | 19 |
3 files changed, 66 insertions, 0 deletions
diff --git a/newsources/jaco/pizza/HackedPicoAdaptor.java b/newsources/jaco/pizza/HackedPicoAdaptor.java new file mode 100644 index 0000000000..cede90f401 --- /dev/null +++ b/newsources/jaco/pizza/HackedPicoAdaptor.java @@ -0,0 +1,33 @@ +// / _ _ JaCo +// \ //\ / / \ - an ant compiler adaptor for PiCo +// \// \\_\_/ +// \ Matthias Zenger, 13/12/2001 + +package jaco.pizza; + +import jaco.framework.ant.*; +import org.apache.tools.ant.types.Commandline; +import jaco.pizza.component.*; +import jaco.pizza.context.*; +import jaco.framework.*; + + +/** Ant compiler adapter to use the PiCo Java compiler + * for translating .java files to .class files. + */ +public class HackedPicoAdaptor extends jaco.pizza.AntAdaptor { + + public boolean runCompiler(String[] args) { + PizzaSettings js = new PizzaSettings(); + + js.scalahack = true; // yippie + + try { + js.parse(args); + return js.JavaContext().JavaCompiler().compile(); + } catch (Throwable e) { + return false; + } + } + +} diff --git a/newsources/jaco/pizza/HackedPicoTask.java b/newsources/jaco/pizza/HackedPicoTask.java new file mode 100644 index 0000000000..49cd9375d4 --- /dev/null +++ b/newsources/jaco/pizza/HackedPicoTask.java @@ -0,0 +1,14 @@ +// / _ _ JaCo +// \ //\ / / \ - an ant task for PiCo +// \// \\_\_/ +// \ Matthias Zenger, 13/12/2001 + +package jaco.pizza; + +import jaco.framework.ant.*; + +public class HackedPicoTask extends AntCompilerTask { + public String compilerAdaptor() { + return "jaco.pizza.HackedPicoAdaptor"; + } +} diff --git a/newsources/scala/ScalaObject.scala b/newsources/scala/ScalaObject.scala new file mode 100755 index 0000000000..0df3ceb7cd --- /dev/null +++ b/newsources/scala/ScalaObject.scala @@ -0,0 +1,19 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +// $Id$ + +package scala; + +trait ScalaObject extends AnyRef { + + /** This method is needed for optimizing pattern matching expressions + * which match on constructors of case classes. + */ + def $tag(): Int = 0; +} |