diff options
author | paltherr <paltherr@epfl.ch> | 2004-02-01 18:45:56 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-02-01 18:45:56 +0000 |
commit | 53f396c70e0f402a0a3eba3f2041b47aa6050b50 (patch) | |
tree | 30c3805d71817588439eda8c9154d7ca94e68409 /sources | |
parent | 204c95bb5e75059f4450d12f866e15ee7ef5d6ff (diff) | |
download | scala-53f396c70e0f402a0a3eba3f2041b47aa6050b50.tar.gz scala-53f396c70e0f402a0a3eba3f2041b47aa6050b50.tar.bz2 scala-53f396c70e0f402a0a3eba3f2041b47aa6050b50.zip |
- Added test to avoid printing Select prefixes ...
- Added test to avoid printing Select prefixes equal to Ident(<root>)
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/tools/scalac/ast/printer/TextTreePrinter.scala | 6 | ||||
-rw-r--r-- | sources/scalac/ast/printer/TextTreePrinter.java | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sources/scala/tools/scalac/ast/printer/TextTreePrinter.scala b/sources/scala/tools/scalac/ast/printer/TextTreePrinter.scala index f7a43f3ee7..f6feeea3a0 100644 --- a/sources/scala/tools/scalac/ast/printer/TextTreePrinter.scala +++ b/sources/scala/tools/scalac/ast/printer/TextTreePrinter.scala @@ -461,8 +461,10 @@ class TextTreePrinter(writer: PrintWriter) with TreePrinter { printType(tree); case Tree$Select(qualifier, name) => - print(qualifier); - print(TXT_DOT); + if (scalac_Global.instance.debug || qualifier.symbol() == null || !qualifier.symbol().isRoot()) { + print(qualifier); + print(TXT_DOT); + } printSymbolUse(tree.symbol(), name); printType(tree); diff --git a/sources/scalac/ast/printer/TextTreePrinter.java b/sources/scalac/ast/printer/TextTreePrinter.java index cbe607b3b2..72e8b9848d 100644 --- a/sources/scalac/ast/printer/TextTreePrinter.java +++ b/sources/scalac/ast/printer/TextTreePrinter.java @@ -548,8 +548,10 @@ public class TextTreePrinter implements TreePrinter { break; case Select(Tree qualifier, Name name): - print(qualifier); - print(TXT_DOT); + if (Global.instance.debug || qualifier.symbol() == null || !qualifier.symbol().isRoot()) { + print(qualifier); + print(TXT_DOT); + } printSymbolUse(tree.symbol(), name); printType(tree); break; |