From e692e8a91e6d4c13fbb7d147127e360bdc48fd24 Mon Sep 17 00:00:00 2001 From: Ingar Abrahamsen Date: Wed, 2 May 2018 13:26:48 +0200 Subject: [PATCH] add delimiters to fix parsing of null keyword This fixes #4403 --- .../src/dotty/tools/dotc/printing/SyntaxHighlighting.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala b/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala index 902c7c14ef68..db8e30e4977e 100644 --- a/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala +++ b/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala @@ -5,9 +5,7 @@ package printing import parsing.Tokens._ import scala.annotation.switch import scala.collection.mutable.StringBuilder -import core.Contexts.Context import util.Chars -import Highlighting.{Highlight, HighlightBuffer} /** This object provides functions for syntax highlighting in the REPL */ object SyntaxHighlighting { @@ -280,9 +278,12 @@ object SyntaxHighlighting { case ' ' => true case '\n' => true case '(' => true + case ')' => true case '[' => true + case ']' => true case ':' => true case '@' => true + case ',' => true case '.' => true case _ => false }