Add a new feature "ubiquitous_idents" that allows the use of instructions as

identifiers and macro names.


git-svn-id: svn://svn.cc65.org/cc65/trunk@2981 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2004-04-20 12:49:36 +00:00
parent 0eba6f615f
commit c3d510a9bc
8 changed files with 57 additions and 30 deletions

View File

@@ -617,7 +617,7 @@ static unsigned ReadStringConst (int StringTerm)
/* Return the length of the string */
return I;
}
}
@@ -844,13 +844,9 @@ Again:
}
}
/* Search for an opcode */
IVal = FindInstruction (SVal);
if (IVal >= 0) {
/* This is a mnemonic */
Tok = TOK_MNEMO;
} else if (IsDefine (SVal)) {
/* This is a define style macro - expand it */
/* Check for define style macro */
if (IsDefine (SVal)) {
/* Macro - expand it */
MacExpandStart ();
goto Restart;
} else {
@@ -1122,7 +1118,7 @@ int TokHasSVal (enum Token Tok)
int TokHasIVal (enum Token Tok)
/* Return true if the given token has an attached IVal */
{
return (Tok == TOK_INTCON || Tok == TOK_CHARCON || Tok == TOK_MNEMO);
return (Tok == TOK_INTCON || Tok == TOK_CHARCON);
}