Updated the structure of symbols and tokens to hopefully help make computing symbol values easier.
This commit is contained in:
@@ -12,23 +12,11 @@
|
||||
|
||||
#define SYMBOLSTABLE_DEFAULT_CAPACITY 128
|
||||
|
||||
typedef enum {
|
||||
RefUnknown,
|
||||
RefLiteral,
|
||||
RefExpression,
|
||||
RefPointer
|
||||
} ReferenceType;
|
||||
|
||||
typedef struct _symbol {
|
||||
char* Name;
|
||||
int Address;
|
||||
int Length;
|
||||
union {
|
||||
Token* Mnemonic;
|
||||
struct _symbol* Symbol;
|
||||
unsigned short Number;
|
||||
} Value;
|
||||
ReferenceType Type;
|
||||
Token* Token;
|
||||
} Symbol;
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user