messing around.

This commit is contained in:
ed
2026-08-14 22:43:27 -04:00
parent 7ec778a68e
commit d23b6a2a36
8 changed files with 35 additions and 23 deletions
+10
View File
@@ -22,6 +22,7 @@ const TOKEN_TYPES = [
"tapeCop2Register",
"tapeDuffleType",
"tapeAttribute",
"keyword",
];
const TOKEN_MODIFIERS = ["declaration", "tapeRead", "tapeWrite", "tapeAuto"];
@@ -36,6 +37,14 @@ const ANNOTATIONS = new Set([
"atom_auto_reg", "phase_auto_reg", "atom_dbg_skip",
]);
const DSL_KEYWORDS = new Set([
"FI_", "I_", "NI_", "Relative_", "Struct_", "Enum_", "Union_",
"TypeR_", "TypeV_", "align_", "internal", "local_persist", "global",
"O_", "S_", "C_", "T_", "tmpl", "glue", "r_", "v_", "tr_", "tv_",
"rgcc", "rlit", "r_use", "r_set", "r_mod", "r_imm", "r_mem",
"enc_op", "enc_rs", "enc_rt", "enc_rd", "enc_imm", "enc_i", "enc_r",
]);
const DELAY_SLOT_KEYWORDS = new Set(["LdSlot_", "BdSlot_"]);
const CONTROL_FLOW_PREFIXES = /^(?:branch_|jump_|call_)/;
@@ -151,6 +160,7 @@ function classifyDocument(source, filePath, workspaceIndex, shouldCancel = () =>
if (!type && index.bindTypes.has(token.text)) type = "tapeBindType";
if (!type && index.types.has(token.text)) type = "tapeDuffleType";
if (!type && DSL_KEYWORDS.has(token.text)) type = "keyword";
if (!type && index.attributes.has(token.text)) type = "tapeAttribute";
if (!type) type = registerType(token.text, index);
if (!type && DELAY_SLOT_KEYWORDS.has(token.text)) type = "tapeDelaySlot";