mirror of
https://github.com/cc65/cc65.git
synced 2025-01-14 00:32:08 +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 ();
|
NextToken ();
|
||||||
} else {
|
} else {
|
||||||
if (Mode == DM_NEED_IDENT) {
|
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");
|
Error ("Identifier expected");
|
||||||
|
|
||||||
|
/* Try some smart error recovery */
|
||||||
|
SkipTokens (TokenList, sizeof(TokenList) / sizeof(TokenList[0]));
|
||||||
}
|
}
|
||||||
D->Ident[0] = '\0';
|
D->Ident[0] = '\0';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user