summaryrefslogtreecommitdiff
path: root/src/library/scala/reflect/api/TreePrinters.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala/reflect/api/TreePrinters.scala')
-rw-r--r--src/library/scala/reflect/api/TreePrinters.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/library/scala/reflect/api/TreePrinters.scala b/src/library/scala/reflect/api/TreePrinters.scala
index 43865915d3..3d64ec8e40 100644
--- a/src/library/scala/reflect/api/TreePrinters.scala
+++ b/src/library/scala/reflect/api/TreePrinters.scala
@@ -29,17 +29,21 @@ trait TreePrinters { self: Universe =>
def newTreePrinter(out: PrintWriter): TreePrinter
// emits more or less verbatim representation of the provided tree
- // todo. when LiftCode becomes a macro, throw this code away and use that macro
class RawTreePrinter(out: PrintWriter) extends TreePrinter {
+ val EmptyValDef = self.emptyValDef
def print(args: Any*): Unit = args foreach {
case EmptyTree =>
print("EmptyTree")
+ case EmptyValDef =>
+ print("emptyValDef")
case tree @ TypeTree() =>
print("TypeTree()")
if (tree.tpe != null)
print(".setType(", tree.tpe, ")")
else if (tree.original != null)
print(".setOriginal(", tree.original, ")")
+ case Literal(Constant(s: String)) =>
+ print("Literal(Constant(\"" + s + "\"))")
case tree: Tree =>
print(tree.printingPrefix+"(")
val it = tree.productIterator