#include "inline.h"
/* ca65 */
-#include "segrange.h"
#include "symentry.h"
#define ST_NONE 0x00 /* No flags */
#define ST_DEFINED 0x01 /* Scope has been defined */
-/* Symbol table types */
-enum {
- ST_GLOBAL, /* Root level */
- ST_PROC, /* .PROC */
- ST_SCOPE, /* .SCOPE */
- ST_SCOPE_HAS_DATA = ST_SCOPE, /* Last scope that contains data */
- ST_STRUCT, /* .STRUCT/.UNION */
- ST_ENUM, /* .ENUM */
- ST_UNDEF = 0xFF
-};
-
/* A symbol table */
typedef struct SymTable SymTable;
struct SymTable {
SymTable* Right; /* Pointer to greater entry */
SymTable* Parent; /* Link to enclosing scope if any */
SymTable* Childs; /* Pointer to child scopes */
- SymEntry* OwnerSym; /* Symbol that "owns" the scope */
- Collection SegRanges; /* Segment ranges for this scope */
+ SymEntry* Label; /* Scope label */
+ Collection Spans; /* Spans for this scope */
unsigned Id; /* Scope id */
unsigned short Flags; /* Symbol table flags */
unsigned char AddrSize; /* Address size */
# define GetSymTabType(S) ((S)->Type)
#endif
-unsigned char GetCurrentSymTabType ();
-/* Return the type of the current symbol table */
-
void SymCheck (void);
/* Run through all symbols and check for anomalies and errors */