Skip to content

Commit

Permalink
Merge pull request #491 from GerardGascon/develop
Browse files Browse the repository at this point in the history
Added regions and fixed syntax highlighting
  • Loading branch information
zerasul authored Dec 23, 2021
2 parents 5b24028 + dc80cc9 commit 5afe20a
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

This is the change Log of Genesis Code. For more information you can see the [Documentation page](https://zerasul.github.io/genesis-code-docs/).

## 1.3.4

* SGDK resource files now have regions
* They start with *#region* / *#pragma region*
* They end with *#endregion* / *#pragma endregion*
* Fixed some syntax highlighting errors related with numbers

## 1.3.3

* [Added SGDK 1.65 Support](https://github.com/zerasul/genesis-code/issues/277).
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ Now you can use the Bitmap Viewer; with some information of the images. You can

## Release Notes

### 1.3.4

* SGDK resource files now have regions
* They start with *#region* / *#pragma region*
* They end with *#endregion* / *#pragma endregion*
* Fixed some syntax highlighting errors related with numbers

### 1.3.3

* Added SGDK 1.65 Support.
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@
"languages": [
{
"id": "Sgdk Resource File",
"extensions": [
".res"
]
"extensions": [".res"],
"configuration": "./resources/language-configuration.json"
}
],
"grammars": [
Expand Down
16 changes: 16 additions & 0 deletions resources/language-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"comments": {
// symbol used for single line comment. Remove this entry if your language does not support line comments
"lineComment": "#",
},
// symbols that are auto closed when typing
"autoClosingPairs": [
["\"", "\""]
],
"folding": {
"markers": {
"start": "(^\\s*#?region\\b)|(^\\s*#?pragma region\\b)",
"end": "(^\\s*#?endregion\\b)|(^\\s*#?pragma endregion\\b)"
}
}
}
14 changes: 11 additions & 3 deletions resources/res_grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
{
"include": "#compression"
},
{
"include": "#regions"
},
{
"include": "#comment"
},
Expand Down Expand Up @@ -92,7 +95,7 @@
]
},
"number": {
"match": "\\d",
"match": "([0-9]+\\\n)|(\\ +[0-9]+\\ )|(\t+[0-9]+\\ )|(\\ +[0-9]+\t)|(\t+[0-9]+\t)",
"name": "constant.numeric.number"
},
"height": {
Expand All @@ -111,7 +114,12 @@
"end": "\\\n",
"name": "comment.line.number-sign"
},
"timing": {
"regions": {
"begin": "(\\#region)|(\\#endregion)|(\\#pragma region)|(\\#pragma endregion)",
"end": "\\\n",
"name": "markup.italic"
},
"timing": {
"match": "AUTO|NTSC|PAL",
"name": "keyword.control.timing"
},
Expand Down Expand Up @@ -171,4 +179,4 @@
]
}
}
}
}

0 comments on commit 5afe20a

Please sign in to comment.