Reverted a small parser change which had the unfortunate side

effect of making it much harder to enter code into the interpreter.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@17252 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
extempore 2009-03-06 14:52:22 +00:00
parent cbb3467213
commit c30500e87a
2 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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