mirror of
https://github.com/Ed94/pikuma_ps1.git
synced 2026-08-25 02:20:33 +00:00
updates to lua program to furhter support new constructs and correct report errors.
This commit is contained in:
BIN
Binary file not shown.
+1
-1
@@ -49,7 +49,7 @@ const DSL_KEYWORDS = new Set([
|
||||
"u1_r", "u2_r", "u4_r", "u8_r", "u1_v", "u2_v", "u4_v", "u8_v",
|
||||
]);
|
||||
|
||||
const DELAY_SLOT_KEYWORDS = new Set(["LdSlot_", "BdSlot_"]);
|
||||
const DELAY_SLOT_KEYWORDS = new Set(["LdSlot_", "BdSlot_", "DmaSlot_", "GteDelay_"]);
|
||||
|
||||
const CONTROL_FLOW_PREFIXES = /^(?:branch_|jump_|call_)/;
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
"name": "support.function.duffle.annotation"
|
||||
},
|
||||
"delay-slots": {
|
||||
"match": "\\b(LdSlot_|BdSlot_)\\b",
|
||||
"match": "\\b(LdSlot_|BdSlot_|DmaSlot_|GteDelay_)\\b",
|
||||
"name": "keyword.operator.duffle.delayslot"
|
||||
},
|
||||
"types": {
|
||||
|
||||
@@ -105,6 +105,16 @@ test("document-local declarations override an empty workspace index", () => {
|
||||
assert.equal(byText(result, "mac_new_component")[0].type, "tapeComponentInstruction");
|
||||
});
|
||||
|
||||
test("delay slot markers share the tapeDelaySlot token", () => {
|
||||
const source = "LdSlot_ nop, BdSlot_ nop, DmaSlot_ nop2, GteDelay_ nop";
|
||||
const result = classifyDocument(source, "C:/x/code/duffle/gte.atom.c", createIndex());
|
||||
|
||||
assert.equal(byText(result, "LdSlot_")[0].type, "tapeDelaySlot");
|
||||
assert.equal(byText(result, "BdSlot_")[0].type, "tapeDelaySlot");
|
||||
assert.equal(byText(result, "DmaSlot_")[0].type, "tapeDelaySlot");
|
||||
assert.equal(byText(result, "GteDelay_")[0].type, "tapeDelaySlot");
|
||||
});
|
||||
|
||||
test("classifier returns ordered non-overlapping spans and partial malformed output", () => {
|
||||
const source = "atom_reads(R_A /* broken";
|
||||
const result = classifyDocument(source, "C:/x/code/test.atom.c", createIndex());
|
||||
|
||||
Reference in New Issue
Block a user