diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2004-11-22 10:02:03 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2004-11-22 10:02:03 +0000 |
commit | d8e3e31836bba7c14d57aaaff08dfdcc1420968b (patch) | |
tree | 0623e6eb4317caf27e50ff1df995f5c1f4fa801f /sources | |
parent | 0610ba492fae05dbc85bc9e007b3a3bc986ef7d8 (diff) | |
download | scala-d8e3e31836bba7c14d57aaaff08dfdcc1420968b.tar.gz scala-d8e3e31836bba7c14d57aaaff08dfdcc1420968b.tar.bz2 scala-d8e3e31836bba7c14d57aaaff08dfdcc1420968b.zip |
*** empty log message ***
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/tools/scalac/ast/printer/SwingPrinter.scala | 1 | ||||
-rw-r--r-- | sources/scala/tools/scalac/ast/printer/TreeInfo.scala | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/sources/scala/tools/scalac/ast/printer/SwingPrinter.scala b/sources/scala/tools/scalac/ast/printer/SwingPrinter.scala index 2f970d9f1f..2b34b9e487 100644 --- a/sources/scala/tools/scalac/ast/printer/SwingPrinter.scala +++ b/sources/scala/tools/scalac/ast/printer/SwingPrinter.scala @@ -253,6 +253,7 @@ class InfoPanel extends JPanel() { symLabel.setText(TreeInfo.symbolText(t)); stypeLabel.setText(TreeInfo.symbolTypeText(t)); + attLabel.setText(TreeInfo.symbolAttributes(t)); ttypeLabel.setText(t.`type`().toString()); } else reset; diff --git a/sources/scala/tools/scalac/ast/printer/TreeInfo.scala b/sources/scala/tools/scalac/ast/printer/TreeInfo.scala index 0f4dd4a040..6d233df557 100644 --- a/sources/scala/tools/scalac/ast/printer/TreeInfo.scala +++ b/sources/scala/tools/scalac/ast/printer/TreeInfo.scala @@ -347,6 +347,27 @@ object TreeInfo { else ""; } + + /** Return a textual representation of (some of) the symbol's + * attributes */ + def symbolAttributes(t: Tree): String = { + val s = t.symbol(); + var att = ""; + + if (s != null) { + if (s.isType()) + att = att + "type "; + if (s.isFinal()) + att = att + "final "; + if (s.isSynthetic()) + att = att + "synth "; + if (s.isExternal()) + att = att + "external "; + + att + } + else ""; + } } } // package |