From 3b8ea5cda886447cc1c37b0d7f272b2194ccb332 Mon Sep 17 00:00:00 2001 From: Damian Tarnawski Date: Fri, 14 Jun 2024 22:57:03 +0200 Subject: 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 --- editors/vscode/syntaxes/odin.tmLanguage.json | 8 ++++---- 1 file 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": "\\(|\\)|\\{|\\}|;|\\[|\\]|\\.|,|\\\\" } ] } -- cgit v1.2.3