diff options
| author | Damian Tarnawski <gthetarnav@gmail.com> | 2024-06-14 22:57:03 +0200 |
|---|---|---|
| committer | Damian Tarnawski <gthetarnav@gmail.com> | 2024-06-14 22:57:03 +0200 |
| commit | 3b8ea5cda886447cc1c37b0d7f272b2194ccb332 (patch) | |
| tree | e8b94bfb011b20ddae9ed5068f51e6ac4f6190fe /editors | |
| parent | 09f865e685f8ebddaf994e51baeabed795e7f849 (diff) | |
Minor fixes to tm grammars
- add `\` to punctuation
- change scope for `context` to a `keyword.context.odin`
- fix edge case with `case` being matched in struct declarations
Diffstat (limited to 'editors')
| -rw-r--r-- | editors/vscode/syntaxes/odin.tmLanguage.json | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editors/vscode/syntaxes/odin.tmLanguage.json b/editors/vscode/syntaxes/odin.tmLanguage.json index d9349b9..3050aaf 100644 --- a/editors/vscode/syntaxes/odin.tmLanguage.json +++ b/editors/vscode/syntaxes/odin.tmLanguage.json @@ -284,8 +284,8 @@ }, "case-clause": { "name": "meta.case-clause.expr.odin", - "begin": "case", - "beginCaptures": { "0": { "name": "keyword.control.case.odin" } }, + "begin": "\\b(case)\\b", + "beginCaptures": { "1": { "name": "keyword.control.case.odin" } }, "end": ":", "endCaptures": { "0": { "name": "punctuation.definition.section.case-statement.odin" } }, "patterns": [ { "include": "#expressions" } ] @@ -435,7 +435,7 @@ "match": "\\b(auto_cast|distinct|using)\\b" }, { - "name": "variable.other.object.odin", + "name": "keyword.context.odin", "match": "\\b(context)\\b" }, { @@ -618,7 +618,7 @@ "patterns": [ { "name": "punctuation.odin", - "match": "\\(|\\)|\\{|\\}|;|\\[|\\]|\\.|," + "match": "\\(|\\)|\\{|\\}|;|\\[|\\]|\\.|,|\\\\" } ] } |