Some refactoring to update everything to use the new structures and some new considerations for how Symbols and Instructions shoudl be represented.

This commit is contained in:
2022-09-15 22:14:38 -05:00
parent 2ae60a607c
commit 0b58e0124f
5 changed files with 119 additions and 64 deletions
+14 -14
View File
@@ -18,24 +18,24 @@
// int resolved;
// } Symbol;
typedef struct {
Mnemonic Mnemonic;
TokenClass ParameterOneType;
TokenClass ParameterTwoType;
// typedef struct {
// Mnemonic Mnemonic;
// TokenClass ParameterOneType;
// TokenClass ParameterTwoType;
union {
uint16_t Constant;
Symbol* Address;
} ParameterOne;
// union {
// uint16_t Constant;
// Symbol* Address;
// } ParameterOne;
union {
uint16_t Constant;
Symbol* Address;
} ParameterTwo;
} IROpcode;
// union {
// uint16_t Constant;
// Symbol* Address;
// } ParameterTwo;
// } IROpcode;
typedef struct {
List* Opcodes;
List* Instructions;
SymbolTable* SymbolsTable;
} IRState;