Parser is now mostly setup for the 'peek and advance' pattern. Still having infinite loop issues somewhere though.

This commit is contained in:
2022-05-12 21:30:02 +00:00
parent 72525959f6
commit 2de3538d80
2 changed files with 64 additions and 25 deletions
+5 -5
View File
@@ -22,7 +22,7 @@ typedef enum {
LABEL,
NUMBER,
//Keywords
DB, ORG,
DB, ORG,
//Opcodes
COPY, ADD, SUB, JZ, INT, YLD, RET,
CMP, IN, OUT,
@@ -31,10 +31,10 @@ typedef enum {
} TokenType;
typedef enum {
None,
Reg,
Immediate16,
Opcode
None = 0,
Reg = 1,
Immediate16 = 2,
Opcode = 4
} TokenClass;
typedef struct {