Fixed a bug with labels not advancing the parser after being processed resulting in a redefinition error.
This commit is contained in:
+4
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user