Fixed a bug with labels not advancing the parser after being processed resulting in a redefinition error.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
.db null_byte 0
|
||||
|
||||
;load r2, label
|
||||
something_insance:
|
||||
load byte r1, r3
|
||||
load r1, r3
|
||||
load r1, 5
|
||||
+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