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:
@@ -48,6 +48,19 @@
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Data */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
/* Scope identifiers */
|
||||
#define SCOPE_ANY 0
|
||||
#define SCOPE_GLOBAL 1
|
||||
#define SCOPE_LOCAL 2
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Code */
|
||||
/*****************************************************************************/
|
||||
@@ -63,16 +76,13 @@ void SymLeaveLevel (void);
|
||||
void SymDef (const char* Name, ExprNode* Expr, int ZP, int Label);
|
||||
/* Define a new symbol */
|
||||
|
||||
SymEntry* SymRef (const char* Name);
|
||||
SymEntry* SymRef (const char* Name, int Scope);
|
||||
/* Search for the symbol and return it */
|
||||
|
||||
SymEntry* SymRefGlobal (const char* Name);
|
||||
/* Search for the symbol in the global namespace and return it */
|
||||
|
||||
int SymIsDef (const char* Name);
|
||||
int SymIsDef (const char* Name, int Scope);
|
||||
/* Return true if the given symbol is already defined */
|
||||
|
||||
int SymIsRef (const char* Name);
|
||||
int SymIsRef (const char* Name, int Scope);
|
||||
/* Return true if the given symbol has been referenced */
|
||||
|
||||
void SymImport (const char* Name, int ZP);
|
||||
|
||||
Reference in New Issue
Block a user