Skip to content

Commit d0d6455

Browse files
committed
Support printing of Quote trees
1 parent 3e0a60d commit d0d6455

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,8 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
597597
changePrec(GlobalPrec) {
598598
keywordStr("try ") ~ toText(expr) ~ " " ~ keywordStr("catch") ~ " {" ~ toText(handler) ~ "}" ~ optText(finalizer)(keywordStr(" finally ") ~ _)
599599
}
600+
case Quote(tree) =>
601+
if (tree.isType) "'[" ~ toTextGlobal(tree) ~ "]" else "'(" ~ toTextGlobal(tree) ~ ")"
600602
case Thicket(trees) =>
601603
"Thicket {" ~~ toTextGlobal(trees, "\n") ~~ "}"
602604
case _ =>

0 commit comments

Comments
 (0)