diff options
author | Martin Odersky <odersky@gmail.com> | 2013-01-24 15:20:28 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-01-24 15:21:16 +0100 |
commit | 8621d34646e15b14ffd7ac2a7a8ca6eb587b1426 (patch) | |
tree | 454706fcc58e239ede1dcdb7c67d8bfe8ccc2169 /src/dotty/tools/dotc/core/Printers.scala | |
parent | 6ed74c3a2f38aadfb0bf2110cae00309b9050708 (diff) | |
download | dotty-8621d34646e15b14ffd7ac2a7a8ca6eb587b1426.tar.gz dotty-8621d34646e15b14ffd7ac2a7a8ca6eb587b1426.tar.bz2 dotty-8621d34646e15b14ffd7ac2a7a8ca6eb587b1426.zip |
Various additions to symbols, denotations, and elsewhere
Diffstat (limited to 'src/dotty/tools/dotc/core/Printers.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Printers.scala | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Printers.scala b/src/dotty/tools/dotc/core/Printers.scala new file mode 100644 index 000000000..67d4d3422 --- /dev/null +++ b/src/dotty/tools/dotc/core/Printers.scala @@ -0,0 +1,26 @@ +package dotty.tools.dotc +package core + +import Types._, Symbols._, Contexts._, Scopes._ + +object Printers { + + abstract class Printer { + def show(tp: Type)(implicit ctx: Context): String + def show(sym: Symbol)(implicit ctx: Context): String + def showLocated(sym: Symbol)(implicit ctx: Context): String + def showDef(sym: Symbol)(implicit ctx: Context): String + def show(sc: Scope)(implicit ctx: Context): String + } + + class StdPrinter extends Printer { + def show(tp: Type)(implicit ctx: Context): String = ??? + def show(sym: Symbol)(implicit ctx: Context): String = ??? + def showLocated(sym: Symbol)(implicit ctx: Context): String = ??? + def showDef(sym: Symbol)(implicit ctx: Context): String = ??? + def show(sc: Scope)(implicit ctx: Context): String = + sc.toList.map(_.showDef).mkString("Scope{\n ", ";\n ", "\n}") + } + + +}
\ No newline at end of file |