Added a scope argument to the SymIsDef and SymIsDef functions, so it is

possible to request information for a specific scope.
Add an optional scope argument to the .DEFINED builtin function.
Change the long branch macros to look for symbols in local scope.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1574 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2002-11-22 01:45:00 +00:00
parent d7a5fbeb1a
commit 4dd4e76a88
9 changed files with 138 additions and 62 deletions

View File

@@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 2000 Ullrich von Bassewitz */
/* (C) 2000-2002 Ullrich von Bassewitz */
/* Wacholderweg 14 */
/* D-70597 Stuttgart */
/* EMail: uz@musoftware.de */
@@ -307,7 +307,7 @@ void DoConditionals (void)
if (Tok != TOK_IDENT) {
ErrorSkip (ERR_IDENT_EXPECTED);
} else {
SetIfCond (D, SymIsDef (SVal));
SetIfCond (D, SymIsDef (SVal, SCOPE_ANY));
NextTok ();
}
}
@@ -346,7 +346,7 @@ void DoConditionals (void)
if (Tok != TOK_IDENT) {
ErrorSkip (ERR_IDENT_EXPECTED);
} else {
SetIfCond (D, !SymIsDef (SVal));
SetIfCond (D, !SymIsDef (SVal, SCOPE_ANY));
NextTok ();
}
}
@@ -360,7 +360,7 @@ void DoConditionals (void)
if (Tok != TOK_IDENT) {
ErrorSkip (ERR_IDENT_EXPECTED);
} else {
SetIfCond (D, !SymIsRef (SVal));
SetIfCond (D, !SymIsRef (SVal, SCOPE_ANY));
NextTok ();
}
}
@@ -401,7 +401,7 @@ void DoConditionals (void)
if (Tok != TOK_IDENT) {
ErrorSkip (ERR_IDENT_EXPECTED);
} else {
SetIfCond (D, SymIsRef (SVal));
SetIfCond (D, SymIsRef (SVal, SCOPE_ANY));
NextTok ();
}
}