Skip to content

Commit

Permalink
decomp: add a unique color for the s6 register (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
xTVaser authored Aug 29, 2022
1 parent e59867d commit 2833d28
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@
"type": "string",
"default": "#76FF03"
},
"opengoal.colors.ir.reg.process": {
"description": "Colors - Register S6 (process)",
"type": "string",
"default": "#aaff63"
},
"opengoal.colors.ir.reg.general": {
"description": "Colors - Register General",
"type": "string",
Expand Down
1 change: 1 addition & 0 deletions src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export function getConfig() {
colorsIRRegFloat: configOptions.get<string>("colors.ir.reg.float"),
colorsIRRegReturn: configOptions.get<string>("colors.ir.reg.return"),
colorsIRRegStack: configOptions.get<string>("colors.ir.reg.stack"),
colorsIRRegProcess: configOptions.get<string>("colors.ir.reg.process"),
colorsIRRegGeneral: configOptions.get<string>("colors.ir.reg.general"),
};
}
Expand Down
7 changes: 7 additions & 0 deletions src/config/user-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,13 @@ function getTextMateRules() {
fontStyle: "bold",
},
},
{
name: "OpenGOAL-IR Reg-SymbolTable",
scope: "entity.name.function.opengoal.ir.regs.process",
settings: {
foreground: config.colorsIRRegProcess,
},
},
{
name: "OpenGOAL-IR Function-Call",
scope: "entity.name.function.opengoal.ir.function.call",
Expand Down
13 changes: 12 additions & 1 deletion syntaxes/opengoal-ir.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,18 @@
}
},
{
"match": "(?:\\s|\\(|\\[)(gp|fp|at|v1|ra|r0|k0|k1|t8|s[0-6]|t[4-7](?:-[\\d]+)?)",
"match": "(?:\\s|\\(|\\[)(s6(?:-[\\d]+)?)",
"captures": {
"1": {
"name": "entity.name.function.opengoal.ir.regs.process"
},
"2": {
"name": "entity.name.function.opengoal.ir.regs.process"
}
}
},
{
"match": "(?:\\s|\\(|\\[)(gp|fp|at|v1|ra|r0|k0|k1|t8|s[0-5]|t[4-7](?:-[\\d]+)?)",
"captures": {
"1": {
"name": "variable.language.opengoal.ir.regs"
Expand Down

0 comments on commit 2833d28

Please sign in to comment.