Skip to content

Commit 2956e33

Browse files
committed
Move printers to scala.quoted.reflect.printers
1 parent 3a68a66 commit 2956e33

File tree

5 files changed

+9
-14
lines changed

5 files changed

+9
-14
lines changed

compiler/src/dotty/tools/dotc/quoted/QuoteContextImpl.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import dotty.tools.dotc.core.Decorators._
1515

1616
import scala.quoted.QuoteContext
1717
import scala.quoted.show.SyntaxHighlight
18+
import scala.quoted.reflect.printers.{ExtractorsPrinter, SourceCodePrinter}
1819

1920
import scala.internal.quoted.PickledQuote
2021
import scala.tasty.reflect._

library/src/scala/tasty/reflect/ExtractorsPrinter.scala renamed to library/src/scala/quoted/reflect/printers/ExtractorsPrinter.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
package scala.tasty
2-
package reflect
3-
4-
import scala.quoted._
1+
package scala.quoted
2+
package reflect.printers
53

64
class ExtractorsPrinter extends Printer {
75

library/src/scala/tasty/reflect/Printer.scala renamed to library/src/scala/quoted/reflect/printers/Printer.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
package scala.tasty
2-
package reflect
3-
4-
import scala.quoted._
1+
package scala.quoted
2+
package reflect.printers
53

64
trait Printer {
75
/** Show a String representation of a reflect.Tree */

library/src/scala/tasty/reflect/SourceCodePrinter.scala renamed to library/src/scala/quoted/reflect/printers/SourceCodePrinter.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
package scala.tasty
2-
package reflect
1+
package scala.quoted
2+
package reflect.printers
33

44
import scala.annotation.switch
55
import scala.quoted.show.SyntaxHighlight
66

7-
import scala.quoted._
8-
97
/** Printer for fully elaborated representation of the source code */
108
class SourceCodePrinter(syntaxHighlight: SyntaxHighlight) extends Printer {
119
import syntaxHighlight._

tests/run-macros/tasty-custom-show/quoted_1.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ object Macros {
3737
'{print(${Expr(buff.result())})}
3838
}
3939

40-
def dummyShow: scala.tasty.reflect.Printer = {
41-
new scala.tasty.reflect.Printer {
40+
def dummyShow: scala.quoted.reflect.printers.Printer = {
41+
new scala.quoted.reflect.printers.Printer {
4242
def showTree(using qctx: QuoteContext)(tree: qctx.reflect.Tree): String = "Tree"
4343
def showType(using qctx: QuoteContext)(tpe: qctx.reflect.TypeRepr): String = "TypeRepr"
4444
def showConstant(using qctx: QuoteContext)(const: qctx.reflect.Constant): String = "Constant"

0 commit comments

Comments
 (0)