summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2004-11-30 17:33:33 +0000
committerpaltherr <paltherr@epfl.ch>2004-11-30 17:33:33 +0000
commitcd7dcb372b125d1f564d237d916e0f91d10f82a2 (patch)
treeeeb4069d11104d35cdfe2ea05317d5a84d8f798b
parent85733d4b2e7f0385d56926785b4f46a3a5490629 (diff)
downloadscala-cd7dcb372b125d1f564d237d916e0f91d10f82a2.tar.gz
scala-cd7dcb372b125d1f564d237d916e0f91d10f82a2.tar.bz2
scala-cd7dcb372b125d1f564d237d916e0f91d10f82a2.zip
- Translated HTMLGeneratorPhases into scala
-rw-r--r--config/list/scaladoc.lst2
-rw-r--r--sources/scala/tools/scaladoc/HTMLGeneratorCommand.java5
-rw-r--r--sources/scala/tools/scaladoc/HTMLGeneratorPhases.java54
-rw-r--r--sources/scala/tools/scaladoc/HTMLGeneratorPhases.scala50
4 files changed, 54 insertions, 57 deletions
diff --git a/config/list/scaladoc.lst b/config/list/scaladoc.lst
index a59917bd15..60fdc2ff51 100644
--- a/config/list/scaladoc.lst
+++ b/config/list/scaladoc.lst
@@ -9,7 +9,7 @@ Comment.java
HTMLGenerator.java
HTMLGeneratorCommand.java
HTMLGeneratorPhase.scala
-HTMLGeneratorPhases.java
+HTMLGeneratorPhases.scala
Main.scala
ScalaSearch.java
#DocModule.java
diff --git a/sources/scala/tools/scaladoc/HTMLGeneratorCommand.java b/sources/scala/tools/scaladoc/HTMLGeneratorCommand.java
index dc4fab3015..3ef4bc1261 100644
--- a/sources/scala/tools/scaladoc/HTMLGeneratorCommand.java
+++ b/sources/scala/tools/scaladoc/HTMLGeneratorCommand.java
@@ -18,6 +18,7 @@ import scala.tools.util.ClassPath;
import scala.tools.util.Reporter;
import scalac.CompilerCommand;
+import scalac.CompilerPhases;
import scalac.util.BooleanOptionParser;
import scalac.util.OptionParser;
import scalac.util.StringOptionParser;
@@ -61,7 +62,7 @@ public class HTMLGeneratorCommand extends CompilerCommand {
* @param phases
*/
public HTMLGeneratorCommand(String product, String version,
- Reporter reporter, HTMLGeneratorPhases phases)
+ Reporter reporter, CompilerPhases phases)
{
this(product, version, "<source files> [-- <packages>]", reporter, phases);
}
@@ -76,7 +77,7 @@ public class HTMLGeneratorCommand extends CompilerCommand {
* @param phases
*/
public HTMLGeneratorCommand(String product, String version, String syntax,
- Reporter reporter, HTMLGeneratorPhases phases)
+ Reporter reporter, CompilerPhases phases)
{
super(product, version, syntax, reporter, phases);
diff --git a/sources/scala/tools/scaladoc/HTMLGeneratorPhases.java b/sources/scala/tools/scaladoc/HTMLGeneratorPhases.java
deleted file mode 100644
index 490de56767..0000000000
--- a/sources/scala/tools/scaladoc/HTMLGeneratorPhases.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/* ____ ____ ____ ____ ______ *\
-** / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala **
-** __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL **
-** /_____/\____/\___/\____/____/ **
-\* */
-
-// $Id$
-
-package scala.tools.scaladoc;
-
-import scala.tools.scalac.CompilerPhases$class;
-import scalac.PhaseDescriptor;
-
-/**
- * The class <code>HTMLGeneratorPhases</code> defines the set
- * of processing phases belonging the the HTML generator tool.
- */
-public class HTMLGeneratorPhases extends CompilerPhases$class {
-
- //########################################################################
- // Public Fields
-
- /**
- * The phase descriptor of the HTML generator.
- */
- public final PhaseDescriptor HTMLGENERATOR;
-
- //########################################################################
- // Public Constructors
-
- /**
- * Creates an instance variable.
- */
- public HTMLGeneratorPhases() {
- Class clazz = null;
- try {
- clazz = Class.forName("scala.tools.scaladoc.HTMLGeneratorPhase$class");
- } catch(Exception e) { System.out.println(e); }
- this.HTMLGENERATOR = new PhaseDescriptor(
- "html generator",
- "generate html documentation",
- "generating html",
- clazz);
- // scala.tools.scaladoc.HTMLGeneratorPhase.class);
-
- int pos = insertAfter(HTMLGENERATOR, ANALYZER);
- PhaseDescriptor[] array = phases();
- // we skip all phases between HTMLGENERATOR and TERMINAL.
- for (int i = pos + 1; i < array.length - 1; i++)
- array[i].addSkipFlag();
- }
-
- //########################################################################
-}
diff --git a/sources/scala/tools/scaladoc/HTMLGeneratorPhases.scala b/sources/scala/tools/scaladoc/HTMLGeneratorPhases.scala
new file mode 100644
index 0000000000..ad4dd9d85a
--- /dev/null
+++ b/sources/scala/tools/scaladoc/HTMLGeneratorPhases.scala
@@ -0,0 +1,50 @@
+/* ____ ____ ____ ____ ______ *\
+** / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala **
+** __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL **
+** /_____/\____/\___/\____/____/ **
+\* */
+
+// $Id$
+
+import scalac.PhaseDescriptor;
+import scalac.util.Debug;
+
+package scala.tools.scaladoc {
+
+/**
+ * The class <code>HTMLGeneratorPhases</code> defines the set
+ * of processing phases belonging the the HTML generator tool.
+ */
+class HTMLGeneratorPhases extends scalac.CompilerPhases {
+
+ //##########################################################################
+ // Public Fields
+
+ /** The phase descriptor of the HTML generator. */
+ val HTMLGENERATOR =
+ try {
+ new PhaseDescriptor(
+ "html generator",
+ "generate html documentation",
+ "generating html",
+ Class.forName("scala.tools.scaladoc.HTMLGeneratorPhase$class"));
+ } catch {
+ case exception =>
+ throw Debug.abort(exception);
+ }
+
+ /** Instance initializer */
+ {
+ val pos = insertAfter(HTMLGENERATOR, ANALYZER);
+ val array = phases();
+ // we skip all phases between HTMLGENERATOR and TERMINAL.
+ var i = pos + 1;
+ while (i < array.length - 1) {
+ array(i).addSkipFlag();
+ i = i + 1;
+ }
+ }
+
+ //##########################################################################
+}
+}