aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Symbols.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-03-20 17:39:32 +0100
committerMartin Odersky <odersky@gmail.com>2013-03-20 17:39:32 +0100
commit5ac2104e688409e24785cfe62cdc7e8ef0bc6428 (patch)
tree0d48205fa5b50c25e240d77d4fb0e26c4b6c9b36 /src/dotty/tools/dotc/core/Symbols.scala
parent53e0a8a9227820e47e33f1e0b1d91819aec917c4 (diff)
downloaddotty-5ac2104e688409e24785cfe62cdc7e8ef0bc6428.tar.gz
dotty-5ac2104e688409e24785cfe62cdc7e8ef0bc6428.tar.bz2
dotty-5ac2104e688409e24785cfe62cdc7e8ef0bc6428.zip
Pretty-printing improvements.
Diffstat (limited to 'src/dotty/tools/dotc/core/Symbols.scala')
-rw-r--r--src/dotty/tools/dotc/core/Symbols.scala15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index 089d41be7..d39dabe1d 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -10,7 +10,7 @@ import java.lang.AssertionError
import Decorators._
import Symbols._
import Contexts._
-import SymDenotations._
+import SymDenotations._, util.Texts._
import Types._, Annotations._, Positions._, StdNames._, Trees._
import Denotations.{ Denotation, SingleDenotation, MultiDenotation }
import collection.mutable
@@ -376,12 +376,13 @@ object Symbols {
if (lastDenot == null) s"Naked$prefixString#$id"
else lastDenot.toString
- def show(implicit ctx: Context): String = ctx.show(this)
- def showLocated(implicit ctx: Context): String = ctx.showLocated(this)
- def showDcl(implicit ctx: Context): String = ctx.showDcl(this)
- def showKind(implicit ctx: Context): String = ctx.showKind(this)
- def showName(implicit ctx: Context): String = ctx.showName(this)
- def showFullName(implicit ctx: Context): String = ctx.showFullName(this)
+ def toText(implicit ctx: Context): Text = ctx.toText(this)
+
+ def showLocated(implicit ctx: Context): String = ctx.locatedText(this).show
+ def showDcl(implicit ctx: Context): Text = ctx.dclText(this).show
+ def showKind(implicit ctx: Context): String = ctx.kindString(this)
+ def showName(implicit ctx: Context): String = ctx.nameString(this)
+ def showFullName(implicit ctx: Context): String = ctx.fullNameString(this)
}
type TermSymbol = Symbol { type ThisName = TermName }