changed name of function to .ISMNEMONIC, small fixes

This commit is contained in:
JT
2015-05-19 19:50:51 -04:00
parent 9ee5adc190
commit 1e3234f370
3 changed files with 166 additions and 165 deletions

View File

@@ -418,10 +418,10 @@ static ExprNode* FuncDefined (void)
static ExprNode* FuncDefinedInstr (void) static ExprNode* FuncIsMnemonic (void)
/* Handle the .DEFINEDINSTR builtin function */ /* Handle the .ISMNEMONIC, .ISMNEM builtin function */
{ {
int Instr = 0; int Instr = -1;
/* Check for a macro or an instruction depending on UbiquitousIdents */ /* Check for a macro or an instruction depending on UbiquitousIdents */
@@ -436,7 +436,7 @@ static ExprNode* FuncDefinedInstr (void)
Instr = FindInstruction (&CurTok.SVal); Instr = FindInstruction (&CurTok.SVal);
} }
} else { } else {
Error ("Idenitifier expected."); Error ("Identifier expected.");
} }
/* Skip the name */ /* Skip the name */
NextTok (); NextTok ();
@@ -1094,8 +1094,8 @@ static ExprNode* Factor (void)
N = Function (FuncDefined); N = Function (FuncDefined);
break; break;
case TOK_DEFINEDINSTR: case TOK_ISMNEMONIC:
N = Function (FuncDefinedInstr); N = Function (FuncIsMnemonic);
break; break;
case TOK_HIBYTE: case TOK_HIBYTE:

View File

@@ -167,7 +167,6 @@ struct DotKeyword {
{ ".DEF", TOK_DEFINED }, { ".DEF", TOK_DEFINED },
{ ".DEFINE", TOK_DEFINE }, { ".DEFINE", TOK_DEFINE },
{ ".DEFINED", TOK_DEFINED }, { ".DEFINED", TOK_DEFINED },
{ ".DEFINEDINSTR", TOK_DEFINEDINSTR },
{ ".DELMAC", TOK_DELMAC }, { ".DELMAC", TOK_DELMAC },
{ ".DELMACRO", TOK_DELMAC }, { ".DELMACRO", TOK_DELMAC },
{ ".DESTRUCTOR", TOK_DESTRUCTOR }, { ".DESTRUCTOR", TOK_DESTRUCTOR },
@@ -224,6 +223,8 @@ struct DotKeyword {
{ ".INCBIN", TOK_INCBIN }, { ".INCBIN", TOK_INCBIN },
{ ".INCLUDE", TOK_INCLUDE }, { ".INCLUDE", TOK_INCLUDE },
{ ".INTERRUPTOR", TOK_INTERRUPTOR }, { ".INTERRUPTOR", TOK_INTERRUPTOR },
{ ".ISMNEM", TOK_ISMNEMONIC },
{ ".ISMNEMONIC", TOK_ISMNEMONIC },
{ ".LEFT", TOK_LEFT }, { ".LEFT", TOK_LEFT },
{ ".LINECONT", TOK_LINECONT }, { ".LINECONT", TOK_LINECONT },
{ ".LIST", TOK_LIST }, { ".LIST", TOK_LIST },

View File

@@ -148,7 +148,6 @@ typedef enum token_t {
TOK_DEBUGINFO, TOK_DEBUGINFO,
TOK_DEFINE, TOK_DEFINE,
TOK_DEFINED, TOK_DEFINED,
TOK_DEFINEDINSTR,
TOK_DELMAC, TOK_DELMAC,
TOK_DESTRUCTOR, TOK_DESTRUCTOR,
TOK_DWORD, TOK_DWORD,
@@ -200,6 +199,7 @@ typedef enum token_t {
TOK_INCBIN, TOK_INCBIN,
TOK_INCLUDE, TOK_INCLUDE,
TOK_INTERRUPTOR, TOK_INTERRUPTOR,
TOK_ISMNEMONIC,
TOK_LEFT, TOK_LEFT,
TOK_LINECONT, TOK_LINECONT,
TOK_LIST, TOK_LIST,