diff options
author | paltherr <paltherr@epfl.ch> | 2003-11-28 12:01:55 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-11-28 12:01:55 +0000 |
commit | 50f7a66ed081e6daeea3ee3a1883f61bca24cedd (patch) | |
tree | e08e2d4c1168f1f9fcf3b6236b2aa1e30cb3aa59 /sources/scalac | |
parent | 79c146cc2aa213f637158623705c2ee178dfa2ea (diff) | |
download | scala-50f7a66ed081e6daeea3ee3a1883f61bca24cedd.tar.gz scala-50f7a66ed081e6daeea3ee3a1883f61bca24cedd.tar.bz2 scala-50f7a66ed081e6daeea3ee3a1883f61bca24cedd.zip |
- Fixed for new Identifier def
Diffstat (limited to 'sources/scalac')
-rw-r--r-- | sources/scalac/ast/printer/HTMLTreePrinter.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sources/scalac/ast/printer/HTMLTreePrinter.java b/sources/scalac/ast/printer/HTMLTreePrinter.java index 8dbd34f2a0..034ae42fb9 100644 --- a/sources/scalac/ast/printer/HTMLTreePrinter.java +++ b/sources/scalac/ast/printer/HTMLTreePrinter.java @@ -11,6 +11,7 @@ package scalac.ast.printer; import scalac.Unit; import scalac.symtab.Symbol; +import scalac.util.Name; import java.io.OutputStream; import java.io.PrintWriter; @@ -145,16 +146,19 @@ public class HTMLTreePrinter extends TextTreePrinter { printString(str); endSpan(); break; - case Identifier(Symbol symbol, String name, SymbolUsage usage): + case Identifier(Symbol symbol, Name name, SymbolUsage usage): boolean defined = (usage == SymbolUsage.Definition); if (defined) startSpan("idDef"); if (symbol != null) { String attr = (defined ? "name" : "href"); startTag("a", attr, symbolAnchor(symbol, usage)); - } - printString(name); - if (symbol != null) + if (usage == SymbolUsage.Use) + printString(symbol.simpleName().toString()); + else + printString(symbol.name.toString()); endTag("a"); + } else + printString(name.toString()); if (defined) endSpan(); break; default: |