Updated the way Instructions keep track of symbols. Only their name is important but we need the Symbols to be able to track which Instruction they point to (if they do that is, i.e. a label symbol).
This commit is contained in:
@@ -5,23 +5,20 @@
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "opcodes.h"
|
||||
|
||||
#define SYMBOLSTABLE_DEFAULT_CAPACITY 128
|
||||
|
||||
typedef enum {
|
||||
ValueAt,
|
||||
Address
|
||||
} SymbolType;
|
||||
|
||||
typedef struct {
|
||||
char* Name;
|
||||
int Length;
|
||||
int Resolved;
|
||||
int InstructionPointer;
|
||||
|
||||
union {
|
||||
char* Text;
|
||||
int Number;
|
||||
//Instruction Instruction;
|
||||
Instruction* Instruction;
|
||||
} Value;
|
||||
} Symbol;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user