mirror of
https://github.com/Ed94/pikuma_ps1.git
synced 2026-08-16 14:11:33 +00:00
72 lines
2.6 KiB
JSON
72 lines
2.6 KiB
JSON
{
|
|
"scopeName": "tape_atom.injection",
|
|
"injectionSelector": "L:source.c -comment -string, L:source.cpp -comment -string",
|
|
"patterns": [
|
|
{ "include": "#atom-declarations" },
|
|
{ "include": "#component-declarations" },
|
|
{ "include": "#annotation-arguments" },
|
|
{ "include": "#annotations" },
|
|
{ "include": "#delay-slots" },
|
|
{ "include": "#types" },
|
|
{ "include": "#attributes" }
|
|
],
|
|
"repository": {
|
|
"atom-declarations": {
|
|
"patterns": [
|
|
{
|
|
"match": "\\b(MipsAtom_)\\s*\\(\\s*([A-Za-z_][A-Za-z0-9_]*)",
|
|
"captures": {
|
|
"1": { "name": "keyword.control.duffle.atom" },
|
|
"2": { "name": "entity.name.function.duffle.atom" }
|
|
}
|
|
},
|
|
{ "match": "\\bMipsAtom_Proc_\\b", "name": "keyword.control.duffle.atom" },
|
|
{ "match": "\\b[A-Za-z_][A-Za-z0-9_]*_proc\\b", "name": "entity.name.function.duffle.atom" }
|
|
]
|
|
},
|
|
"component-declarations": {
|
|
"patterns": [
|
|
{
|
|
"match": "\\b(MipsAtomComp_)\\s*\\(\\s*(ac_[A-Za-z0-9_]*)",
|
|
"captures": {
|
|
"1": { "name": "keyword.control.duffle.component" },
|
|
"2": { "name": "entity.name.function.duffle.component" }
|
|
}
|
|
},
|
|
{ "match": "\\bMipsAtomComp_Proc_\\b", "name": "keyword.control.duffle.component" }
|
|
]
|
|
},
|
|
"annotation-arguments": {
|
|
"patterns": [
|
|
{
|
|
"match": "\\b(atom_offset)\\s*\\(\\s*([A-Za-z_][A-Za-z0-9_]*)\\s*,\\s*([A-Za-z_][A-Za-z0-9_]*)",
|
|
"captures": {
|
|
"1": { "name": "support.function.duffle.annotation" },
|
|
"2": { "name": "entity.name.label.duffle.atom" },
|
|
"3": { "name": "entity.name.label.duffle.atom" }
|
|
}
|
|
},
|
|
{ "match": "(?<=\\batom_bind\\()\\s*Binds_[A-Za-z0-9_]+", "name": "entity.name.type.duffle.bind" },
|
|
{ "match": "(?<=\\batom_phase\\()\\s*[A-Za-z_][A-Za-z0-9_]*", "name": "entity.name.tag.duffle.phase" },
|
|
{ "match": "(?<=\\batom_label\\()\\s*[A-Za-z_][A-Za-z0-9_]*", "name": "entity.name.label.duffle.atom" }
|
|
]
|
|
},
|
|
"annotations": {
|
|
"match": "\\b(atom_info|atom_bind|atom_reads|atom_writes|atom_label|atom_offset|atom_reg|atom_type|atom_ctx|atom_phase|atom_auto_reg|phase_auto_reg|atom_dbg_skip)\\b",
|
|
"name": "support.function.duffle.annotation"
|
|
},
|
|
"delay-slots": {
|
|
"match": "\\b(LdSlot_|BdSlot_)\\b",
|
|
"name": "keyword.operator.duffle.delayslot"
|
|
},
|
|
"types": {
|
|
"match": "\\b(?:Binds_[A-Za-z0-9_]+|RegUse_[A-Za-z0-9_]+)\\b",
|
|
"name": "storage.type.duffle.type"
|
|
},
|
|
"attributes": {
|
|
"match": "\\b(?:FI_|I_|NI_|Relative_|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)\\b",
|
|
"name": "keyword"
|
|
}
|
|
}
|
|
}
|