I added some code to help with constants but it's not working.

This commit is contained in:
Meyer Simon
2025-04-11 12:51:14 -04:00
parent 58b50ccb63
commit 7296a24c74
3 changed files with 60 additions and 7 deletions

View File

@ -35,6 +35,30 @@ typedef enum {
} Op;
typedef enum {
NODE,
INTEGER,
STRING,
CHARACTER,
ADDRESS,
BOOLEAN
} Discriminant;
typedef union {
TableNode * node;
int integer;
char * string;
char character;
void * address;
bool Boolean;
} Register_union;
typedef struct {
Discriminant d;
Register_union r_union;
} TNodeOrConst;
typedef struct Instruction {
Op opcode;
TableNode * result;