Fixed a bug with labels not advancing the parser after being processed resulting in a redefinition error.

This commit is contained in:
2023-03-28 12:41:56 -05:00
parent ae03991fa5
commit 2d7aad1617
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -56,6 +56,9 @@ IRState* ParseTokens(List* tokens) {
if (!found) AddSymbolToTable(t->Lemexe, HeapSize, 1, MachineState.SymbolsTable);
else tmp->Resolved = 1;
RemoveCurrentToken(); //label
RemoveCurrentToken(); //newline
}
break;
default:
@@ -191,7 +194,7 @@ void HandleAssemblerDirective() {
directive->Lemexe = "LAA";
}
AdvanceParser(); //Number or identifier
AdvanceParser(); //Number, register or identifier
}
else if (reg->Class == DirectiveClass) {
if (reg->Value.Directive != Byte) {