File tree Expand file tree Collapse file tree 5 files changed +9
-14
lines changed
compiler/src/dotty/tools/dotc/quoted
library/src/scala/quoted/reflect/printers
tests/run-macros/tasty-custom-show Expand file tree Collapse file tree 5 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import dotty.tools.dotc.core.Decorators._
15
15
16
16
import scala .quoted .QuoteContext
17
17
import scala .quoted .show .SyntaxHighlight
18
+ import scala .quoted .reflect .printers .{ExtractorsPrinter , SourceCodePrinter }
18
19
19
20
import scala .internal .quoted .PickledQuote
20
21
import scala .tasty .reflect ._
Original file line number Diff line number Diff line change 1
- package scala .tasty
2
- package reflect
3
-
4
- import scala .quoted ._
1
+ package scala .quoted
2
+ package reflect .printers
5
3
6
4
class ExtractorsPrinter extends Printer {
7
5
Original file line number Diff line number Diff line change 1
- package scala .tasty
2
- package reflect
3
-
4
- import scala .quoted ._
1
+ package scala .quoted
2
+ package reflect .printers
5
3
6
4
trait Printer {
7
5
/** Show a String representation of a reflect.Tree */
Original file line number Diff line number Diff line change 1
- package scala .tasty
2
- package reflect
1
+ package scala .quoted
2
+ package reflect . printers
3
3
4
4
import scala .annotation .switch
5
5
import scala .quoted .show .SyntaxHighlight
6
6
7
- import scala .quoted ._
8
-
9
7
/** Printer for fully elaborated representation of the source code */
10
8
class SourceCodePrinter (syntaxHighlight : SyntaxHighlight ) extends Printer {
11
9
import syntaxHighlight ._
Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ object Macros {
37
37
' {print($ {Expr (buff.result())})}
38
38
}
39
39
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 {
42
42
def showTree (using qctx : QuoteContext )(tree : qctx.reflect.Tree ): String = " Tree"
43
43
def showType (using qctx : QuoteContext )(tpe : qctx.reflect.TypeRepr ): String = " TypeRepr"
44
44
def showConstant (using qctx : QuoteContext )(const : qctx.reflect.Constant ): String = " Constant"
You can’t perform that action at this time.
0 commit comments