mirror of https://github.com/pfusik/xasm.git
Tune variable/func names after sequencing support added
This commit is contained in:
parent
ca5e88950f
commit
95136d1546
18
source/app.d
18
source/app.d
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue