1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-23 04:30:10 +00:00

Improved error handling and diagnostics with failed macro definitions.

This commit is contained in:
acqn 2022-08-22 14:31:51 +08:00
parent 8605393953
commit fd7f32ecd3

View File

@ -1004,6 +1004,7 @@ static void DoDefine (void)
if (CurC != '.' || NextC != '.') {
PPError ("'...' expected");
ClearLine ();
FreeMacro (M);
return;
}
NextChar ();
@ -1043,8 +1044,9 @@ static void DoDefine (void)
/* Check for a right paren and eat it if we find one */
if (CurC != ')') {
PPError ("')' expected");
PPError ("')' expected for macro definition");
ClearLine ();
FreeMacro (M);
return;
}
NextChar ();