mirror of
https://github.com/cc65/cc65.git
synced 2024-12-26 08:32:00 +00:00
Fixed endlessly repeated error messages when a declaration lacks a required identifier.
This commit is contained in:
parent
9b39c3f949
commit
aa5d44b2b0
@ -1831,7 +1831,13 @@ static void Declarator (const DeclSpec* Spec, Declaration* D, declmode_t Mode)
|
||||
NextToken ();
|
||||
} else {
|
||||
if (Mode == DM_NEED_IDENT) {
|
||||
/* Some fix point tokens that are used for error recovery */
|
||||
static const token_t TokenList[] = { TOK_COMMA, TOK_SEMI };
|
||||
|
||||
Error ("Identifier expected");
|
||||
|
||||
/* Try some smart error recovery */
|
||||
SkipTokens (TokenList, sizeof(TokenList) / sizeof(TokenList[0]));
|
||||
}
|
||||
D->Ident[0] = '\0';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user