@@ -14,7 +14,7 @@ import dotty.tools.dotc.quoted.QuoteUtils._
1414import dotty .tools .dotc .core .Decorators ._
1515
1616import scala .quoted .QuoteContext
17- import scala .quoted .reflect .printers .{ExtractorsPrinter , SourceCodePrinter , SyntaxHighlight }
17+ import scala .quoted .reflect .printers .{Extractors , SourceCode , SyntaxHighlight }
1818
1919import scala .internal .quoted .PickledQuote
2020import scala .tasty .reflect ._
@@ -65,11 +65,11 @@ class QuoteContextImpl private (ctx: Context) extends QuoteContext:
6565 def pos : Position = self.sourcePos
6666 def symbol : Symbol = self.symbol
6767 def showExtractors : String =
68- new ExtractorsPrinter () .showTree(using QuoteContextImpl .this )(self)
68+ Extractors .showTree(using QuoteContextImpl .this )(self)
6969 def show : String =
7070 self.showWith(SyntaxHighlight .plain)
7171 def showWith (syntaxHighlight : SyntaxHighlight ): String =
72- new SourceCodePrinter (syntaxHighlight) .showTree(using QuoteContextImpl .this )(self)
72+ SourceCode .showTree(using QuoteContextImpl .this )(self)(syntaxHighlight )
7373 def isExpr : Boolean =
7474 self match
7575 case TermTypeTest (self) =>
@@ -1589,13 +1589,13 @@ class QuoteContextImpl private (ctx: Context) extends QuoteContext:
15891589 object TypeMethodsImpl extends TypeMethods :
15901590 extension (self : TypeRepr ):
15911591 def showExtractors : String =
1592- new ExtractorsPrinter () .showType(using QuoteContextImpl .this )(self)
1592+ Extractors .showType(using QuoteContextImpl .this )(self)
15931593
15941594 def show : String =
15951595 self.showWith(SyntaxHighlight .plain)
15961596
15971597 def showWith (syntaxHighlight : SyntaxHighlight ): String =
1598- new SourceCodePrinter (syntaxHighlight) .showType(using QuoteContextImpl .this )(self)
1598+ SourceCode .showType(using QuoteContextImpl .this )(self)(syntaxHighlight )
15991599
16001600 def seal : scala.quoted.Type [_] =
16011601 new scala.internal.quoted.Type (Inferred (self), QuoteContextImpl .this .hashCode)
@@ -2172,11 +2172,11 @@ class QuoteContextImpl private (ctx: Context) extends QuoteContext:
21722172 extension (self : Constant ):
21732173 def value : Any = self.value
21742174 def showExtractors : String =
2175- new ExtractorsPrinter () .showConstant(using QuoteContextImpl .this )(self)
2175+ Extractors .showConstant(using QuoteContextImpl .this )(self)
21762176 def show : String =
21772177 self.showWith(SyntaxHighlight .plain)
21782178 def showWith (syntaxHighlight : SyntaxHighlight ): String =
2179- new SourceCodePrinter (syntaxHighlight) .showConstant(using QuoteContextImpl .this )(self)
2179+ SourceCode .showConstant(using QuoteContextImpl .this )(self)(syntaxHighlight )
21802180 end extension
21812181 end ConstantMethodsImpl
21822182
@@ -2395,11 +2395,11 @@ class QuoteContextImpl private (ctx: Context) extends QuoteContext:
23952395 def children : List [Symbol ] = self.denot.children
23962396
23972397 def showExtractors : String =
2398- new ExtractorsPrinter () .showSymbol(using QuoteContextImpl .this )(self)
2398+ Extractors .showSymbol(using QuoteContextImpl .this )(self)
23992399 def show : String =
24002400 self.showWith(SyntaxHighlight .plain)
24012401 def showWith (syntaxHighlight : SyntaxHighlight ): String =
2402- new SourceCodePrinter (syntaxHighlight) .showSymbol(using QuoteContextImpl .this )(self)
2402+ SourceCode .showSymbol(using QuoteContextImpl .this )(self)(syntaxHighlight )
24032403
24042404 end extension
24052405
@@ -2531,11 +2531,11 @@ class QuoteContextImpl private (ctx: Context) extends QuoteContext:
25312531 def | (that : Flags ): Flags = dotc.core.Flags .extension_|(self)(that)
25322532 def & (that : Flags ): Flags = dotc.core.Flags .extension_&(self)(that)
25332533 def showExtractors : String =
2534- new ExtractorsPrinter () .showFlags(using QuoteContextImpl .this )(self)
2534+ Extractors .showFlags(using QuoteContextImpl .this )(self)
25352535 def show : String =
25362536 self.showWith(SyntaxHighlight .plain)
25372537 def showWith (syntaxHighlight : SyntaxHighlight ): String =
2538- new SourceCodePrinter (syntaxHighlight) .showFlags(using QuoteContextImpl .this )(self)
2538+ SourceCode .showFlags(using QuoteContextImpl .this )(self)(syntaxHighlight )
25392539 end extension
25402540 end FlagsMethodsImpl
25412541
0 commit comments