Tune variable/func names after sequencing support added

This commit is contained in:
Piotr Skamruk 2022-12-20 13:08:42 +01:00 committed by Piotr Fusik
parent ca5e88950f
commit 95136d1546
1 changed files with 9 additions and 9 deletions

View File

@ -139,7 +139,7 @@ bool repeating; // line
int repeatCounter; // line int repeatCounter; // line
bool instructionBegin; bool instructionBegin;
bool pairing; bool sequencing;
bool willSkip; bool willSkip;
bool skipping; bool skipping;
@ -1329,7 +1329,7 @@ void directive() {
noOpcode(); noOpcode();
if (repeating) if (repeating)
throw new AssemblyError("Can't repeat this directive"); throw new AssemblyError("Can't repeat this directive");
if (pairing) if (sequencing)
throw new AssemblyError("Can't pair this directive"); throw new AssemblyError("Can't pair this directive");
} }
@ -2660,12 +2660,12 @@ unittest {
== representation(hexString!"400100000000 401200000000 410123000000 441234567890 461234567890 3f5000000000 3f0300000000 3f1664534589 701000000000")); == representation(hexString!"400100000000 401200000000 410123000000 441234567890 461234567890 3f5000000000 3f0300000000 3f1664534589 701000000000"));
} }
void assemblyPair() { void assemblySequence() {
assert(!inOpcode); assert(!inOpcode);
string instruction = readInstruction(); string instruction = readInstruction();
string[] extraInstructions; string[] extraInstructions;
while (!eol() && line[column] == ':') { while (!eol() && line[column] == ':') {
pairing = true; sequencing = true;
column++; column++;
extraInstructions ~= readInstruction(); extraInstructions ~= readInstruction();
} }
@ -2676,13 +2676,13 @@ void assemblyPair() {
assemblyInstruction(instruction); assemblyInstruction(instruction);
checkNoExtraCharacters(); checkNoExtraCharacters();
wereManyInstructions = false; wereManyInstructions = false;
foreach (instruction2; extraInstructions) { foreach (nextInstruction; extraInstructions) {
column = savedColumn; column = savedColumn;
assemblyInstruction(instruction2); assemblyInstruction(nextInstruction);
wereManyInstructions = true; wereManyInstructions = true;
} }
} else { } else {
pairing = false; sequencing = false;
assemblyInstruction(instruction); assemblyInstruction(instruction);
wereManyInstructions = false; wereManyInstructions = false;
} }
@ -2759,7 +2759,7 @@ void assemblyLine() {
int savedColumn = column; int savedColumn = column;
for (repeatCounter = 0; repeatCounter < repeatLimit; repeatCounter++) { for (repeatCounter = 0; repeatCounter < repeatLimit; repeatCounter++) {
column = savedColumn; column = savedColumn;
assemblyPair(); assemblySequence();
} }
checkNoExtraCharacters(); checkNoExtraCharacters();
listLine(); listLine();
@ -2795,7 +2795,7 @@ void assemblyLine() {
listCommentLine(); listCommentLine();
return; return;
} }
assemblyPair(); assemblySequence();
checkNoExtraCharacters(); checkNoExtraCharacters();
listLine(); listLine();
} }