summaryrefslogtreecommitdiff
path: root/sources/scalac/ast
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2004-12-03 18:41:08 +0000
committerpaltherr <paltherr@epfl.ch>2004-12-03 18:41:08 +0000
commitebe2c4bf3c1662b3667ce61fed54bde84afda615 (patch)
treedbc7c91a9aaf3989966bbcea30b306869d8a69e7 /sources/scalac/ast
parent4fdab72617dbe4e049939e268df88f7a7efe5c06 (diff)
downloadscala-ebe2c4bf3c1662b3667ce61fed54bde84afda615.tar.gz
scala-ebe2c4bf3c1662b3667ce61fed54bde84afda615.tar.bz2
scala-ebe2c4bf3c1662b3667ce61fed54bde84afda615.zip
- Removed field units in class Global
Diffstat (limited to 'sources/scalac/ast')
-rw-r--r--sources/scalac/ast/Tree.java.tmpl7
-rw-r--r--sources/scalac/ast/printer/TreePrinter.java8
2 files changed, 7 insertions, 8 deletions
diff --git a/sources/scalac/ast/Tree.java.tmpl b/sources/scalac/ast/Tree.java.tmpl
index 0b130451fe..8a12c16577 100644
--- a/sources/scalac/ast/Tree.java.tmpl
+++ b/sources/scalac/ast/Tree.java.tmpl
@@ -14,6 +14,7 @@ import java.io.PrintWriter;
import scala.tools.util.Position;
import scalac.Global;
+import scalac.ast.printer.TreePrinter;
import scalac.checkers.CheckTreeNodes;
import scalac.symtab.Symbol;
import scalac.symtab.Type;
@@ -111,8 +112,10 @@ public class Tree {
/** Returns the string representation of this tree. */
public String toString() {
StringWriter buffer = new StringWriter();
- Global global = Global.instance;
- global.newTextTreePrinter(new PrintWriter(buffer)).print(this).flush();
+ TreePrinter printer =
+ Global.instance.newTextTreePrinter(new PrintWriter(buffer));
+ printer.print(this);
+ printer.flush();
return buffer.toString();
}
diff --git a/sources/scalac/ast/printer/TreePrinter.java b/sources/scalac/ast/printer/TreePrinter.java
index ce6ae2bd18..a0884b0b2a 100644
--- a/sources/scalac/ast/printer/TreePrinter.java
+++ b/sources/scalac/ast/printer/TreePrinter.java
@@ -23,10 +23,6 @@ public interface TreePrinter {
public void end();
public void flush();
- public void print(Global global);
- public void print(CompilationUnit unit);
-
- public TreePrinter print(Tree tree);
- public TreePrinter print(String str);
- public TreePrinter println();
+ public void print(CompilationUnit[] units);
+ public void print(Tree tree);
}