From ac01922698fdc09d5ce82449256c1124c3d4f0a9 Mon Sep 17 00:00:00 2001 From: i582 <51853996+i582@users.noreply.github.com> Date: Tue, 5 Aug 2025 15:26:27 +0400 Subject: [PATCH] feat(tolk/vscode): better support for triple-quotes strings - Auto closing - Correct highlighting for strings with " inside Fixes #88 Fixes #103 --- .../languages/syntaxes/tolk.tmLanguage.json | 19 ++++++++++++++++++- .../tolk-language-configuration.json | 2 ++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/editors/code/src/languages/syntaxes/tolk.tmLanguage.json b/editors/code/src/languages/syntaxes/tolk.tmLanguage.json index 1fbd3305..7a14627f 100644 --- a/editors/code/src/languages/syntaxes/tolk.tmLanguage.json +++ b/editors/code/src/languages/syntaxes/tolk.tmLanguage.json @@ -13,10 +13,27 @@ "begin": "/\\*", "end": "\\*/" }, + { + "name": "string.quoted.triple", + "begin": "\"\"\"", + "end": "\"\"\"", + "patterns": [ + { + "name": "constant.character.escape", + "match": "\\\\." + } + ] + }, { "name": "string.quoted.double", "begin": "\"", - "end": "\"" + "end": "\"", + "patterns": [ + { + "name": "constant.character.escape", + "match": "\\\\." + } + ] }, { "name": "constant.numeric", diff --git a/editors/code/src/languages/tolk-language-configuration.json b/editors/code/src/languages/tolk-language-configuration.json index cf47123f..a244da69 100644 --- a/editors/code/src/languages/tolk-language-configuration.json +++ b/editors/code/src/languages/tolk-language-configuration.json @@ -13,12 +13,14 @@ ["{", "}"], ["[", "]"], ["(", ")"], + ["\"\"\"", "\"\"\""], ["\"", "\""] ], "surroundingPairs": [ ["{", "}"], ["[", "]"], ["(", ")"], + ["\"\"\"", "\"\"\""], ["\"", "\""] ], "onEnterRules": [