diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/src/dotty/tools/dotc/parsing/Parsers.scala | 2 | ||||
-rw-r--r-- | compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala index 3112be659..9f393df00 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala @@ -2151,7 +2151,7 @@ object Parsers { /** EnumCaseStats = EnumCaseStat {semi EnumCaseStat */ def enumCaseStats(): List[DefTree] = { val cases = new ListBuffer[DefTree] += enumCaseStat() - while (in.token != RBRACE) { + while (in.token != RBRACE && in.token != EOF) { acceptStatSep() cases += enumCaseStat() } diff --git a/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala b/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala index e20f846ac..87ce31ad9 100644 --- a/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala +++ b/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala @@ -31,7 +31,7 @@ object SyntaxHighlighting { private val tripleQs = Console.RED_B + "???" + NoColor private val keywords: Seq[String] = for { - index <- IF to INLINE // All alpha keywords + index <- IF to ENUM // All alpha keywords } yield tokenString(index) private val interpolationPrefixes = |