fixes #431 :: apply DMDFE 1.062; thanks SiegeLord

This commit is contained in:
Moritz Warning
2010-09-27 00:06:28 +02:00
parent b032e3d1f7
commit c4e255206a
35 changed files with 918 additions and 335 deletions

View File

@@ -2652,6 +2652,7 @@ Initializer *Parser::parseInitializer()
{ t = peek(t);
if (t->value != TOKsemicolon &&
t->value != TOKcomma &&
t->value != TOKrbracket &&
t->value != TOKrcurly)
goto Lexpression;
break;
@@ -2976,7 +2977,7 @@ Statement *Parser::parseStatement(int flags)
s = new CompoundStatement(loc, statements);
if (flags & (PSscope | PScurlyscope))
s = new ScopeStatement(loc, s);
nextToken();
check(TOKrcurly, "compound statement");
break;
}
@@ -3638,7 +3639,7 @@ void Parser::check(Loc loc, enum TOK value)
void Parser::check(enum TOK value, const char *string)
{
if (token.value != value)
error("found '%s' when expecting '%s' following '%s'",
error("found '%s' when expecting '%s' following %s",
token.toChars(), Token::toChars(value), string);
nextToken();
}