More work on expressions and address sizes

git-svn-id: svn://svn.cc65.org/cc65/trunk@2658 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-11-13 00:21:31 +00:00
parent 227f4a7bc2
commit ba68b5f87a
10 changed files with 481 additions and 247 deletions

View File

@@ -58,6 +58,13 @@
#define ST_NONE 0x00 /* No flags */
#define ST_DEFINED 0x01 /* Scope has been defined */
/* Symbol table types */
#define ST_GLOBAL 0x00 /* Root level */
#define ST_PROC 0x01 /* .PROC */
#define ST_SCOPE 0x02 /* .SCOPE */
#define ST_STUCT 0x03 /* .STRUCT */
#define ST_UNDEF 0xFF
/* A symbol table */
typedef struct SymTable SymTable;
struct SymTable {
@@ -87,7 +94,7 @@ SymTable* RootScope; /* Root symbol table */
void SymEnterLevel (const char* ScopeName, unsigned AddrSize);
void SymEnterLevel (const char* ScopeName, unsigned char Type, unsigned char AddrSize);
/* Enter a new lexical level */
void SymLeaveLevel (void);
@@ -102,14 +109,12 @@ SymEntry* SymFind (SymTable* Scope, const char* Name, int AllocNew);
* new entry created, or - in case AllocNew is zero - return 0.
*/
void SymConDes (const char* Name, unsigned Type, unsigned Prio);
/* Mark the given symbol as a module constructor/destructor. This will also
* mark the symbol as an export. Initializers may never be zero page symbols.
*/
int SymIsZP (SymEntry* Sym);
/* Return true if the symbol is explicitly marked as zeropage symbol */
unsigned char GetCurrentSymTabType ();
/* Return the type of the current symbol table */
void SymCheck (void);
/* Run through all symbols and check for anomalies and errors */