From 7e2dd4f82ec81cc0fc4d08c3faaee3585041c2b5 Mon Sep 17 00:00:00 2001 From: ernisto Date: Thu, 3 Oct 2024 19:33:18 -0300 Subject: [PATCH 1/2] fix array-assignment consuming braces end-token --- syntaxes/blink.tmLanguage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntaxes/blink.tmLanguage.json b/syntaxes/blink.tmLanguage.json index 37ef659..fa6d560 100644 --- a/syntaxes/blink.tmLanguage.json +++ b/syntaxes/blink.tmLanguage.json @@ -59,7 +59,7 @@ "name": "meta.array-assignment.blink" }, { - "match": "([a-zA-Z_]\\w*)\\s*}", + "match": "([a-zA-Z_]\\w*)\\s*", "captures": { "1": { "name": "variable.other.blink" } }, "name": "meta.array-assignment.blink" } From d6cd600eabfa1fe0ed6bafe09d69c43f766de731 Mon Sep 17 00:00:00 2001 From: ernisto Date: Thu, 3 Oct 2024 20:30:14 -0300 Subject: [PATCH 2/2] fix #1 --- syntaxes/blink.tmLanguage.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/syntaxes/blink.tmLanguage.json b/syntaxes/blink.tmLanguage.json index fa6d560..a19aa7d 100644 --- a/syntaxes/blink.tmLanguage.json +++ b/syntaxes/blink.tmLanguage.json @@ -4,6 +4,7 @@ "scopeName": "source.blink", "patterns": [ { "include": "#comments" }, + { "include": "#scope" }, { "include": "#brackets" }, { "include": "#autoClosingPairs" }, { "include": "#surroundingPairs" }, @@ -33,6 +34,21 @@ } ] }, + "scope": { + "patterns": [ + { + "begin": "(scope)\\s+([a-zA-Z_]\\w*)\\s*\\{", + "end": "\\}", + "captures": { + "1": { "name": "keyword.control.blink" }, + "2": { "name": "variable.other.blink" } + }, + "patterns": [ + { "include": "source.blink" } + ] + } + ] + }, "brackets": { "patterns": [ {