Updated the structure of symbols and tokens to hopefully help make computing symbol values easier.

This commit is contained in:
2023-08-07 01:18:01 -05:00
parent 65383cded2
commit 4af2527806
11 changed files with 128 additions and 140 deletions
+1 -13
View File
@@ -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 {