Skip to content

Commit

Permalink
Unrainbow syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmulder committed Oct 10, 2016
1 parent 88e4146 commit 8743fa8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dotty/tools/dotc/printing/SyntaxHighlighting.scala
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ object SyntaxHighlighting {
if (n.isUpper && keywordStart) {
appendWhile(n, !typeEnders.contains(_), typeDef)
} else if (keywordStart) {
append(n, keywords.contains(_), keyword)
append(n, keywords.contains(_), { kw =>
if (kw == "new") typeDef(kw) else keyword(kw)
})
} else {
newBuf += n
prev = n
Expand Down

0 comments on commit 8743fa8

Please sign in to comment.