@@ -23,12 +23,12 @@ import dotty.tools.dotc.classpath.FileUtils.hasTastyExtension
23
23
object TastyPrinter :
24
24
25
25
def showContents (bytes : Array [Byte ], noColor : Boolean ): String =
26
- showContents(bytes, noColor, testPickler = false , isBestEffortTasty = false )
26
+ showContents(bytes, noColor, isBestEffortTasty = false , testPickler = false )
27
27
28
- def showContents (bytes : Array [Byte ], noColor : Boolean , testPickler : Boolean = false , isBestEffortTasty : Boolean = false ): String =
28
+ def showContents (bytes : Array [Byte ], noColor : Boolean , isBestEffortTasty : Boolean , testPickler : Boolean = false ): String =
29
29
val printer =
30
- if noColor then new TastyPrinter (bytes, testPickler)
31
- else new TastyAnsiiPrinter (bytes, testPickler)
30
+ if noColor then new TastyPrinter (bytes, isBestEffortTasty, testPickler)
31
+ else new TastyAnsiiPrinter (bytes, isBestEffortTasty, testPickler)
32
32
printer.showContents()
33
33
34
34
def main (args : Array [String ]): Unit = {
@@ -43,7 +43,7 @@ object TastyPrinter:
43
43
println(line)
44
44
println(fileName)
45
45
println(line)
46
- println(showContents(bytes, noColor, isBestEffortTasty))
46
+ println(showContents(bytes, noColor, isBestEffortTasty, testPickler = false ))
47
47
println()
48
48
printLastLine = true
49
49
for arg <- args do
@@ -71,9 +71,9 @@ object TastyPrinter:
71
71
println(line)
72
72
}
73
73
74
- class TastyPrinter (bytes : Array [Byte ], val testPickler : Boolean , isBestEffortTasty : Boolean = false ) {
74
+ class TastyPrinter (bytes : Array [Byte ], isBestEffortTasty : Boolean , val testPickler : Boolean ) {
75
75
76
- def this (bytes : Array [Byte ]) = this (bytes, testPickler = false , isBestEffortTasty = false )
76
+ def this (bytes : Array [Byte ]) = this (bytes, isBestEffortTasty = false , testPickler = false )
77
77
78
78
class TastyPrinterUnpickler extends TastyUnpickler (bytes, isBestEffortTasty) {
79
79
var namesStart : Addr = uninitialized
@@ -133,7 +133,7 @@ class TastyPrinter(bytes: Array[Byte], val testPickler: Boolean, isBestEffortTas
133
133
})
134
134
135
135
class TreeSectionUnpickler (sb : StringBuilder ) extends PrinterSectionUnpickler [Unit ](ASTsSection ) {
136
- import dotty .tools .tasty .TastyFormat . *
136
+ import dotty .tools .tasty .besteffort . BestEffortTastyFormat . * // superset on TastyFormat
137
137
def unpickle0 (reader : TastyReader )(using refs : NameRefs ): Unit = {
138
138
import reader .*
139
139
var indent = 0
0 commit comments