Skip to content

Commit 0921b19

Browse files
committed
Let's turn on debug mode by default
If we ignore trees named <error> and <init>, it is not so fragile after all...
1 parent 183ce6e commit 0921b19

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import dotty.tools.dotc.util.SourceFile
1515
object SyntaxHighlighting {
1616

1717
/** if true, log erroneous positions being highlighted */
18-
private final val debug = false
18+
private final val debug = true
1919

2020
// Keep in sync with SyntaxHighlightingTests
2121
val NoColor = Console.RESET
@@ -84,11 +84,11 @@ object SyntaxHighlighting {
8484
highlightPosition(annotation.pos, AnnotationColor)
8585
val color = if (tree.isInstanceOf[ValOrDefDef]) ValDefColor else TypeColor
8686
highlightPosition(tree.namePos, color)
87-
case tree : Ident if tree.isType =>
87+
case tree: Ident if tree.isType =>
8888
highlightPosition(tree.pos, TypeColor)
89-
case _ : TypTree =>
89+
case _: TypTree =>
9090
highlightPosition(tree.pos, TypeColor)
91-
case _ : Literal =>
91+
case _: Literal =>
9292
highlightPosition(tree.pos, LiteralColor)
9393
case _ =>
9494
}

0 commit comments

Comments
 (0)