mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-27 01:25:21 +02:00
fixes #431 :: apply DMDFE 1.062; thanks SiegeLord
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user