File tree 1 file changed +1
-19
lines changed
compiler/src/dotty/tools/dotc/quoted 1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change 1
1
package dotty .tools .dotc .quoted
2
2
3
3
import dotty .tools .dotc .ast .tpd
4
- import dotty .tools .dotc .core .Contexts .Context
5
- import dotty .tools .dotc .core .Constants ._
6
- import dotty .tools .dotc .core .quoted .PickledQuotes
7
- import dotty .tools .dotc .printing .RefinedPrinter
8
4
9
5
import scala .quoted .Expr
10
- import scala .runtime .BoxedUnit
11
6
import scala .quoted .Exprs .{LiftedExpr , TastyTreeExpr }
12
7
import scala .runtime .quoted ._
13
8
@@ -32,20 +27,7 @@ object Toolbox {
32
27
new QuoteDriver ().run(expr, runSettings)
33
28
}
34
29
35
- def show (expr : Expr [T ]): String = expr match {
36
- case expr : LiftedExpr [T ] =>
37
- expr.value match {
38
- case value : Class [_] => s " classOf[ ${value.getCanonicalName}] "
39
- case value if value == BoxedUnit .UNIT => " ()"
40
- case value =>
41
- implicit val ctx = new QuoteDriver ().initCtx
42
- if (showSettings.compilerArgs.contains(" -color:never" ))
43
- ctx.settings.color.update(" never" )
44
- val printer = new RefinedPrinter (ctx)
45
- printer.toText(Literal (Constant (value))).mkString(Int .MaxValue , false )
46
- }
47
- case _ => new QuoteDriver ().show(expr, showSettings)
48
- }
30
+ def show (expr : Expr [T ]): String = new QuoteDriver ().show(expr, showSettings)
49
31
50
32
}
51
33
You can’t perform that action at this time.
0 commit comments