diff options
author | Paul Phillips <paulp@improving.org> | 2009-03-06 14:52:22 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-03-06 14:52:22 +0000 |
commit | 2ef54cbddbb74254d996a9b35290e20d687e3546 (patch) | |
tree | 4fc0eb78914084b8842d8efa4bc532cd259c1bcc | |
parent | 0bd2114450d971a562be4ba6893e7f2b492b061c (diff) | |
download | scala-2ef54cbddbb74254d996a9b35290e20d687e3546.tar.gz scala-2ef54cbddbb74254d996a9b35290e20d687e3546.tar.bz2 scala-2ef54cbddbb74254d996a9b35290e20d687e3546.zip |
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.
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 4 | ||||
-rw-r--r-- | test/files/neg/xmltruncated6.check | 2 |
2 files changed, 3 insertions, 3 deletions
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() diff --git a/test/files/neg/xmltruncated6.check b/test/files/neg/xmltruncated6.check index f638f2f090..6123114560 100644 --- a/test/files/neg/xmltruncated6.check +++ b/test/files/neg/xmltruncated6.check @@ -1,4 +1,4 @@ -xmltruncated6.scala:2: error: in XML literal: expected end of Scala block +xmltruncated6.scala:2: error: ';' expected but eof found. val stuff = <a>{ "no closing brace" ^ one error found |