Minor code cleanup and added an extra flag to the compiler. If a symbol is a label it will now hold a reference to the opcode and by extension the offset into the file it points to.

This commit is contained in:
2023-07-06 19:39:03 -05:00
parent 3031fa8b9b
commit 9c8fe17c8f
6 changed files with 37 additions and 31 deletions
+2
View File
@@ -8,6 +8,7 @@
#include <string.h>
#include <sys/types.h>
#include "opcodes.h"
#include "token.h"
#define SYMBOLSTABLE_DEFAULT_CAPACITY 128
@@ -16,6 +17,7 @@ typedef struct {
int Address;
int Resolved;
int Length;
Token* References;
} Symbol;
typedef struct {