From 5653674a2f677890393964685308ee79bfca45c0 Mon Sep 17 00:00:00 2001 From: AnHeuermann <38031952+AnHeuermann@users.noreply.github.com> Date: Wed, 13 Mar 2024 12:43:38 +0100 Subject: [PATCH] Fixing string and doc string detection Co-authored-by: phannebohm --- .vscode/launch.json | 2 +- .vscode/tasks.json | 10 ++++++++++ README.md | 3 ++- syntaxes/modelica.tmGrammar.yaml | 8 ++++---- test/modelica/Comments.test.mo | 20 ++++++++++++++++++-- 5 files changed, 35 insertions(+), 8 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 1fca752..a26f46b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,7 +12,7 @@ "args": [ "--extensionDevelopmentPath=${workspaceFolder}" ], - "preLaunchTask": "npm: prebuild" + "preLaunchTask": "Build" } ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index b0d0f00..528bd09 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -3,8 +3,18 @@ // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ + { + "label": "Build", + "group": { + "kind": "build", + "isDefault": true + }, + "type": "npm", + "script": "prebuild" + }, { "label": "tmGrammar tests", + "dependsOn": ["Build"], "type": "shell", "command": "npx vscode-tmgrammar-test -c 'test/**/*.test.*'", "group": "test", diff --git a/README.md b/README.md index e043bdb..05c6b71 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ npm install ``` Translate the `*tmGrammar.yaml` files to `*.tmGrammar.json` JSON files. +Start build task (Ctrl+Shift+B) ```bash npm run prebuild @@ -96,7 +97,7 @@ Run the `tmGrammer tests` task: or run it manually: ```bash -npx vscode-tmgrammar-test test/**/*.test.* +npm run test ``` ### Build Package diff --git a/syntaxes/modelica.tmGrammar.yaml b/syntaxes/modelica.tmGrammar.yaml index 5a19691..3d9be26 100644 --- a/syntaxes/modelica.tmGrammar.yaml +++ b/syntaxes/modelica.tmGrammar.yaml @@ -76,15 +76,15 @@ patterns: - include: '#annotations' # Strings + - match: (?