@@ -24,48 +24,58 @@ trait Printers
2424 implicit class TreeShowDeco (tree : Tree ) {
2525 /** Shows the tree as extractors */
2626 def showExtractors (implicit ctx : Context ): String = new ExtractorsPrinter ().showTree(tree)
27- /** Shows the tree as source code */
28- def showCode (implicit ctx : Context ): String = new SourceCodePrinter ().showTree(tree)
27+ /** Shows the tree as fully typed source code.
28+ * Will print Ansi colors if ctx.printColors is enabled.
29+ */
30+ def show (implicit ctx : Context ): String = new SourceCodePrinter ().showTree(tree)
2931 }
3032
3133 /** Adds `show` as an extension method of a `TypeOrBounds` */
3234 implicit class TypeOrBoundsShowDeco (tpe : TypeOrBounds ) {
3335 /** Shows the tree as extractors */
3436 def showExtractors (implicit ctx : Context ): String = new ExtractorsPrinter ().showTypeOrBounds(tpe)
35- /** Shows the tree as source code */
36- def showCode (implicit ctx : Context ): String = new SourceCodePrinter ().showTypeOrBounds(tpe)
37+ /** Shows the tree as fully typed source code.
38+ * Will print Ansi colors if ctx.printColors is enabled.
39+ */
40+ def show (implicit ctx : Context ): String = new SourceCodePrinter ().showTypeOrBounds(tpe)
3741 }
3842
3943 /** Adds `show` as an extension method of a `Pattern` */
4044 implicit class PatternShowDeco (pattern : Pattern ) {
4145 /** Shows the tree as extractors */
4246 def showExtractors (implicit ctx : Context ): String = new ExtractorsPrinter ().showPattern(pattern)
43- /** Shows the tree as source code */
44- def showCode (implicit ctx : Context ): String = new SourceCodePrinter ().showPattern(pattern)
47+ /** Shows the tree as fully typed source code.
48+ * Will print Ansi colors if ctx.printColors is enabled.
49+ */
50+ def show (implicit ctx : Context ): String = new SourceCodePrinter ().showPattern(pattern)
4551 }
4652
4753 /** Adds `show` as an extension method of a `Constant` */
4854 implicit class ConstantShowDeco (const : Constant ) {
4955 /** Shows the tree as extractors */
5056 def showExtractors (implicit ctx : Context ): String = new ExtractorsPrinter ().showConstant(const)
51- /** Shows the tree as source code */
52- def showCode (implicit ctx : Context ): String = new SourceCodePrinter ().showConstant(const)
57+ /** Shows the tree as fully typed source code.
58+ * Will print Ansi colors if ctx.printColors is enabled.
59+ */
60+ def show (implicit ctx : Context ): String = new SourceCodePrinter ().showConstant(const)
5361 }
5462
5563 /** Adds `show` as an extension method of a `Symbol` */
5664 implicit class SymbolShowDeco (symbol : Symbol ) {
5765 /** Shows the tree as extractors */
5866 def showExtractors (implicit ctx : Context ): String = new ExtractorsPrinter ().showSymbol(symbol)
59- /** Shows the tree as source code */
60- def showCode (implicit ctx : Context ): String = new SourceCodePrinter ().showSymbol(symbol)
67+ /** Shows the tree as fully typed source code */
68+ def show (implicit ctx : Context ): String = new SourceCodePrinter ().showSymbol(symbol)
6169 }
6270
6371 /** Adds `show` as an extension method of a `Flags` */
6472 implicit class FlagsShowDeco (flags : Flags ) {
6573 /** Shows the tree as extractors */
6674 def showExtractors (implicit ctx : Context ): String = new ExtractorsPrinter ().showFlags(flags)
67- /** Shows the tree as source code */
68- def showCode (implicit ctx : Context ): String = new SourceCodePrinter ().showFlags(flags)
75+ /** Shows the tree as fully typed source code.
76+ * Will print Ansi colors if ctx.printColors is enabled.
77+ */
78+ def show (implicit ctx : Context ): String = new SourceCodePrinter ().showFlags(flags)
6979 }
7080
7181 abstract class Printer {
0 commit comments