1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-29 10:29:30 +00:00

Added .WARNING

git-svn-id: svn://svn.cc65.org/cc65/trunk@204 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2000-07-27 18:47:57 +00:00
parent 8972f1db97
commit 3c5ae1b3c4
5 changed files with 19 additions and 0 deletions

View File

@ -83,6 +83,7 @@ void WarningMsg (const FilePos* Pos, unsigned WarnNum, va_list ap)
{ 2, "Symbol `%s' is defined but never used" },
{ 2, "Symbol `%s' is imported but never used" },
{ 1, "Cannot track processor status byte" },
{ 0, "User warning: %s" },
};
if (Warnings [WarnNum-1].Level <= WarnLevel) {

View File

@ -55,6 +55,7 @@ enum Warnings {
WARN_SYM_NOT_REFERENCED,
WARN_IMPORT_NOT_REFERENCED,
WARN_CANNOT_TRACK_STATUS,
WARN_USER,
WARN_COUNT /* Warning count */
};

View File

@ -1037,6 +1037,19 @@ static void DoUnexpected (void)
static void DoWarning (void)
/* User warning */
{
if (Tok != TOK_STRCON) {
ErrorSkip (ERR_STRCON_EXPECTED);
} else {
Error (WARN_USER, SVal);
SkipUntilSep ();
}
}
static void DoWord (void)
/* Define words */
{
@ -1167,6 +1180,7 @@ static CtrlDesc CtrlCmdTab [] = {
{ ccNone, DoUnexpected }, /* .STRLEN */
{ ccNone, DoSunPlus },
{ ccNone, DoUnexpected }, /* .TCOUNT */
{ ccNone, DoWarning },
{ ccNone, DoWord },
{ ccNone, DoUnexpected }, /* .XMATCH */
{ ccNone, DoZeropage },

View File

@ -224,6 +224,7 @@ struct DotKeyword {
{ "STRLEN", TOK_STRLEN },
{ "SUNPLUS", TOK_SUNPLUS },
{ "TCOUNT", TOK_TCOUNT },
{ "WARNING", TOK_WARNING },
{ "WORD", TOK_WORD },
{ "XMATCH", TOK_XMATCH },
{ "XOR", TOK_BXOR },

View File

@ -104,6 +104,7 @@ enum Token {
TOK_RBRACK, /* ] */
TOK_MACPARAM, /* Macro parameter, not generated by scanner */
TOK_REPCOUNTER, /* Repeat counter, not generated by scanner */
/* The next ones are tokens for the pseudo instructions. Keep together! */
TOK_FIRSTPSEUDO,
@ -193,6 +194,7 @@ enum Token {
TOK_STRLEN,
TOK_SUNPLUS,
TOK_TCOUNT,
TOK_WARNING,
TOK_WORD,
TOK_XMATCH,
TOK_ZEROPAGE,