From 2ef54cbddbb74254d996a9b35290e20d687e3546 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Fri, 6 Mar 2009 14:52:22 +0000 Subject: Reverted a small parser change which had the un... Reverted a small parser change which had the unfortunate side effect of making it much harder to enter code into the interpreter. --- src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index d992989879..35627c1c13 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -2515,10 +2515,10 @@ trait Parsers extends NewScanners with MarkupParsers { acceptStatSep() } else if (isExprIntro) { stats += statement(InBlock) - if (inToken != RBRACE && inToken != CASE && inToken != EOF) acceptStatSep() + if (inToken != RBRACE && inToken != CASE) acceptStatSep() } else if (isDefIntro || isLocalModifier || in.token == AT) { stats ++= localDef - if (inToken == RBRACE || inToken == CASE || inToken == EOF) { + if (inToken == RBRACE || inToken == CASE) { syntaxError("block must end in result expression, not in definition", false) stats += Literal(()).setPos(inCurrentPos) } else acceptStatSep() -- cgit v1.2.3