|
2 | 2 | "$schema": "https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/vscode.tmLanguage.schema.json",
|
3 | 3 | "name": "package.json",
|
4 | 4 | "scopeName": "source.json.package",
|
5 |
| - "injectionSelector": "L:source.json meta.structure.dictionary.json -meta.embedded.shellscript.json.package -meta.structure.dictionary.value.json -meta.structure.array.json -string -comment", |
| 5 | + "injectionSelector": "L:source.json meta.structure.dictionary.json -meta.structure.dictionary.value.json -meta.structure.array.json -string -comment", |
6 | 6 | "patterns": [
|
7 | 7 | { "include": "#scripts" }
|
8 | 8 | ],
|
9 | 9 | "repository": {
|
10 | 10 | "scripts": {
|
11 |
| - "begin": "(?=\"scripts\")", |
12 |
| - "end": "(?<=,)(?!\\G)|(?=})", |
13 |
| - "name": "meta.embedded.shellscript.json.package", |
| 11 | + "begin": "(?!\\G)(?<=\"scripts\")(?!})", |
| 12 | + "end": "(?<=,)|(?=})", |
14 | 13 | "patterns": [
|
15 |
| - { "include": "source.json#objectkey" }, |
| 14 | + { |
| 15 | + "comment": "the JSON object key", |
| 16 | + "include": "source.json#objectkey" |
| 17 | + }, |
| 18 | + { "include": "source.json#comments" }, |
16 | 19 | {
|
17 | 20 | "comment": "Taken straight from `source.json`",
|
18 | 21 | "begin": ":",
|
|
58 | 61 | "comment": "Setup a `\\G` anchor for ShellScript to use",
|
59 | 62 | "begin": "|",
|
60 | 63 | "end": "(*FAIL)",
|
61 |
| - "patterns": [ { "include": "source.shell" } ] |
| 64 | + "patterns": [ |
| 65 | + { "include": "source.shell" }, |
| 66 | + { |
| 67 | + "begin": "(?!^[ \\t]*+$)(?:(?<=^until | until |\\tuntil |^while | while |\\twhile |^elif | elif |\\telif |^else | else |\\telse |^then | then |\\tthen |^do | do |\\tdo |^if | if |\\tif )|(?<=\"\\G|^|;|\\||&|!|\\(|\\{|`))[ \\t]*+(?!nocorrect\\W|nocorrect\\$|function\\W|function\\$|foreach\\W|foreach\\$|repeat\\W|repeat\\$|logout\\W|logout\\$|coproc\\W|coproc\\$|select\\W|select\\$|while\\W|while\\$|pushd\\W|pushd\\$|until\\W|until\\$|case\\W|case\\$|done\\W|done\\$|elif\\W|elif\\$|else\\W|else\\$|esac\\W|esac\\$|popd\\W|popd\\$|then\\W|then\\$|time\\W|time\\$|for\\W|for\\$|end\\W|end\\$|fi\\W|fi\\$|do\\W|do\\$|in\\W|in\\$|if\\W|if\\$)", |
| 68 | + "end": "(?=;|\\||&|\\n|\\)|`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)", |
| 69 | + "beginCaptures": { }, |
| 70 | + "endCaptures": { }, |
| 71 | + "name": "meta.statement.shell", |
| 72 | + "patterns": [ { "include": "source.shell#typical_statements" } ] |
| 73 | + } |
| 74 | + ] |
62 | 75 | },
|
63 | 76 | { "include": "source.json#stringcontent" }
|
64 | 77 | ]
|
|
91 | 104 | "name": "invalid.illegal.expected-dictionary-separator.json"
|
92 | 105 | }
|
93 | 106 | ]
|
| 107 | + }, |
| 108 | + { |
| 109 | + "match": "[^\\s\\}]", |
| 110 | + "name": "invalid.illegal.expected-dictionary-separator.json" |
94 | 111 | }
|
95 | 112 | ]
|
96 | 113 | }
|
|
0 commit comments