Changed the TokenClass from opcode to nomic, a less smoothbrain name IMO and also frees up Opcode for a better use later on.

This commit is contained in:
2022-08-30 22:06:50 -05:00
parent 3c7056c5e6
commit dac01ffd0c
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ typedef enum {
Reg = 1,
Constant = 2,
Address = 4,
Opcode = 8,
Nmomic = 8,
Directive = 16
} TokenClass;
+1 -1
View File
@@ -54,7 +54,7 @@ unsigned char* ParseTokens(List* tokens) {
case Directive:
HandleAssemblerDirective();
break;
case Opcode:
case Nmomic:
HandleOperation();
break;
case Address:
+1 -1
View File
@@ -21,7 +21,7 @@ Token* CreateToken(char* lexeme, void* value, int lineNumber, TokenType type) {
TokenClass GetTokenClass(TokenType type) {
if (type >= R1 && type <= R8) return Reg;
if (type >= COPY && type <= OUT) return Opcode;
if (type >= COPY && type <= OUT) return Nmomic;
if (type >= DB && type <= ORG) return Directive;
switch(type) {