ir2: highlight mips2c blocks as cpp (#159)

This commit is contained in:
Tyler Wilding 2022-12-09 19:36:03 -05:00 committed by GitHub
parent 85e57f065a
commit 7a9e787da3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -445,7 +445,8 @@
"scopeName": "source.opengoal-ir",
"path": "./syntaxes/opengoal-ir.tmLanguage.json",
"embeddedLanguages": {
"meta.embedded.block.opengoal": "opengoal"
"meta.embedded.block.opengoal": "opengoal",
"meta.embedded.block.mips2c": "cpp"
}
}
],

View file

@ -6,6 +6,9 @@
{
"include": "#goalCode"
},
{
"include": "#mips2c"
},
{
"include": "#errorsAndWarnings"
},
@ -23,6 +26,16 @@
}
],
"repository": {
"mips2c": {
"patterns": [
{
"name": "meta.embedded.block.mips2c",
"begin": ";;-\\*-MIPS2C-Start-\\*-",
"end": ";;-\\*-MIPS2C-End-\\*-",
"patterns": [{ "include": "source.cpp" }]
}
]
},
"goalCode": {
"patterns": [
{