aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/src/dotty/tools/dotc/parsing/Parsers.scala2
-rw-r--r--compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala2
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 3112be6..9f393df 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 e20f846..87ce31a 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 =