__emit: Change the format of errors related to invalid use of the '-' sign
Example: L1: __emit const.pri -L1; Before: error 001: expected token: "-any value-", but found "-L1" After: error 001: expected token: "-any value-", but found "-(-label-)"
This commit is contained in:
parent
4b490e8ec2
commit
40dace770f
@ -6078,8 +6078,10 @@ fetchtok:
|
|||||||
} /* if */
|
} /* if */
|
||||||
if (sym->ident==iLABEL) {
|
if (sym->ident==iLABEL) {
|
||||||
sym->usage|=uREAD;
|
sym->usage|=uREAD;
|
||||||
if (negate)
|
if (negate) {
|
||||||
|
tok=tLABEL;
|
||||||
goto invalid_token_neg;
|
goto invalid_token_neg;
|
||||||
|
} /* if */
|
||||||
if (!allow_nonint) {
|
if (!allow_nonint) {
|
||||||
tok=tLABEL;
|
tok=tLABEL;
|
||||||
goto invalid_token;
|
goto invalid_token;
|
||||||
@ -6089,8 +6091,10 @@ fetchtok:
|
|||||||
} else if (sym->ident==iFUNCTN || sym->ident==iREFFUNC) {
|
} else if (sym->ident==iFUNCTN || sym->ident==iREFFUNC) {
|
||||||
const int ntvref=sym->usage & uREAD;
|
const int ntvref=sym->usage & uREAD;
|
||||||
markusage(sym,uREAD);
|
markusage(sym,uREAD);
|
||||||
if (negate)
|
if (negate) {
|
||||||
|
tok=teFUNCTN;
|
||||||
goto invalid_token_neg;
|
goto invalid_token_neg;
|
||||||
|
} /* if */
|
||||||
if (!allow_nonint) {
|
if (!allow_nonint) {
|
||||||
tok=(sym->usage & uNATIVE) ? teNATIVE : teFUNCTN;
|
tok=(sym->usage & uNATIVE) ? teNATIVE : teFUNCTN;
|
||||||
goto invalid_token;
|
goto invalid_token;
|
||||||
@ -6149,7 +6153,10 @@ fetchtok:
|
|||||||
extern char *sc_tokens[];
|
extern char *sc_tokens[];
|
||||||
char ival[sNAMEMAX+2];
|
char ival[sNAMEMAX+2];
|
||||||
invalid_token_neg:
|
invalid_token_neg:
|
||||||
sprintf(ival,"-%s",str);
|
if (tok<tFIRST)
|
||||||
|
sprintf(ival,"-%c",tok);
|
||||||
|
else
|
||||||
|
sprintf(ival,"-(%s)",sc_tokens[tok-tFIRST]);
|
||||||
error(1,sc_tokens[expected_tok-tFIRST],ival);
|
error(1,sc_tokens[expected_tok-tFIRST],ival);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} /* if */
|
} /* if */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user