From aa559359bb55729913d34588462542f10c42e147 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Wed, 21 Sep 2016 10:09:13 +0200 Subject: Refactor explanation interpolator --- src/dotty/tools/dotc/printing/SyntaxHighlighting.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/printing/SyntaxHighlighting.scala') diff --git a/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala b/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala index 80170dcad..7d4d12394 100644 --- a/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala +++ b/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala @@ -278,7 +278,7 @@ object SyntaxHighlighting { val toAdd = if (shouldHL(str)) highlight(str) - else if (lastToken == "val" || lastToken == "def" || lastToken == "case") + else if (("var" :: "val" :: "def" :: "case" :: Nil).contains(lastToken)) valDef(str) else str val suffix = if (delim(curr)) s"$curr" else "" -- cgit v1.2.3