tooling: Add some very basic IR2 Syntax Highlighting (#659)

* add IR syntax highlighting

* set the filterFileRegex properly!
This commit is contained in:
Tyler Wilding 2021-07-01 17:55:53 -04:00 committed by GitHub
parent fe5635227a
commit d4e68e7ef4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 207 additions and 1 deletions

1
.gitignore vendored
View File

@ -7,7 +7,6 @@ cmake-build-debug/*
build/*
decompiler_out/*
logs/*
.vscode/settings.json
# for Nix

207
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,207 @@
{
"files.associations": {
"*ir2.asm": "Plain Text",
".gc": "lisp",
".gs": "lisp",
".gd": "lisp"
},
"highlight.maxMatches": 50000, // Maximum number of matches to decorate per regex, in order not to crash the app with accidental cathastropic regexes
"highlight.regexes": {
"(\\.function.*)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent", // TODO - fix this bug, it extends beyond the line match
"color": "#41f041",
"fontWeight": "bold"
}
]
},
"(INFO:.*)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "yellow",
"fontWeight": "bold",
"filterFileRegex": ".*ir2\\.asm"
}
]
},
"(at op \\d+)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "#4de0ff"
}
]
},
"(.*;; )(\\[\\s*\\d+\\])": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{},
{
"overviewRulerColor": "transparent",
"color": "#4de0ff"
}
]
},
"(lw.+, )(.+\\(s7\\))": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{},
{
"overviewRulerColor": "transparent",
"color": "magenta"
}
]
},
"(L\\d+)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "#f0d541"
}
]
},
"(B\\d+:)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "#f07341"
}
]
},
"(at)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "red"
}
]
},
"(gp)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "#64c5e3"
}
]
},
"(v0)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "#c6c1e6"
}
]
},
"(v1)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "#dae6be"
}
]
},
"(s6)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "#41f0b0"
}
]
},
"(a0)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "pink"
}
]
},
"(a1)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "#e065bb"
}
]
},
"(a2)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "#6dd1a6"
}
]
},
"(a3)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "#bad192"
}
]
},
"(t0)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "#b56b82"
}
]
},
"(t1)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "#6d32ba"
}
]
},
"(t2)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "#db9267"
}
]
},
"(t3)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "transparent",
"color": "#92db67"
}
]
},
"(WARN:.*)": {
"filterFileRegex": ".*ir2\\.asm",
"decorations": [
{
"overviewRulerColor": "red",
"color": "red",
"fontWeight": "bold",
"filterFileRegex": ".*ir2\\.asm"
}
]
}
}
}