mirror of
https://github.com/cc65/cc65.git
synced 2025-01-21 00:31:53 +00:00
Improved error messages about missing identifiers.
This commit is contained in:
parent
dd833125a8
commit
b0ef3572ea
@ -1452,7 +1452,7 @@ static void ParseTypeSpec (DeclSpec* D, typespec_t TSFlags, int* SignednessSpeci
|
|||||||
NextToken ();
|
NextToken ();
|
||||||
} else {
|
} else {
|
||||||
if (CurTok.Tok != TOK_LCURLY) {
|
if (CurTok.Tok != TOK_LCURLY) {
|
||||||
Error ("Identifier expected");
|
Error ("Identifier expected for enum tag name");
|
||||||
}
|
}
|
||||||
AnonName (Ident, "enum");
|
AnonName (Ident, "enum");
|
||||||
}
|
}
|
||||||
@ -1573,7 +1573,7 @@ static void ParseOldStyleParamList (FuncDesc* F)
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* Not a parameter name */
|
/* Not a parameter name */
|
||||||
Error ("Identifier expected");
|
Error ("Identifier expected for parameter name");
|
||||||
|
|
||||||
/* Try some smart error recovery */
|
/* Try some smart error recovery */
|
||||||
SkipTokens (TokenList, sizeof(TokenList) / sizeof(TokenList[0]));
|
SkipTokens (TokenList, sizeof(TokenList) / sizeof(TokenList[0]));
|
||||||
|
@ -1439,7 +1439,7 @@ static void StructRef (ExprDesc* Expr)
|
|||||||
/* Skip the token and check for an identifier */
|
/* Skip the token and check for an identifier */
|
||||||
NextToken ();
|
NextToken ();
|
||||||
if (CurTok.Tok != TOK_IDENT) {
|
if (CurTok.Tok != TOK_IDENT) {
|
||||||
Error ("Identifier expected");
|
Error ("Identifier expected for %s member", GetBasicTypeName (Expr->Type));
|
||||||
/* Make the expression an integer at address zero */
|
/* Make the expression an integer at address zero */
|
||||||
ED_MakeConstAbs (Expr, 0, type_int);
|
ED_MakeConstAbs (Expr, 0, type_int);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user