Skip to content

Commit 9c73b0b

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 ffdc530 commit 9c73b0b

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
@@ -17,7 +17,7 @@ import java.util.Arrays
1717
object SyntaxHighlighting {
1818

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

2222
// Keep in sync with SyntaxHighlightingTests
2323
val NoColor = Console.RESET
@@ -85,11 +85,11 @@ object SyntaxHighlighting {
8585
highlightPosition(annotation.pos, AnnotationColor)
8686
val color = if (tree.isInstanceOf[ValOrDefDef]) ValDefColor else TypeColor
8787
highlightPosition(tree.namePos, color)
88-
case tree : Ident if tree.isType =>
88+
case tree: Ident if tree.isType =>
8989
highlightPosition(tree.pos, TypeColor)
90-
case _ : TypTree =>
90+
case _: TypTree =>
9191
highlightPosition(tree.pos, TypeColor)
92-
case _ : Literal =>
92+
case _: Literal =>
9393
highlightPosition(tree.pos, LiteralColor)
9494
case _ =>
9595
}

0 commit comments

Comments
 (0)