diff options
author | Martin Odersky <odersky@gmail.com> | 2013-03-07 10:57:58 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-03-07 10:57:58 +0100 |
commit | 0a6bddc34dbfc9a667c7d63c1dc4de6ae04d7343 (patch) | |
tree | c0d1086447b374bc426de5bde0deb0f96215a732 /src/dotty/tools/dotc/core/Names.scala | |
parent | 519942ae5bf4bc6b1ba8f6e4a52447ddb974dad1 (diff) | |
download | dotty-0a6bddc34dbfc9a667c7d63c1dc4de6ae04d7343.tar.gz dotty-0a6bddc34dbfc9a667c7d63c1dc4de6ae04d7343.tar.bz2 dotty-0a6bddc34dbfc9a667c7d63c1dc4de6ae04d7343.zip |
Some refinements for prining
Made trees printable in plain mode (refined mode still missing).
Diffstat (limited to 'src/dotty/tools/dotc/core/Names.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Names.scala | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/dotty/tools/dotc/core/Names.scala b/src/dotty/tools/dotc/core/Names.scala index 3b9a78dc5..8a345fcc8 100644 --- a/src/dotty/tools/dotc/core/Names.scala +++ b/src/dotty/tools/dotc/core/Names.scala @@ -4,6 +4,7 @@ package core import scala.io.Codec import util.NameTransformer import Decorators._ +import Contexts.Context import collection.IndexedSeqOptimized import collection.generic.CanBuildFrom import collection.mutable.{ Builder, StringBuilder } @@ -32,6 +33,7 @@ object Names { */ abstract class Name extends DotClass with PreName + with Showable with Seq[Char] with IndexedSeqOptimized[Char, Name] { @@ -80,14 +82,7 @@ object Names { override def toString = new String(chrs, start, length) - /** Show name with namespace suffix: /L for local names, - * /V for other term names, /T for type names - */ - def showDetailed: String = toString + { - (if (isLocalName) "/L" - else if (isTypeName) "/T" - else "/V") - } + def show(implicit ctx: Context): String = ctx.show(this) /** Write to UTF8 representation of this name to given character array. * Start copying to index `to`. Return index of next free byte in array. |