diff --git a/packages/tm-grammars/NOTICE b/packages/tm-grammars/NOTICE index 4716200c..3e89da91 100644 --- a/packages/tm-grammars/NOTICE +++ b/packages/tm-grammars/NOTICE @@ -4611,6 +4611,32 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================================================================================= +Files: json-textmate.json, json-textmate-regex.json +License: https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/LICENSE +SPDX: MIT +--------------------------------------------------------------------------------------------------------- +MIT License + +Copyright (c) 2021-2024 RedCMD + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ========================================================================================================= Files: json5.json License: https://raw.githubusercontent.com/mrmlnc/vscode-json5/master/LICENSE diff --git a/packages/tm-grammars/README.md b/packages/tm-grammars/README.md index e40595d5..38c3b99d 100644 --- a/packages/tm-grammars/README.md +++ b/packages/tm-grammars/README.md @@ -95,12 +95,12 @@ import { grammars } from 'tm-grammars' | `gnuplot` | | [MarioSchwalbe/vscode-gnuplot](https://github.com/MarioSchwalbe/vscode-gnuplot/blob/c62c1a61c9b6b4658b43d76c397dc2ad43523b6a/syntaxes/gnuplot.tmLanguage) | [GPL-3.0](https://raw.githubusercontent.com/MarioSchwalbe/vscode-gnuplot/master/LICENSE) | | | 13.76 kB | | `go` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/9a2c94d213696a4453b6d9988b003d98e7646e75/extensions/go/syntaxes/go.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | | 42.17 kB | | `graphql` | `gql` | [prisma-labs/vscode-graphql](https://github.com/prisma-labs/vscode-graphql/blob/4569aef2364b42b6acd8188e4a6ca9b0ba3c6a1d/grammars/graphql.json) | [MIT](https://raw.githubusercontent.com/graphql/vscode-graphql/master/LICENSE) | | `javascript` `typescript` `jsx` `tsx` | 16.91 kB | -| `groovy` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/8fdf170a0850c1cc027382f31650aaf300d3ae2a/extensions/groovy/syntaxes/groovy.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | | 18.18 kB | -| `hack` | | [slackhq/vscode-hack](https://github.com/slackhq/vscode-hack/blob/2da10a05b70c9aae672f25bc218fe92d44522408/syntaxes/hack.json) | [MIT](https://raw.githubusercontent.com/slackhq/vscode-hack/master/LICENSE.md) | | `html` `sql` | 76.97 kB | -| `haml` | | [karuna/haml-vscode](https://github.com/karuna/haml-vscode/blob/aa45415aefd691af0a501ea4f98e434490623e0d/syntaxes/haml.json) | [MIT](https://raw.githubusercontent.com/karuna/haml-vscode/master/LICENSE.md) | | `ruby` `javascript` `sass` `coffee` `markdown` `css` | 7.55 kB | -| `handlebars` | `hbs` | [microsoft/vscode](https://github.com/microsoft/vscode/blob/45db52ba6bd211cecd03897caee0531350071721/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | `html` `css` `javascript` `yaml` | 11.42 kB | -| `haskell` | `hs` | [octref/language-haskell](https://github.com/octref/language-haskell/blob/ae87982aac2bf5cf6334c067e49c5ec8fc08b871/syntaxes/haskell.json) | [BSD-3-Clause](https://raw.githubusercontent.com/octref/language-haskell/master/LICENSE) | [GitHub Sponsors: **@octref**](https://github.com/sponsors/octref) | | 38.70 kB | -| `haxe` | | [vshaxe/haxe-TmLanguage](https://github.com/vshaxe/haxe-TmLanguage/blob/ddad8b4c6d0781ac20be0481174ec1be772c5da5/haxe.YAML-tmLanguage) | [MIT](https://raw.githubusercontent.com/vshaxe/haxe-TmLanguage/master/LICENSE.md) | | | 33.42 kB | +| `groovy` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/8fdf170a0850c1cc027382f31650aaf300d3ae2a/extensions/groovy/syntaxes/groovy.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | | 18.17 kB | +| `hack` | | [slackhq/vscode-hack](https://github.com/slackhq/vscode-hack/blob/2da10a05b70c9aae672f25bc218fe92d44522408/syntaxes/hack.json) | [MIT](https://raw.githubusercontent.com/slackhq/vscode-hack/master/LICENSE.md) | | `html` `sql` | 76.71 kB | +| `haml` | | [karuna/haml-vscode](https://github.com/karuna/haml-vscode/blob/aa45415aefd691af0a501ea4f98e434490623e0d/syntaxes/haml.json) | [MIT](https://raw.githubusercontent.com/karuna/haml-vscode/master/LICENSE.md) | | `ruby` `javascript` `sass` `coffee` `markdown` `css` | 7.54 kB | +| `handlebars` | `hbs` | [microsoft/vscode](https://github.com/microsoft/vscode/blob/45db52ba6bd211cecd03897caee0531350071721/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | `html` `css` `javascript` `yaml` | 11.40 kB | +| `haskell` | `hs` | [octref/language-haskell](https://github.com/octref/language-haskell/blob/ae87982aac2bf5cf6334c067e49c5ec8fc08b871/syntaxes/haskell.json) | [BSD-3-Clause](https://raw.githubusercontent.com/octref/language-haskell/master/LICENSE) | [GitHub Sponsors: **@octref**](https://github.com/sponsors/octref) | | 38.52 kB | +| `haxe` | | [vshaxe/haxe-TmLanguage](https://github.com/vshaxe/haxe-TmLanguage/blob/7f326b233cf60a1ff1ccee98744da820f7c1c2e0/haxe.YAML-tmLanguage) | [MIT](https://raw.githubusercontent.com/vshaxe/haxe-TmLanguage/master/LICENSE.md) | | | 33.52 kB | | `hcl` | | [hashicorp/syntax](https://github.com/hashicorp/syntax/blob/2ec7cd10c9d6134e836bf85eb0f5aa010512bff4/syntaxes/hcl.tmGrammar.json) | [MPL-2.0](https://raw.githubusercontent.com/hashicorp/syntax/main/LICENSE) | | | 9.49 kB | | `hjson` | | [hjson/textmate-hjson](https://github.com/hjson/textmate-hjson/blob/196075169c9a9f9ab04c8e7423b67ea72c976237/Syntaxes/Hjson.tmLanguage) | [MIT](https://raw.githubusercontent.com/hjson/textmate-hjson/master/LICENSE) | | | 11.40 kB | | `hlsl` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/efa12b2f49ec6ee84ed1e7bbd948808efec452f6/extensions/hlsl/syntaxes/hlsl.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | | 6.88 kB | @@ -116,6 +116,7 @@ import { grammars } from 'tm-grammars' | `jinja` | | [samuelcolvin/jinjahtml-vscode](https://github.com/samuelcolvin/jinjahtml-vscode/blob/be729c88f723602e7b5df2e9dc5e8c016c31c38f/syntaxes/jinja.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/samuelcolvin/jinjahtml-vscode/main/LICENSE) | [GitHub Sponsors: **@samuelcolvin**](https://github.com/sponsors/samuelcolvin) | `jinja-html` | 4.66 kB | | `jison` | | [cdibbs/language-jison](https://github.com/cdibbs/language-jison/blob/9d4cb4b044832320a51fabb6e533fc299425f552/grammars/jison.cson) | [MIT](https://raw.githubusercontent.com/cdibbs/language-jison/master/LICENSE.md) | | `javascript` | 9.12 kB | | `json` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/d6af4893ed9a3545163a4cb748fa5548bd1e51a5/extensions/json/syntaxes/JSON.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | | 2.64 kB | +| `json-textmate` | `JSON TextMate` | [RedCMD/TmLanguage-Syntax-Highlighter](https://github.com/RedCMD/TmLanguage-Syntax-Highlighter/blob/80dc429cccc303ea481e388071bace98e4a82ba1/syntaxes/json.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/LICENSE) | | `json-textmate-regex` | 31.89 kB | | `json5` | | [mrmlnc/vscode-json5](https://github.com/mrmlnc/vscode-json5/blob/e884b89929103ff009322c393080ff45a4544e88/syntaxes/json5.json) | [MIT](https://raw.githubusercontent.com/mrmlnc/vscode-json5/master/LICENSE) | | | 3.05 kB | | `jsonc` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/0adddd82816db666c52038e8277312dc55da2756/extensions/json/syntaxes/JSONC.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | | 2.92 kB | | `jsonl` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/0adddd82816db666c52038e8277312dc55da2756/extensions/json/syntaxes/JSONL.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | | 2.83 kB | @@ -260,6 +261,7 @@ Injections are grammars that are embedded in other grammars. They are used to ag | `es-tag-sql` | | [0x00000001A/es6-string-html](https://github.com/0x00000001A/es6-string-html/blob/b8f51210b53ce64e789949d4be33b7ecb42cf177/syntaxes/es6-inline-sql.json) | [MIT](https://raw.githubusercontent.com/0x00000001A/es6-string-html/master/LICENSE) | [Ko-fi: **26**](https://ko-fi.com/26) | `typescript` `sql` | 1.45 kB | | `es-tag-xml` | | [0x00000001A/es6-string-html](https://github.com/0x00000001A/es6-string-html/blob/b8f51210b53ce64e789949d4be33b7ecb42cf177/syntaxes/es6-inline-xml.json) | [MIT](https://raw.githubusercontent.com/0x00000001A/es6-string-html/master/LICENSE) | [Ko-fi: **26**](https://ko-fi.com/26) | `xml` | 1.04 kB | | `jinja-html` | | [samuelcolvin/jinjahtml-vscode](https://github.com/samuelcolvin/jinjahtml-vscode/blob/64ad369cd167bba2e614944db6d925b7dc6483b4/syntaxes/jinja-html.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/samuelcolvin/jinjahtml-vscode/main/LICENSE) | [GitHub Sponsors: **@samuelcolvin**](https://github.com/sponsors/samuelcolvin) | `html` | 465.00 B | +| `json-textmate-regex` | | [RedCMD/TmLanguage-Syntax-Highlighter](https://github.com/RedCMD/TmLanguage-Syntax-Highlighter/blob/9d0dbcde1a31f5897fbf84803bb0139214f49993/syntaxes/regex.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/LICENSE) | | | 40.56 kB | | `markdown-vue` | | [vuejs/language-tools](https://github.com/vuejs/language-tools/blob/e23ff4d13001ffe78d893bb707d839ead29e0e40/extensions/vscode/syntaxes/markdown-vue.json) | [MIT](https://raw.githubusercontent.com/vuejs/language-tools/master/LICENSE) | [GitHub Sponsors: **@johnsoncodehk**](https://github.com/sponsors/johnsoncodehk) | | 679.00 B | | `vue-directives` | | [vuejs/language-tools](https://github.com/vuejs/language-tools/blob/d5ab9edcf4a18d9c25c143a37cc3ec95229fc6b1/extensions/vscode/syntaxes/vue-directives.json) | [MIT](https://raw.githubusercontent.com/vuejs/language-tools/master/LICENSE) | [GitHub Sponsors: **@johnsoncodehk**](https://github.com/sponsors/johnsoncodehk) | | 366.00 B | | `vue-interpolations` | | [vuejs/language-tools](https://github.com/vuejs/language-tools/blob/ce5623e52a31c99797052727a817d422266f210d/extensions/vscode/syntaxes/vue-interpolations.json) | [MIT](https://raw.githubusercontent.com/vuejs/language-tools/master/LICENSE) | [GitHub Sponsors: **@johnsoncodehk**](https://github.com/sponsors/johnsoncodehk) | | 349.00 B | diff --git a/packages/tm-grammars/grammars/haxe.json b/packages/tm-grammars/grammars/haxe.json index 6f387635..17ef14a8 100644 --- a/packages/tm-grammars/grammars/haxe.json +++ b/packages/tm-grammars/grammars/haxe.json @@ -1538,6 +1538,9 @@ } }, "patterns": [ + { + "include": "#block" + }, { "include": "#block-contents" } diff --git a/packages/tm-grammars/grammars/json-textmate-regex.json b/packages/tm-grammars/grammars/json-textmate-regex.json new file mode 100644 index 00000000..a3e160a6 --- /dev/null +++ b/packages/tm-grammars/grammars/json-textmate-regex.json @@ -0,0 +1,2853 @@ +{ + "displayName": "JSON TextMate Oniguruma Regular Expressions", + "injections": { + "L:capture-group-lookbehind -capture-group-modify-extended -character-class -comment": { + "patterns": [ + { + "include": "#capture-group-lookbehind-invalid" + }, + { + "include": "#absent-invalid" + } + ] + }, + "L:capture-group-lookbehind-extended -capture-group-modify -character-class -comment": { + "patterns": [ + { + "include": "#capture-group-lookbehind-invalid-extended" + }, + { + "include": "#absent-invalid-extended" + } + ] + }, + "L:capture-group-negative-lookbehind -capture-group-modify-extended -character-class -comment": { + "patterns": [ + { + "include": "#capture-group-negative-lookbehind-invalid" + }, + { + "include": "#absent-invalid" + } + ] + }, + "L:capture-group-negative-lookbehind-extended -capture-group-modify -character-class -comment": { + "patterns": [ + { + "include": "#capture-group-negative-lookbehind-invalid-extended" + }, + { + "include": "#absent-invalid-extended" + } + ] + } + }, + "name": "json-textmate-regex", + "patterns": [ + { + "include": "#test" + }, + { + "include": "#dot" + }, + { + "include": "#anchor" + }, + { + "include": "#alternation" + }, + { + "include": "#quantifier" + }, + { + "include": "#character-class" + }, + { + "include": "#groups" + }, + { + "include": "#escapes" + }, + { + "include": "#invalid" + }, + { + "include": "#character-literal" + } + ], + "repository": { + "$self-extended": { + "patterns": [ + { + "include": "#groups-extended" + }, + { + "include": "#comment-extended" + }, + { + "include": "#escape-character-extended" + }, + { + "include": "$self" + } + ] + }, + "_disabled_": { + "//": "https://github.com/kkos/oniguruma/blob/v6.9.8/doc/RE", + "patterns": [ + { + "match": "(*FAIL) !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ " + }, + { + "match": "(*FAIL) \"/\b\f\n\r\t\u0000 " + }, + { + "match": "(*FAIL) \\ \\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\-\\.\\/\\0\\10\\20\\30\\40\\50\\60\\70\\80\\90\\:\\;\\<\\=\\>\\\\\\?\\@\\A\\B\\C- \\D\\E\\F\\G\\H\\I\\J\\K\\L\\M-a\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\\[\\\\\\]\\^\\_\\`\\a\\b\\c]\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u0000\\v\\w\\x\\y\\z\\{\\|\\}\\~ " + }, + { + "match": "(*FAIL) \\\"\\/\\\b\\\f\\\n\\\r\\\t\\\u0000 " + }, + { + "match": "(*FAIL) \\\\ " + }, + { + "match": "(*FAIL) (?x).{2,3}{2,3}(.{2,3}(?:.{2,3})){2,3}{,3}{2,}{2} {000} *{0} {0}* *{0}* {0}{0}{0} {0}{2,3} {2,3}{0}{2,3} {2,3\\} " + }, + { + "match": "(*FAIL) () (?<= (= (?> (=)? ) )? ) (?= (?= ) ) " + }, + { + "match": "(*FAIL) \\x \\x00 \\xFF \\x{} \\x{k} \\x\\{123} \\x{00000000 0013FFFF} [\\x{42 001FFFFF 48}-\\x{FFFFFFFF \n 45}] " + }, + { + "match": "(*FAIL) \\o{} \\o{k} \\o\\{123} \\o{00000000000 00004777777} [\\o{102 00004777777 110}-\\o{37777777777 105}] " + }, + { + "match": "(*FAIL) [a-z&&]u°𐐷Ꚛ�𐀀𐃘[�𐃘]®×ñÿ¡¼÷€Çô│╨ε■ ‚‚ Ȁ°Ççë£ ÿ[[:^upper:]] " + }, + { + "match": "(*FAIL) \\g<0>? \\x555 \\x{201E} \\p{L} \\p{L etter------} " + }, + { + "match": "(*FAIL) (?~a) (?{foo}) " + }, + { + "match": "(*FAIL) QabcE $ \\$ an{name}bc At aT aa abc abd cd a1 b a1b n1000 Q.E q.e test ab$abc " + }, + { + "match": "(*FAIL) (?x)#comment\n \\# abc (?-x)#notcomment\n \\# abc " + }, + { + "match": "(*FAIL) (?<_azAZ0-9 #$('°>) (?<_azAZ0>) (?(<_azAZ0-9>)true|false) \\g<_azAZ0-9 #$('°> \\k<_azAZ0-9> " + }, + { + "match": "(*FAIL) (){0}[[:word:]]\\g<1>\\k'1' (( (){0}[[:word:]]\\g<1>\\k'1' )) " + }, + { + "include": "#_disabled_" + } + ] + }, + "absent": { + "begin": "\\G(\\()(\\?~\\|?)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "patterns": [ + { + "begin": "(?<=\\|)\\G", + "end": "\\||(?=[)\"])", + "endCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "$self" + } + ] + }, + "absent-extended": { + "begin": "\\G(\\()(\\?~\\|?)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "patterns": [ + { + "begin": "(?<=\\|)\\G", + "end": "\\||(?=\")", + "endCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "patterns": [ + { + "include": "#$self-extended" + } + ] + }, + { + "include": "#$self-extended" + } + ] + }, + "absent-invalid": { + "begin": "\\G(\\()(\\?~\\|)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "end": "(?!\\G)\\)|(?<=\\))|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\|)|(\\))|(?=\")", + "endCaptures": { + "1": { + "name": "support.function.tm" + }, + "2": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "$self" + } + ] + }, + "absent-invalid-extended": { + "begin": "\\G(\\()(\\?~\\|)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "end": "(?!\\G)\\)|(?<=\\))|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\|)|(\\))|(?=\")", + "endCaptures": { + "1": { + "name": "support.function.tm" + }, + "2": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "patterns": [ + { + "include": "#$self-extended" + } + ] + }, + { + "include": "#$self-extended" + } + ] + }, + "alternation": { + "captures": { + "0": { + "name": "keyword.control.tm" + }, + "1": { + "name": "invalid.illegal.tm regex" + } + }, + "match": "\\|([+*?]|\\{(?>[0-9]+,?[0-9]*|,[0-9]+)})?" + }, + "anchor": { + "captures": { + "0": { + "name": "variable.tm" + }, + "1": { + "name": "invalid.illegal.tm regex" + } + }, + "match": "[$^]([+*?]|\\{(?>[0-9]+,?[0-9]*|,[0-9]+)})?" + }, + "backreference": { + "patterns": [ + { + "captures": { + "1": { + "name": "string.regexp.tm" + }, + "2": { + "name": "constant.numeric.tm" + }, + "3": { + "name": "invalid.illegal.tm" + } + }, + "match": "\\G(\\\\{2})([1-9][0-9]{2,0})([0-9]*)" + }, + { + "begin": "\\G(\\\\{2}k)((<)|')", + "beginCaptures": { + "1": { + "name": "string.regexp.tm" + }, + "2": { + "name": "constant.character.set.regexp.tm" + } + }, + "end": "(?!\\3)>|(?=\\3)'|(?=[)\"])", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "patterns": [ + { + "include": "#backreference-name" + } + ] + } + ] + }, + "backreference-name": { + "patterns": [ + { + "captures": { + "1": { + "name": "invalid.illegal.tm" + } + }, + "match": "(?<=\\w)[+-]0*+(?>2(?>0[0-9]{8}|1(?>[0-3][0-9]{7}|4(?>[0-6][0-9]{6}|7(?>[0-3][0-9]{5}|4(?>[0-7][0-9]{4}|8(?>[0-2][0-9]{3}|3(?>[0-5][0-9]{2}|6(?>[0-3][0-9]|4[0-7]))))))))|1?+[0-9]{9,0})(\\w*+)", + "name": "constant.numeric.tm" + }, + { + "captures": { + "1": { + "name": "invalid.illegal.tm" + } + }, + "match": "[+-]?+0*+[1-9][0-9]{2,0}(\\w*+)", + "name": "constant.numeric.tm" + }, + { + "match": "(?!0)\\w++", + "name": "markup.bold.tm" + }, + { + "include": "source.json.textmate#escape-characters" + }, + { + "match": ".[^\\\\\"'>\\w+-]*", + "name": "invalid.illegal.tm" + } + ] + }, + "callout": { + "patterns": [ + { + "captures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "10": { + "name": "support.function.tm" + }, + "11": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "12": { + "name": "markup.bold" + }, + "13": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "14": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "support.function.tm" + }, + "3": { + "name": "support.function.tm" + }, + "4": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "5": { + "name": "regex", + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + }, + "6": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "7": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "8": { + "name": "support.function.tm" + }, + "9": { + "patterns": [ + { + "match": "\\W+|[0-9]+", + "name": "invalid.illegal.tm markup.underline regex" + }, + { + "match": "\\w+", + "name": "markup.bold" + } + ] + } + }, + "match": "\\G(\\()(\\?)(\\{(?:\\g<3>|(\\{)?(.*?[^}])?(})?)})([^\\[)]*)(?>(\\[)([^\\]]*)(]))?([^X<>)]*)([X<>])?([^)]*)(\\))" + }, + { + "captures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "10": { + "name": "regex", + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + }, + "11": { + "name": "support.function.tm" + }, + "12": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "13": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "14": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "2": { + "name": "support.function.tm" + }, + "3": { + "name": "markup.bold" + }, + "4": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "5": { + "name": "support.function.tm" + }, + "6": { + "patterns": [ + { + "match": "\\W+|[0-9]+", + "name": "invalid.illegal.tm markup.underline regex" + }, + { + "match": "\\w+", + "name": "markup.bold" + } + ] + }, + "7": { + "name": "support.function.tm" + }, + "8": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "9": { + "name": "support.function.tm" + } + }, + "match": "\\G(\\()(\\*)([A-Za-z_]\\w*+)([^\\[{)]*+)(?>(\\[)([^\\]]*+)(]))?+([^{)]*+)(?>(\\{)([^}]*+)(}))?+([^)]*+)(\\))([+*?]|\\{(?>[0-9]++,?+[0-9]*+|,[0-9]++)})?+" + } + ] + }, + "capture-group": { + "begin": "\\G\\(", + "captures": { + "0": { + "name": "constant.character.set.regexp.tm strong" + } + }, + "end": "\\)|(?=\")", + "patterns": [ + { + "include": "$self" + } + ] + }, + "capture-group-comment": { + "begin": "\\G(\\()(\\?#)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "support.function.tm" + } + }, + "contentName": "comment.tm", + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm markup.italic" + } + }, + "patterns": [ + { + "captures": { + "1": { + "name": "constant.character.escape.json.tm" + } + }, + "match": "(\\\\{2})\\)" + }, + { + "include": "source.json.textmate#escape-characters" + } + ] + }, + "capture-group-conditional": { + "begin": "\\G(?=\\(\\?\\()(\\()(\\?)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "name": "meta.group.capture.conditional.tm", + "patterns": [ + { + "begin": "\\G\\((?=[<'])", + "captures": { + "0": { + "name": "constant.character.set.regexp.tm markup.italic" + } + }, + "end": "\\)|(?=\")", + "name": "meta.group.capture.conditional.name.tm", + "patterns": [ + { + "begin": "\\G(?>(<)|')", + "captures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "(?!\\1)>|(?=\\1)'|(?=[)\"])", + "patterns": [ + { + "include": "#backreference-name" + } + ] + }, + { + "include": "source.json.textmate#escape-characters" + }, + { + "match": ".[^\\\\\"'>\\w+-]*+", + "name": "invalid.illegal.tm" + } + ] + }, + { + "captures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "constant.numeric.tm" + }, + "3": { + "name": "punctuation.definition.tag.tm" + }, + "4": { + "name": "invalid.illegal.tm" + }, + "5": { + "name": "invalid.illegal.tm" + }, + "6": { + "name": "punctuation.definition.tag.tm" + }, + "8": { + "name": "constant.character.set.regexp.tm markup.italic" + } + }, + "match": "\\G(\\()((?>[+-](?=0*[1-9]))?(0*)(?=\\g\\b)(?>[1-9][0-9]{0,2}([0-9]*)|(0))(?>[+-](0*)(?2(?>0[0-9]{8}|1(?>[0-3][0-9]{7}|4(?>[0-6][0-9]{6}|7(?>[0-3][0-9]{5}|4(?>[0-7][0-9]{4}|8(?>[0-2][0-9]{3}|3(?>[0-5][0-9]{2}|6(?>[0-3][0-9]|4[0-7]))))))))|1?[0-9]{1,9}))?)(\\))", + "name": "meta.group.capture.conditional.reference.tm" + }, + { + "begin": "\\G\\((?!\\?\\{|\\*)", + "captures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "end": "\\)|(?=\")", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\|", + "beginCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "(?=[)\"])", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "$self" + } + ] + }, + "capture-group-conditional-extended": { + "begin": "\\G(?=\\(\\?\\()(\\()(\\?)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "name": "meta.group.capture.conditional.extended.tm", + "patterns": [ + { + "begin": "\\G\\((?=[<'])", + "captures": { + "0": { + "name": "constant.character.set.regexp.tm markup.italic" + } + }, + "end": "\\)|(?=\")", + "name": "meta.group.capture.conditional.name.tm", + "patterns": [ + { + "begin": "\\G(?>(<)|')", + "captures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "(?!\\1)>|(?=\\1)'|(?=[)\"])", + "patterns": [ + { + "include": "#backreference-name" + } + ] + }, + { + "include": "source.json.textmate#escape-characters" + }, + { + "match": ".[^\\\\\"'>\\w+-]*", + "name": "invalid.illegal.tm" + } + ] + }, + { + "captures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "constant.numeric.tm" + }, + "3": { + "name": "punctuation.definition.tag.tm" + }, + "4": { + "name": "invalid.illegal.tm" + }, + "5": { + "name": "invalid.illegal.tm" + }, + "6": { + "name": "punctuation.definition.tag.tm" + }, + "8": { + "name": "constant.character.set.regexp.tm markup.italic" + } + }, + "match": "\\G(\\()((?>[+-](?=0*[1-9]))?(0*)(?=\\g\\b)(?>[1-9][0-9]{0,2}([0-9]*)|(0))(?>[+-](0*)(?2(?>0[0-9]{8}|1(?>[0-3][0-9]{7}|4(?>[0-6][0-9]{6}|7(?>[0-3][0-9]{5}|4(?>[0-7][0-9]{4}|8(?>[0-2][0-9]{3}|3(?>[0-5][0-9]{2}|6(?>[0-3][0-9]|4[0-7]))))))))|1?[0-9]{1,9}))?)(\\))", + "name": "meta.group.capture.conditional.reference.tm" + }, + { + "begin": "\\G\\((?!\\?\\{|\\*)", + "captures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "end": "\\)|(?=\")", + "patterns": [ + { + "include": "#$self-extended" + } + ] + }, + { + "begin": "\\|", + "beginCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "(?=[)\"])", + "patterns": [ + { + "include": "#$self-extended" + } + ] + }, + { + "include": "#$self-extended" + } + ] + }, + "capture-group-extended": { + "begin": "\\G\\(", + "captures": { + "0": { + "name": "constant.character.set.regexp.tm strong" + } + }, + "end": "\\)|(?=\")", + "patterns": [ + { + "include": "#$self-extended" + } + ] + }, + "capture-group-lookahead": { + "begin": "\\G(\\()(\\?[!=])", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "support.function.tm" + } + }, + "end": "(\\))([+*?]|\\{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "endCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + "capture-group-lookahead-extended": { + "begin": "\\G(\\()(\\?[!=])", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "support.function.tm" + } + }, + "end": "(\\))([+*?]|\\{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "endCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "patterns": [ + { + "include": "#$self-extended" + } + ] + }, + "capture-group-lookbehind": { + "begin": "\\G(\\()(\\?<=)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "support.function.tm regex" + } + }, + "contentName": "capture-group-lookbehind", + "end": "(\\))([+*?]|\\{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "endCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "patterns": [ + { + "include": "#capture-group-lookbehind-invalid" + }, + { + "include": "#absent-invalid" + }, + { + "include": "$self" + } + ] + }, + "capture-group-lookbehind-extended": { + "begin": "\\G(\\()(\\?<=)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "support.function.tm regex" + } + }, + "contentName": "capture-group-lookbehind-extended", + "end": "(\\))([+*?]|\\{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "endCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "patterns": [ + { + "include": "#capture-group-lookbehind-invalid-extended" + }, + { + "include": "#absent-invalid-extended" + }, + { + "include": "#$self-extended" + } + ] + }, + "capture-group-lookbehind-invalid": { + "begin": "\\G\\(\\?([+*?]|\\{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "patterns": [ + { + "include": "#capture-group-lookbehind-invalid" + }, + { + "include": "#absent-invalid" + }, + { + "include": "$self" + } + ] + }, + "capture-group-lookbehind-invalid-extended": { + "begin": "\\G\\(\\?([+*?]|\\{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "patterns": [ + { + "include": "#capture-group-lookbehind-invalid-extended" + }, + { + "include": "#absent-invalid-extended" + }, + { + "include": "#$self-extended" + } + ] + }, + "capture-group-modify": { + "patterns": [ + { + "match": "\\G\\(\\?-+:?\\)", + "name": "punctuation.definition.tag.tm" + }, + { + "begin": "(?<=\")\\G(?>(\\((?=[^:)]++:))|(\\())(\\?)(?=[IimxWDSPy])(?=[^-I:)]*+I)(?=[^x:)]++[:)]|[^-:)]*+-[^x:)]*+x)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "3": { + "name": "support.function.tm" + } + }, + "end": "(?=\")", + "name": "capture-group-modify-whole", + "patterns": [ + { + "begin": "(?<=\\?)\\G", + "end": "(?=[):\"])", + "patterns": [ + { + "match": "I(?=[^-I:)]*I)", + "name": "punctuation.definition.tag.tm" + }, + { + "match": "I", + "name": "support.function.tm" + }, + { + "include": "#capture-group-modify-options" + } + ] + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "(?=\")", + "patterns": [ + { + "begin": "\\G(?!\\))", + "beginCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "end": "(?=\\))", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\)", + "beginCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "contentName": "invalid.illegal.tm markup.underline.tm", + "end": "(?=\")", + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + } + ] + }, + { + "begin": "\\)", + "beginCaptures": { + "0": { + "name": "constant.character.set.regexp.tm markup.italic" + } + }, + "end": "(?=\")", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + { + "begin": "\\G(?=\\(\\?[-IimxWDSPy])(?>(\\((?=[^:)]++:))|(\\())(\\?)(?=[^x:)]++[:)]|[^-:)]*+-[^x:)]*+x[^:)]*+[:)])", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "3": { + "name": "support.function.tm" + } + }, + "end": "(?!\\1)\\)|(?=\\1)(?=\\))|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "name": "capture-group-modify", + "patterns": [ + { + "begin": "(?<=\\?)\\G", + "end": "(:)|(\\))", + "endCaptures": { + "1": { + "name": "support.function.tm" + }, + "2": { + "name": "constant.character.set.regexp.tm markup.italic" + } + }, + "patterns": [ + { + "include": "#capture-group-modify-options" + } + ] + }, + { + "begin": "(?<=[:)])(?![)\"])", + "end": "(?=[)\"])", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + } + ] + }, + "capture-group-modify-extended": { + "patterns": [ + { + "match": "\\G\\(\\?-+:?\\)", + "name": "punctuation.definition.tag.tm" + }, + { + "begin": "\\G(?=\\(\\?[-IimxWDSPy])(?>(\\((?=[^:)]++:))|(\\())(\\?)(?=[^-:)]*+[^x:)]*+[:)])", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "3": { + "name": "support.function.tm" + } + }, + "end": "(?!\\1)\\)|(?=\\1)(?=\\))|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "name": "capture-group-modify-extended", + "patterns": [ + { + "begin": "(?<=\\?)\\G", + "end": "(:)|(\\))", + "endCaptures": { + "1": { + "name": "support.function.tm" + }, + "2": { + "name": "constant.character.set.regexp.tm markup.italic" + } + }, + "patterns": [ + { + "include": "#capture-group-modify-options" + } + ] + }, + { + "begin": "(?<=[:)])(?![)\"])", + "end": "(?=[)\"])", + "patterns": [ + { + "include": "#$self-extended" + } + ] + } + ] + } + ] + }, + "capture-group-modify-options": { + "patterns": [ + { + "match": "([imxWDSP]|y\\{[gw]})(?=[^:)]*?\\1)", + "name": "punctuation.definition.tag.tm" + }, + { + "begin": "-", + "beginCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "(?=[:)\"])", + "patterns": [ + { + "match": "-+", + "name": "punctuation.definition.tag.tm" + }, + { + "match": "y\\{[gw]}", + "name": "invalid.illegal.tm markup.underline" + }, + { + "include": "#capture-group-modify-options" + } + ] + }, + { + "match": "[imxWDSP]|y\\{[gw]}", + "name": "support.function.tm" + }, + { + "match": ".[^-IimxWDSPy{gw}:)]*", + "name": "invalid.illegal.tm markup.underline" + } + ] + }, + "capture-group-name": { + "begin": "\\G(\\()(\\?[<'])", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm strong" + }, + "2": { + "name": "support.function.tm" + } + }, + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm strong" + } + }, + "name": "meta.group.capture.named.tm", + "patterns": [ + { + "include": "#capture-group-name-name" + }, + { + "include": "$self" + } + ] + }, + "capture-group-name-extended": { + "begin": "\\G(\\()(\\?[<'])", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm strong" + }, + "2": { + "name": "support.function.tm" + } + }, + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm strong" + } + }, + "name": "capture-group-name", + "patterns": [ + { + "include": "#capture-group-name-name" + }, + { + "include": "#$self-extended" + } + ] + }, + "capture-group-name-name": { + "patterns": [ + { + "begin": "(?<=<)\\G[0-9[^\\w)>\"]]*", + "beginCaptures": { + "0": { + "name": "invalid.illegal.tm regex" + } + }, + "contentName": "markup.bold regex", + "end": ">|(?=[)\"])", + "endCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + }, + { + "begin": "(?<=')\\G[0-9[^\\w)'\"]]*", + "beginCaptures": { + "0": { + "name": "invalid.illegal.tm regex" + } + }, + "contentName": "markup.bold regex", + "end": "'|(?=[)\"])", + "endCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + } + ] + }, + "capture-group-negative-lookbehind": { + "begin": "\\G(\\()(\\?[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "endCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "patterns": [ + { + "include": "#capture-group-negative-lookbehind-invalid" + }, + { + "include": "#absent-invalid" + }, + { + "include": "$self" + } + ] + }, + "capture-group-negative-lookbehind-extended": { + "begin": "\\G(\\()(\\?[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "endCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "patterns": [ + { + "include": "#capture-group-negative-lookbehind-invalid-extended" + }, + { + "include": "#absent-invalid-extended" + }, + { + "include": "#$self-extended" + } + ] + }, + "capture-group-negative-lookbehind-invalid": { + "patterns": [ + { + "begin": "\\G\\(\\?[!=]", + "captures": { + "0": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "end": "\\)(?>[+*?]|\\{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\G\\((?!\\?[-~<>=:!{(|IimxWDSPy]|\\*[A-Za-z_])", + "captures": { + "0": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "end": "\\)|(?=\")", + "patterns": [ + { + "include": "#capture-group-negative-lookbehind-invalid-extended" + }, + { + "include": "#absent-invalid-extended" + }, + { + "include": "#$self-extended" + } + ] + } + ] + }, + "capture-group-negative-lookbehind-invalid-extended": { + "patterns": [ + { + "begin": "\\G\\(\\?[!=]", + "captures": { + "0": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "end": "\\)(?>[+*?]|\\{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "patterns": [ + { + "include": "#capture-group-negative-lookbehind-invalid-extended" + }, + { + "include": "#absent-invalid-extended" + }, + { + "include": "#$self-extended" + } + ] + }, + { + "begin": "\\G\\((?!\\?[-~<>=:!{(|IimxWDSPy]|\\*[A-Za-z_])", + "captures": { + "0": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "end": "\\)|(?=\")", + "patterns": [ + { + "include": "#capture-group-negative-lookbehind-invalid-extended" + }, + { + "include": "#absent-invalid-extended" + }, + { + "include": "#$self-extended" + } + ] + } + ] + }, + "character-class": { + "begin": "(\\[)(\\^)?", + "beginCaptures": { + "1": { + "name": "support.class.tm" + }, + "2": { + "name": "support.function.tm strong" + } + }, + "contentName": "character-class", + "end": "(?!\\G)]|(?=\")", + "endCaptures": { + "0": { + "name": "support.class.tm" + } + }, + "patterns": [ + { + "include": "#character-class-range" + }, + { + "include": "#character-class-escape" + }, + { + "begin": "(?=\\[)", + "end": "(?!\\G)", + "patterns": [ + { + "include": "#character-class-posix" + }, + { + "include": "#character-class" + } + ] + }, + { + "include": "#character-class-literal" + } + ] + }, + "character-class-code-point": { + "patterns": [ + { + "begin": "\\G\\\\{2}o\\{(?=[0-7])", + "captures": { + "0": { + "name": "punctuation.definition.list.begin.markdown.tm" + } + }, + "end": "}|(?=\")", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.tag.tm" + }, + "2": { + "name": "constant.numeric.tm" + }, + "3": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "match": "(0{0,10}+)([0-7]{1,7})(?[^\\]\\x00-\\x1F\"\\&:\\[\\\\\\x7F-]+(?!-))?", + "name": "literal.tm regex" + }, + "character-class-posix": { + "patterns": [ + { + "match": "\\G\\[:\\^?:]", + "name": "posix.tm invalid.illegal.tm" + }, + { + "begin": "\\G\\[:\\^?(?=[^\\]:]{0,20}(?(?alnum|alpha|ascii|blank|cntrl|x?digit|graph|lower|print|punct|space|upper|word)|((?i)\\g))" + }, + { + "match": "[^\\]:]+", + "name": "invalid.illegal.regex.tm" + } + ] + }, + { + "begin": "\\G\\[:(?=(?~(?\\\\{2}*+\"|\\\\{4}*+]))(?>$|(?alnum|alpha|ascii|blank|cntrl|x?digit|graph|lower|print|punct|space|upper|word)", + "name": "invalid.illegal.tm markup.italic" + }, + { + "match": ":", + "name": "support.function.tm markup.italic" + }, + { + "captures": { + "1": { + "name": "constant.character.escape.tm" + }, + "2": { + "name": "support.function.tm markup.italic regex" + } + }, + "match": "(\\\\{2})(])" + }, + { + "include": "#character-class-range" + }, + { + "include": "#character-class-code-point" + }, + { + "include": "#character-class-escape" + }, + { + "include": "#character-class-posix" + }, + { + "include": "#character-class-literal" + } + ] + } + ] + }, + "character-class-range": { + "patterns": [ + { + "captures": { + "1": { + "name": "character-class-range.tm invalid.illegal.tm regex" + }, + "2": { + "name": "punctuation.definition.tag.tm" + } + }, + "match": "([\\\\-\\x{10FFFF}]-(?!&&)[\\x00-Z]|[+-\\x{10FFFF}]-(?!&&)[\\x00-*])(\\\\{2}(?=-))?" + }, + { + "captures": { + "1": { + "name": "character-class-range.tm support.class.tm" + }, + "2": { + "name": "punctuation.definition.tag.tm strong" + }, + "3": { + "name": "punctuation.definition.tag.tm" + } + }, + "match": "(\\*(-)\\+)(\\\\{2}(?=-))?" + }, + { + "captures": { + "1": { + "name": "character-class-range.tm constant.numeric.tm" + }, + "2": { + "name": "strong" + }, + "3": { + "name": "punctuation.definition.tag.tm" + } + }, + "match": "([0-9](-)[0-9])(\\\\{2}(?=-))?" + }, + { + "captures": { + "1": { + "name": "character-class-range.tm variable.other.enummember.tm" + }, + "2": { + "name": "strong" + }, + "3": { + "name": "punctuation.definition.tag.tm" + } + }, + "match": "([A-Z](-)[A-Z])(\\\\{2}(?=-))?" + }, + { + "captures": { + "1": { + "name": "character-class-range.tm variable.other.enummember.tm" + }, + "2": { + "name": "strong" + }, + "3": { + "name": "punctuation.definition.tag.tm" + } + }, + "match": "([a-z](-)[a-z])(\\\\{2}(?=-))?" + }, + { + "captures": { + "1": { + "name": "keyword.control.tm" + }, + "2": { + "name": "punctuation.definition.tag.tm" + } + }, + "match": "(&&)(\\\\{2}(?=-))?" + }, + { + "//": "TODO: Convert to `begin`/`end` for better performance", + "captures": { + "0": { + "name": "character-class-range.tm support.class.tm regex" + }, + "1": { + "name": "punctuation.definition.tag.tm" + }, + "10": { + "name": "punctuation.definition.tag.tm" + }, + "2": { + "name": "constant.character.escape.tm" + }, + "3": { + "name": "strong" + }, + "4": { + "name": "punctuation.definition.tag.tm" + }, + "5": { + "name": "constant.character.escape.tm" + }, + "6": { + "patterns": [ + { + "include": "#character-class-range-code-point" + } + ] + }, + "7": { + "name": "constant.character.escape.tm" + }, + "8": { + "name": "invalid.illegal.tm regex" + }, + "9": { + "name": "support.class.tm regex", + "patterns": [ + { + "include": "#character-class-escape" + } + ] + } + }, + "match": "\\G(?>(\\\\{2})?[\\]-]|(?(\\\\{2})-|(\\\\{3})\\\\|((?>\\\\{2}(?>c|[CM]-))+(?>\\\\u.{4}|\\\\{0,3}.)|\\\\{2}(?>x\\{\\h[^}]*}|o\\{[0-7][^}]*}|x\\h{0,2}|[0-7]{1,3})|\\\\{1,2}u.{0,4})|(\\\\{2})[\\]\\[-]|(\\\\{2}(?i:[DHSW]|p\\{[^}]*})|\\[:[^\\]]+:])|(\\\\{1,2}[^\\\\u])|[^\\]\\[\\\\])(\\\\{2}(?=-))?" + }, + { + "begin": "(?=(((?>\\\\{4}|(?>\\\\{2}(?>c|[CM]-))+(?>\\\\u.{4}|\\\\{0,3}.)|\\\\{2}(?>x\\{\\h[^}]*}|o\\{[0-7][^}]*}|x\\h{0,2}|[0-7]{1,3}|p\\{[^}]*})|\\\\{1,2}u.{0,4}|\\\\{1,2}[^\\\\u]|\\[:[^\\]]+:]|[^\\]\\[\\\\]))-(?!&&)\\g<2>))-?", + "beginCaptures": { + "0": { + "name": "support.class.tm" + } + }, + "end": "(?<=\\1)(?!\\G)(?>\\\\{2}(?=-))?", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.tm" + } + }, + "name": "character-class-range.tm", + "patterns": [ + { + "begin": "-", + "beginCaptures": { + "0": { + "name": "support.class.tm strong" + } + }, + "end": "(?<=-\\\\{2})(.)|(?!\\G)|(\\\\{3})(\\\\)|(\\\\{2})([\\]\\[])|(\\\\{2})([-:^])|(\\\\{2}(?i:[DHSW]|p\\{[^}]*})|\\[:[^\\]]+:])|(\\\\{1,2})(/)|([^\\]\\[\\\\])", + "endCaptures": { + "1": { + "name": "support.class.tm regex" + }, + "10": { + "name": "support.class.tm" + }, + "11": { + "name": "support.class.tm regex" + }, + "2": { + "name": "constant.character.escape.tm" + }, + "3": { + "name": "support.class.tm" + }, + "4": { + "name": "constant.character.escape.tm" + }, + "5": { + "name": "support.class.tm regex" + }, + "6": { + "name": "punctuation.definition.tag.tm" + }, + "7": { + "name": "support.class.tm regex" + }, + "8": { + "name": "invalid.illegal.tm" + }, + "9": { + "name": "punctuation.definition.tag.tm" + } + }, + "patterns": [ + { + "include": "#character-class-range-code-point" + }, + { + "include": "#character-class-escape" + } + ] + }, + { + "begin": "\\G", + "end": "(\\\\{3})(\\\\)|(\\\\{2})([\\]\\[-])|(\\\\{2})([:^])|(\\\\{2}(?i:[DHSW]|p\\{[^}]*})|\\[:[^\\]]+:])|(\\\\{1,2})(/)|([^\\]\\[\\\\-])|(?=-)", + "endCaptures": { + "1": { + "name": "constant.character.escape.tm" + }, + "10": { + "name": "support.class.tm regex" + }, + "2": { + "name": "support.class.tm" + }, + "3": { + "name": "constant.character.escape.tm" + }, + "4": { + "name": "support.class.tm regex" + }, + "5": { + "name": "punctuation.definition.tag.tm" + }, + "6": { + "name": "support.class.tm" + }, + "7": { + "name": "invalid.illegal.tm" + }, + "8": { + "name": "punctuation.definition.tag.tm" + }, + "9": { + "name": "support.class.tm" + } + }, + "patterns": [ + { + "include": "#character-class-code-point" + }, + { + "include": "#character-class-escape" + } + ] + } + ] + } + ] + }, + "character-class-range-code-point": { + "patterns": [ + { + "begin": "(\\\\{2}o\\{)(0{0,10}+)(3?[0-7]{1,10})(?(\\h{4})|([^\"].{3,0}))" + }, + { + "captures": { + "1": { + "name": "constant.character.escape.tm" + }, + "2": { + "name": "constant.numeric.json.tm" + }, + "3": { + "name": "constant.numeric.tm", + "patterns": [ + { + "match": "\\H+", + "name": "invalid.illegal.regex.tm" + } + ] + } + }, + "match": "\\G(\\\\u)(?>(\\h{4})|([^\"].{3,0}))" + }, + { + "captures": { + "0": { + "name": "punctuation.definition.list.begin.markdown.tm" + }, + "2": { + "name": "invalid.illegal.tm regex" + }, + "3": { + "name": "constant.character.escape.tm" + }, + "4": { + "name": "markup.bold" + }, + "5": { + "name": "punctuation.definition.tag.tm" + }, + "6": { + "name": "markup.bold regex", + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + } + }, + "match": "\\G(\\\\{2}(?>c|[CM](?>-|(.))?+)(?>(\\\\{3})(\\\\)|\\g<1>|(\\\\{2})?+(\\\\u.{4,0}|\\\\?+.))?+)" + }, + { + "//": "[pP] degrades performance :shrug:", + "begin": "\\G(\\\\{2}p\\{)(\\^)?", + "beginCaptures": { + "1": { + "name": "variable.language.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "end": "}|$|(?=[(){|\"])", + "endCaptures": { + "0": { + "name": "variable.language.tm" + } + }, + "name": "unicode.properties.tm", + "patterns": [ + { + "match": "[a-zA-Z1]+", + "name": "variable.other.enummember.tm" + }, + { + "match": "[ _-]+", + "name": "comment.tm" + }, + { + "match": "[^\"(){}|a-zA-Z1 _-]+", + "name": "invalid.illegal.regex.tm" + } + ] + }, + { + "//": "[pP] degrades performance :shrug:", + "begin": "\\G(\\\\{2}P\\{)(\\^)?", + "beginCaptures": { + "1": { + "name": "variable.language.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "end": "}|$|(?=[(){|\"])", + "endCaptures": { + "0": { + "name": "variable.language.tm" + } + }, + "name": "unicode.properties.tm", + "patterns": [ + { + "match": "[a-zA-Z1]+", + "name": "variable.other.enummember.tm" + }, + { + "match": "[ _-]+", + "name": "comment.tm" + }, + { + "match": "[^\"(){}|a-zA-Z1 _-]+", + "name": "invalid.illegal.regex.tm" + } + ] + } + ] + }, + "code-point-sequence-separator": { + "patterns": [ + { + "match": " +" + }, + { + "match": "\\\\n", + "name": "constant.character.escape.tm" + }, + { + "captures": { + "1": { + "name": "constant.character.escape.tm" + }, + "2": { + "name": "constant.numeric.tm" + } + }, + "match": "(\\\\u)(00(?:20|0[aA]))" + } + ] + }, + "comment-extended": { + "patterns": [ + { + "match": " +", + "name": "comment.tm" + }, + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "\\\\n|(?=\")|$", + "endCaptures": { + "0": { + "name": "constant.character.escape.tm" + } + }, + "name": "comment.tm", + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + } + ] + }, + "dot": { + "match": "\\.", + "name": "variable.other.enummember.tm" + }, + "escape-character": { + "patterns": [ + { + "captures": { + "1": { + "name": "constant.character.escape.tm" + }, + "2": { + "name": "entity.name.label.tm strong" + } + }, + "match": "\\G(\\\\{3})(\\\\)" + }, + { + "begin": "\\G\\\\{2}(?=\\{(?>[0-9]+\\\\{2}?,?[0-9]*|\\\\{2}?,?[0-9]+)\\\\{2}?})", + "beginCaptures": { + "0": { + "name": "constant.character.escape.tm" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "include": "#character-literal" + } + ] + }, + { + "captures": { + "1": { + "name": "constant.character.escape.tm" + }, + "2": { + "name": "entity.name.label.tm strong regex" + } + }, + "match": "\\G(\\\\{2})([\\[()$?|^*+.])" + }, + { + "match": "\\G\\\\(\\\\|(?=/))", + "name": "punctuation.definition.tag.tm" + }, + { + "match": "\\G\\\\\"", + "name": "string.tm" + }, + { + "match": "\\G\\\\[bfnrt]", + "name": "constant.character.escape.tm" + }, + { + "match": "\\G\\\\.?", + "name": "invalid.illegal.tm regex" + } + ] + }, + "escape-character-extended": { + "captures": { + "1": { + "name": "constant.character.escape.tm" + }, + "2": { + "name": "entity.name.label.tm strong" + } + }, + "match": "(\\\\{2})([# ])" + }, + "escaped-anchor": { + "captures": { + "0": { + "name": "variable.tm" + }, + "1": { + "name": "invalid.illegal.tm regex" + } + }, + "match": "\\G\\\\{2}[ABbGKYyZz]([+*?]|\\{(?>[0-9]+,?[0-9]*|,[0-9]+)})?" + }, + "escapes": { + "begin": "(?=\\\\)", + "end": "(?!\\G)", + "patterns": [ + { + "include": "#character-types" + }, + { + "include": "#character-types-2" + }, + { + "include": "#characters" + }, + { + "include": "#escaped-anchor" + }, + { + "include": "#subroutine" + }, + { + "include": "#backreference" + }, + { + "include": "#code-point" + }, + { + "include": "#escape-character" + } + ] + }, + "groups": { + "begin": "(?=\\()", + "end": "(?!\\G)", + "patterns": [ + { + "include": "#absent" + }, + { + "include": "#callout" + }, + { + "include": "#non-capture-group" + }, + { + "include": "#capture-group-modify" + }, + { + "include": "#capture-group-modify-extended" + }, + { + "include": "#capture-group-conditional" + }, + { + "include": "#capture-group-negative-lookbehind" + }, + { + "include": "#capture-group-lookbehind" + }, + { + "include": "#capture-group-lookahead" + }, + { + "include": "#capture-group-comment" + }, + { + "include": "#capture-group-name" + }, + { + "include": "#capture-group" + } + ] + }, + "groups-extended": { + "begin": "(?=\\()", + "end": "(?!\\G)", + "patterns": [ + { + "include": "#absent-extended" + }, + { + "include": "#callout" + }, + { + "include": "#non-capture-group-extended" + }, + { + "include": "#capture-group-comment" + }, + { + "include": "#capture-group-modify-extended" + }, + { + "include": "#capture-group-modify" + }, + { + "include": "#capture-group-conditional-extended" + }, + { + "include": "#capture-group-negative-lookbehind-extended" + }, + { + "include": "#capture-group-lookbehind-extended" + }, + { + "include": "#capture-group-lookahead-extended" + }, + { + "include": "#capture-group-name-extended" + }, + { + "include": "#capture-group-extended" + } + ] + }, + "invalid": { + "match": "[)\"\\x00-\\x1F\\x7F]", + "name": "invalid.illegal.tm regex" + }, + "non-capture-group": { + "begin": "\\G(\\()(\\?[:>])", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "support.function.tm regex" + } + }, + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + "non-capture-group-extended": { + "begin": "\\G(\\()(\\?[:>])", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "support.function.tm regex" + } + }, + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "patterns": [ + { + "include": "#$self-extended" + } + ] + }, + "quantifier": { + "patterns": [ + { + "match": "\\G(?>[+*?]|\\{(?>[0-9]+,?[0-9]*|,[0-9]+)})", + "name": "invalid.illegal.tm" + }, + { + "match": "\\A(?>[+*?]|\\{(?>[0-9]+,?[0-9]*|,[0-9]+)})", + "name": "invalid.illegal.tm" + }, + { + "captures": { + "0": { + "name": "keyword.tm" + }, + "1": { + "name": "strong" + } + }, + "match": "[+*?]([+?])?" + }, + { + "begin": "(?=\\{)", + "end": "(?!\\G)", + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.tm" + }, + "10": { + "name": "keyword.tm strong" + }, + "2": { + "name": "constant.numeric.tm" + }, + "3": { + "name": "punctuation.definition.tag.tm" + }, + "4": { + "name": "invalid.illegal.tm" + }, + "5": { + "name": "support.function.tm" + }, + "6": { + "name": "constant.numeric.tm" + }, + "7": { + "name": "punctuation.definition.tag.tm" + }, + "8": { + "name": "invalid.illegal.tm" + }, + "9": { + "name": "keyword.tm" + } + }, + "match": "\\G(\\{)((0*)(?>100000|[0-9]{1,5})([0-9]*)|(?=,[0-9]))(,)?((0*)(?>100000|[0-9]{1,5})([0-9]*))?(})((?<=,[0-9]?)\\?)?" + }, + { + "begin": "\\G(?=\\{(?>[0-9]+\\\\{2}?,?[0-9]*|\\\\{2}?,?[0-9]+)\\\\{2}?})", + "contentName": "entity.name.label.tm strong regex", + "end": "\\\\{2}", + "endCaptures": { + "0": { + "name": "constant.character.escape.tm" + } + } + }, + { + "include": "#character-literal" + } + ] + } + ] + }, + "subroutine": { + "begin": "\\G(\\\\{2}g)((<)|')", + "beginCaptures": { + "1": { + "name": "string.regexp.tm" + }, + "2": { + "name": "constant.character.set.regexp.tm" + } + }, + "end": "(?!\\3)>|(?=\\3)'|(?=[)\"])", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "name": "subroutine.tm", + "patterns": [ + { + "match": "(?)])", + "name": "markup.bold.tm regex", + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + }, + { + "begin": "(?)])", + "name": "markup.bold.tm regex", + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + }, + { + "include": "source.json.textmate#escape-characters" + }, + { + "match": ".[^\\\\\"\\w)'>+-]*", + "name": "invalid.illegal.tm regex" + } + ] + }, + "test": { + "//match": "(*FAIL).", + "name": "token.debug-token strong regex" + } + }, + "scopeName": "source.json.textmate.regexp" +} diff --git a/packages/tm-grammars/grammars/json-textmate.json b/packages/tm-grammars/grammars/json-textmate.json new file mode 100644 index 00000000..442c8120 --- /dev/null +++ b/packages/tm-grammars/grammars/json-textmate.json @@ -0,0 +1,2403 @@ +{ + "displayName": "JSON TextMate", + "injections": { + "L:capture-group-lookbehind -capture-group-modify-extended -character-class -comment": { + "patterns": [ + { + "include": "source.json.textmate.regexp#capture-group-lookbehind-invalid" + }, + { + "include": "source.json.textmate.regexp#absent-invalid" + } + ] + }, + "L:capture-group-lookbehind-extended -capture-group-modify -character-class -comment": { + "patterns": [ + { + "include": "source.json.textmate.regexp#capture-group-lookbehind-invalid-extended" + }, + { + "include": "source.json.textmate.regexp#absent-invalid-extended" + } + ] + }, + "L:capture-group-negative-lookbehind -capture-group-modify-extended -character-class -comment": { + "patterns": [ + { + "include": "source.json.textmate.regexp#capture-group-negative-lookbehind-invalid" + }, + { + "include": "source.json.textmate.regexp#absent-invalid" + } + ] + }, + "L:capture-group-negative-lookbehind-extended -capture-group-modify -character-class -comment": { + "patterns": [ + { + "include": "source.json.textmate.regexp#capture-group-negative-lookbehind-invalid-extended" + }, + { + "include": "source.json.textmate.regexp#absent-invalid-extended" + } + ] + } + }, + "name": "json-textmate", + "patterns": [ + { + "include": "#root" + }, + { + "include": "#fallback" + } + ], + "repository": { + "$schema": { + "begin": "(\")(\\$schema)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.schema.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "include": "#string" + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "applyEndPatternLast": { + "begin": "(\")(applyEndPatternLast)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.applyEndPatternLast.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=\\w)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\\w)|(?=[},])", + "patterns": [ + { + "match": "true|false|null", + "name": "keyword.constant.$0.json.tm" + }, + { + "match": "-?[0-9]+", + "name": "constant.numeric.json.tm" + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "array-separator": { + "patterns": [ + { + "begin": "\\G(?=[\\s,]|$)|,", + "beginCaptures": { + "0": { + "name": "punctuation.separator.array.json.tm" + } + }, + "end": "(?![\\s,]|$)", + "patterns": [ + { + "match": ",", + "name": "invalid.illegal.duplicate-array-separator.json.tm" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + "capture": { + "begin": "(\")([0-9]{1,3})(.*?(?beginC|whileC|endC|c)aptures)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.$2.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=[}\\]])|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=[}\\]])|(?=[},])", + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "include": "#capture" + }, + { + "include": "#include" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.json.tm" + } + }, + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.json.tm" + } + }, + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + }, + { + "include": "#name" + }, + { + "include": "#contentName" + }, + { + "include": "#match" + }, + { + "include": "#patterns" + }, + { + "include": "#captures" + }, + { + "include": "#repository" + }, + { + "include": "#applyEndPatternLast" + }, + { + "include": "#id" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "include": "#array-separator" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "comment": { + "patterns": [ + { + "//": "Vscode's TextMate does NOT acknowledge \"comment\" but instead just ignores it like all other unsupported keys", + "begin": "(\")(comment)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.comment.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "name": "quoted.double.json.tm comment.json.tm", + "patterns": [ + { + "captures": { + "1": { + "name": "constant.character.escape.json.tm" + } + }, + "match": "(\\\\)/" + }, + { + "include": "#escape-characters" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "//": { + "object": { + "array": [ + "string", + true, + 999, + { + }, + [ + ] + ] + } + }, + "begin": "(\")(//)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.comment-slash.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=[\\]}\"])(?!\\G)|(?=[},])", + "patterns": [ + { + "include": "#comment-slash-pair" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "begin": "(\")(information_for_contributors)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.information_for_contributors.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=[\\]}\"])(?!\\G)|(?=[},])", + "patterns": [ + { + "include": "#comment-slash-pair" + }, + { + "include": "#dictionary-separator" + } + ] + } + ], + "repository": { + "comment-slash-array": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.json.tm" + } + }, + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.json.tm" + } + }, + "patterns": [ + { + "include": "#comment-slash-dictionary" + }, + { + "include": "#comment-slash-array" + }, + { + "include": "#comment-slash-string" + }, + { + "include": "#array-separator" + } + ] + }, + "comment-slash-dictionary": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "begin": "(?=\")", + "end": "(?<=[\\]}])|(?<=\")(?!:)(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "name": "comment.double.slash.json.tm", + "patterns": [ + { + "include": "#escape-characters" + } + ] + }, + { + "include": "#comment-slash-pair" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "comment-slash-pair": { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=[\\]}\"])|(?=[},])", + "patterns": [ + { + "include": "#comment-slash-dictionary" + }, + { + "include": "#comment-slash-array" + }, + { + "include": "#comment-slash-string" + }, + { + "include": "#json-value" + } + ] + }, + "comment-slash-string": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "name": "comment.double.slash.json.tm", + "patterns": [ + { + "include": "#escape-characters" + } + ] + } + } + }, + "comments": { + "patterns": [ + { + "begin": "/\\*\\*(?!/)", + "captures": { + "0": { + "name": "invalid.illegal.punctuation.definition.comment.json.tm" + } + }, + "end": "\\*/", + "name": "comment.block.documentation.json.tm" + }, + { + "begin": "/\\*", + "captures": { + "0": { + "name": "invalid.illegal.punctuation.definition.comment.json.tm" + } + }, + "end": "\\*/", + "name": "comment.block.json.tm" + }, + { + "begin": "//", + "captures": { + "0": { + "name": "invalid.illegal.punctuation.definition.comment.json.tm" + } + }, + "end": "$", + "name": "comment.line.double-slash.json.tm" + } + ] + }, + "contentName": { + "begin": "(\")(contentName)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.contentName.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "include": "#name_scopes" + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "dictionary-separator": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#json-pair" + }, + { + "begin": "\\G(?=[\\s,]|$)|,", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.json.tm" + } + }, + "end": "(?![\\s,]|$)", + "patterns": [ + { + "match": ",", + "name": "invalid.illegal.duplicate-dictionary-separator.json.tm" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + "escape-characters": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.tag.json.tm" + } + }, + "match": "(\\\\)/" + }, + { + "captures": { + "1": { + "name": "constant.character.escape.json.tm" + } + }, + "match": "(\\\\)[\\\\\"]" + }, + { + "match": "\\\\[bfnrt]", + "name": "constant.character.escape.json.tm" + }, + { + "captures": { + "1": { + "name": "constant.character.escape.json.tm" + }, + "2": { + "name": "constant.numeric.json.tm" + }, + "3": { + "name": "constant.numeric.json.tm", + "patterns": [ + { + "match": "\\H+", + "name": "invalid.illegal.regex.json.tm" + } + ] + } + }, + "match": "(\\\\u)(\\h{4,0})" + }, + { + "match": "\\\\.?|[\"\\x00-\\x1F\\x7F]", + "name": "invalid.illegal.json.tm markup.underline regex" + } + ] + }, + "fallback": { + "patterns": [ + { + "include": "#version" + }, + { + "include": "#$schema" + }, + { + "include": "#match" + }, + { + "include": "#captures" + }, + { + "include": "#name" + }, + { + "include": "#contentName" + }, + { + "include": "#scopeName" + }, + { + "include": "#fileTypes" + }, + { + "include": "#firstLineMatch" + }, + { + "include": "#foldingStartMarker" + }, + { + "include": "#foldingStopMarker" + }, + { + "include": "#injectionSelector" + }, + { + "include": "#injections" + }, + { + "include": "#include" + }, + { + "include": "#applyEndPatternLast" + }, + { + "include": "#patterns" + }, + { + "include": "#repository" + }, + { + "include": "#uuid" + }, + { + "include": "#comment" + }, + { + "include": "#capture" + }, + { + "include": "#repo" + }, + { + "match": ",", + "name": "punctuation.separator.json.tm" + }, + { + "begin": "\\A(?!$|\\s*\\{\\s*(?>$|})|\\s*\\[\\s*(?>$|[\\[{])|[^\\t]*\\t|(?>[^\\\\\"]+|\\\\.)*+.)", + "end": "(?=[)\"])|$", + "name": "meta.embedded.json.textmate.regexp", + "patterns": [ + { + "include": "source.json.textmate.regexp" + }, + { + "include": "#escape-characters" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + "fileTypes": { + "//": "Vscode's TextMate acknowledges \"fileTypes\" but doesn't do anything with it", + "begin": "(\")(fileTypes)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.fileTypes.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=])|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=])|(?=[},])", + "patterns": [ + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.json.tm" + } + }, + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.json.tm" + } + }, + "patterns": [ + { + "include": "#string" + }, + { + "include": "#array-separator" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "firstLineMatch": { + "begin": "(\")(firstLineMatch)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.firstLineMatch.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "contentName": "meta.embedded.json.textmate.regexp", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "patterns": [ + { + "include": "source.json.textmate.regexp" + }, + { + "include": "#escape-characters" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "foldingStartMarker": { + "begin": "(\")(foldingStartMarker)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.foldingStartMarker.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "contentName": "meta.embedded.json.textmate.regexp", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "patterns": [ + { + "include": "source.json.textmate.regexp" + }, + { + "include": "#escape-characters" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "foldingStopMarker": { + "begin": "(\")(foldingStopMarker)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.foldingStopMarker.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "contentName": "meta.embedded.json.textmate.regexp", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "patterns": [ + { + "include": "source.json.textmate.regexp" + }, + { + "include": "#escape-characters" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "id": { + "begin": "(\")(id)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "invalid.illegal.keyword.property-name.string.id.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=\\S)(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\\w)|(?=[},])", + "patterns": [ + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "include": { + "begin": "(\")(include)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.include.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "contentName": "regex", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "patterns": [ + { + "begin": "\\G(?=(?>(?>[^\\\\\"#]++|\\\\[\\\\\"]?)*#|#?)\\$base\")", + "contentName": "markup.strikethrough.json.tm", + "end": "((#)?\\$)(base)", + "endCaptures": { + "1": { + "name": "keyword.json.tm" + }, + "2": { + "name": "markup.strikethrough.json.tm" + }, + "3": { + "name": "support.function.json.tm" + } + }, + "patterns": [ + { + "include": "#scope-string" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.json.tm" + }, + "2": { + "name": "markup.strikethrough.json.tm" + }, + "3": { + "name": "support.function.json.tm" + } + }, + "match": "\\G((#)?\\$)(self)(?=\")" + }, + { + "captures": { + "0": { + "name": "markup.strikethrough.json.tm" + }, + "1": { + "name": "keyword.json.tm" + }, + "2": { + "name": "support.function.json.tm" + } + }, + "match": "(#\\$)(self)(?=\")" + }, + { + "match": "(?!\\G)#?(?=\")", + "name": "keyword.json.tm markup.strikethrough.json.tm" + }, + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "keyword.json.tm" + } + }, + "contentName": "variable.json.tm", + "end": "(?=\")", + "patterns": [ + { + "include": "#escape-characters" + } + ] + }, + { + "include": "#scope-string" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "injection": { + "begin": "(?=\")", + "end": "(?<=})|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "contentName": "meta.embedded.injection.tm", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "patterns": [ + { + "include": "#injection-string" + } + ] + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=})|(?=[},])", + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "include": "#patterns" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "injection-string": { + "patterns": [ + { + "match": "(?>\\\\[\\\\\"/bfnrt])+", + "name": "comment.injection.whitespace.tm" + }, + { + "include": "#escape-characters" + }, + { + "begin": "[)|]", + "end": "(?=\")", + "name": "comment.injection.whitespace.tm" + }, + { + "captures": { + "1": { + "name": "comment.injection.whitespace.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "match": "(?<=(?>^|[^\\\\])\"|,)((?>\\\\[\\\\\"/bfnrt]|[^\\\\\"\\w.:|()-])*)([LR]:|[\\w.:]:(?![\\w.:-]))" + }, + { + "begin": "(?>text|source)(?=\\.[\\w.:])", + "beginCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "(?![\\w.:-])", + "name": "string", + "patterns": [ + { + "match": "\\.", + "name": "support.function.tm" + } + ] + }, + { + "match": "[\\w.:][\\w.:-]*", + "name": "string $0" + }, + { + "begin": "\\(", + "captures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "end": "\\)|(?=\")", + "patterns": [ + { + "match": "(?<=[,|])(?>\\\\[\\\\\"/bfnrt]|[^\\\\\\w.:()-])+", + "name": "comment.injection.whitespace.tm" + }, + { + "match": "\\|", + "name": "keyword.control.tm" + }, + { + "include": "#injection-string" + } + ] + }, + { + "match": "(?>\\\\[\\\\\"/bfnrt]|[^\\\\\"\\w.:,|()-])+", + "name": "comment.injection.whitespace.tm" + }, + { + "match": "(?<=,)(?>\\\\[\\\\\"/bfnrt]|[^\\\\\"\\w.:|()-])+", + "name": "comment.injection.whitespace.tm" + }, + { + "match": ",", + "name": "keyword.control.tm" + }, + { + "match": "-(?>\\\\[\\\\\"/bfnrt]|[^\\\\\"\\w.:|()-])*-", + "name": "comment.injection.whitespace.tm" + }, + { + "begin": "-", + "beginCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "(?=[\"\\t\\n,|()-])", + "name": "emphasis", + "patterns": [ + { + "include": "#injection-string" + } + ] + }, + { + "match": "-", + "name": "support.function.tm" + } + ] + }, + "injectionSelector": { + "begin": "(\")(injectionSelector)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.injectionSelector.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "include": "#injectionSelectorValue" + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "injectionSelectorValue": { + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "patterns": [ + { + "include": "#injection-string" + } + ] + }, + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.json.tm" + } + }, + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.json.tm" + } + }, + "patterns": [ + { + "include": "#injectionSelectorValue" + }, + { + "include": "#array-separator" + } + ] + } + ] + }, + "injections": { + "begin": "(\")(injections)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.injectionSelector.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=})|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=})|(?=[},])", + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "include": "#injection" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "json-array": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.json.tm" + } + }, + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.json.tm" + } + }, + "patterns": [ + { + "include": "#array-separator" + } + ] + }, + "json-dictionary": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "include": "#dictionary-separator" + } + ] + }, + "json-pair": { + "begin": "(?=\")", + "end": "(?<=[\\]}])(?!\\G)|(?!\\G)(?=[},\"])", + "patterns": [ + { + "begin": "\\G\"", + "beginCaptures": { + "0": { + "name": "punctuation.support.type.property-name.begin.json.tm" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.support.type.property-name.end.json.tm" + } + }, + "name": "string.json.tm support.type.property-name.json.tm", + "patterns": [ + { + "match": "\\\\[\"\\\\/bfnrt]", + "name": "constant.character.escape.json.tm" + }, + { + "match": "\\\\u\\h{4}", + "name": "constant.character.escape.json.tm" + }, + { + "match": "\\\\.?", + "name": "invalid.illegal.unrecognized-string-escape.json.tm" + } + ] + }, + { + "begin": ":", + "end": "(?<=[\\]}\"])|(?=[},])", + "patterns": [ + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "json-value": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#json-dictionary" + }, + { + "include": "#json-array" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "name": "string.quoted.double.json.tm", + "patterns": [ + { + "match": "\\\\[\"\\\\/bfnrt]", + "name": "constant.character.escape.json.tm" + }, + { + "match": "\\\\u\\h{4}", + "name": "constant.character.escape.json.tm" + }, + { + "match": "\\\\.?", + "name": "invalid.illegal.unrecognized-string-escape.json.tm" + }, + { + "match": "[\\x00-\\x1F\\x7F]+", + "name": "invalid.illegal.control-character.json.tm" + } + ] + }, + { + "match": "\\btrue\\b", + "name": "constant.language.json.tm" + }, + { + "match": "\\bfalse\\b", + "name": "constant.language.json.tm" + }, + { + "match": "\\bnull\\b", + "name": "constant.language.json.tm" + }, + { + "match": "-?(?>0|[1-9][0-9]*)(?>\\.[0-9]+)?(?>[eE][+-]?[0-9]+)?", + "name": "constant.numeric.json.tm" + }, + { + "match": "\\S[^,:/{}\\[\\]\\s\"]*", + "name": "invalid.illegal.expected-separator.json.tm" + } + ] + }, + "match": { + "begin": "(\")(match|begin|while|end)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.$2.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "contentName": "meta.embedded.json.textmate.regexp", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "patterns": [ + { + "include": "source.json.textmate.regexp" + }, + { + "include": "#escape-characters" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "name": { + "begin": "(\")(name)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.name.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "include": "#name_scopes" + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "name_display": { + "begin": "(\")(name)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.name.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "include": "#string" + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "name_scopes": { + "//": [ + "replaceCaptures `$1` removes all leading dots `.`", + "Causing us to deviate from VSCode TextMate", + "If a scopename is placed at the beginning of \"name\" and has leading dots `.`", + " \"name\": \"...keyword\" ", + "The dots will be striped by `$1` and it will appear that `...keyword` matches the scopename `keyword`, highlighting it", + "We can *partially* correct this by putting another character in front of the first dot `.`", + "Sadly the beginning double quote `\"` is the only one available to us. Space ` ` would have been nicer", + "and it ends up showing up in `Inspect Editor Tokens and Scopes`. Once again deviating from VSCode TextMate", + "However, I doubt anyone would create a scopename starting with a double quote `\"` and leading dots `.`", + " \"...scopename " + ], + "begin": "(?=(\"\\.(?>[^\\\\\"]++|\\\\.)*)\")\"|\"(?=((?>[^\\\\\"]++|\\\\.)*)\")", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "name": "$1$2", + "patterns": [ + { + "include": "#escape-characters" + }, + { + "match": "\\b(?>comment|string|regex|meta\\.embedded)\\b", + "name": "markup.italic" + }, + { + "captures": { + "1": { + "name": "meta.embedded constant.character.escape.json.tm markup.italic" + }, + "2": { + "name": "punctuation.definition.tag.json.tm" + }, + "3": { + "name": "constant.numeric.json.tm" + } + }, + "match": "(\\$)(0*)([0-9]{3,1})(?![0-9])" + }, + { + "captures": { + "1": { + "name": "meta.embedded constant.character.escape.json.tm markup.italic.tm" + }, + "2": { + "name": "meta.embedded constant.character.escape.json.tm" + }, + "3": { + "name": "punctuation.definition.tag.json.tm" + }, + "4": { + "name": "constant.numeric.json.tm" + }, + "5": { + "name": "constant.character.escape.json.tm" + }, + "6": { + "name": "markup.heading.json.tm" + }, + "7": { + "name": "meta.embedded constant.character.escape.json.tm" + } + }, + "match": "(\\$)(\\{)(0*)([0-9]{3,1})(:/)(upcase|downcase)(})" + } + ] + }, + "patterns": { + "begin": "(\")(patterns)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.patterns.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=])|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=])|(?=[},])", + "patterns": [ + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.json.tm" + } + }, + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.json.tm" + } + }, + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "include": "#name" + }, + { + "include": "#contentName" + }, + { + "include": "#match" + }, + { + "include": "#include" + }, + { + "include": "#patterns" + }, + { + "include": "#captures" + }, + { + "include": "#repository" + }, + { + "include": "#applyEndPatternLast" + }, + { + "include": "#id" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "include": "#array-separator" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "repo": { + "begin": "(?=\")", + "end": "(?<=})|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "contentName": "variable.json.tm regex", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "patterns": [ + { + "match": "\\G\\$(?>self|base)(?=\")", + "name": "markup.strikethrough.json.tm" + }, + { + "include": "#escape-characters" + } + ] + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=})|(?=[},])", + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "include": "#name" + }, + { + "include": "#contentName" + }, + { + "include": "#match" + }, + { + "include": "#captures" + }, + { + "include": "#patterns" + }, + { + "include": "#include" + }, + { + "include": "#repository" + }, + { + "include": "#applyEndPatternLast" + }, + { + "include": "#id" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "include": "#json-value" + } + ] + } + ] + }, + "repository": { + "begin": "(\")(repository)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.repository.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "end": "(?<=})|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=})|(?=[},])", + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "include": "#repo" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "root": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "include": "#version" + }, + { + "include": "#$schema" + }, + { + "include": "#name_display" + }, + { + "include": "#scopeName" + }, + { + "include": "#fileTypes" + }, + { + "include": "#firstLineMatch" + }, + { + "include": "#foldingStartMarker" + }, + { + "include": "#foldingStopMarker" + }, + { + "include": "#injectionSelector" + }, + { + "include": "#injections" + }, + { + "include": "#patterns" + }, + { + "include": "#repository" + }, + { + "include": "#uuid" + }, + { + "include": "#dictionary-separator" + } + ] + }, + "scope-string": { + "patterns": [ + { + "match": "(?<=[ \"])(?>source|text)\\.(?![ \"#])", + "name": "support.function.json.tm" + }, + { + "match": "(?text|source)\\b", + "name": "support.function.json.tm" + }, + { + "match": "(?", "license": "MIT", diff --git a/packages/tm-grammars/raw/haxe.json b/packages/tm-grammars/raw/haxe.json index 2b2bdfe5..f1274247 100644 --- a/packages/tm-grammars/raw/haxe.json +++ b/packages/tm-grammars/raw/haxe.json @@ -1538,6 +1538,9 @@ } }, "patterns": [ + { + "include": "#block" + }, { "include": "#block-contents" } diff --git a/packages/tm-grammars/raw/json-textmate-regex.json b/packages/tm-grammars/raw/json-textmate-regex.json new file mode 100644 index 00000000..b6ca7cc8 --- /dev/null +++ b/packages/tm-grammars/raw/json-textmate-regex.json @@ -0,0 +1,2929 @@ +{ + "$schema": "https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/vscode.tmLanguage.schema.json", + "displayName": "JSON TextMate Oniguruma Regular Expressions", + "injections": { + "L:capture-group-lookbehind -capture-group-modify-extended -character-class -comment": { + "patterns": [ + { + "include": "#capture-group-lookbehind-invalid" + }, + { + "include": "#absent-invalid" + } + ] + }, + "L:capture-group-lookbehind-extended -capture-group-modify -character-class -comment": { + "patterns": [ + { + "include": "#capture-group-lookbehind-invalid-extended" + }, + { + "include": "#absent-invalid-extended" + } + ] + }, + "L:capture-group-negative-lookbehind -capture-group-modify-extended -character-class -comment": { + "patterns": [ + { + "include": "#capture-group-negative-lookbehind-invalid" + }, + { + "include": "#absent-invalid" + } + ] + }, + "L:capture-group-negative-lookbehind-extended -capture-group-modify -character-class -comment": { + "patterns": [ + { + "include": "#capture-group-negative-lookbehind-invalid-extended" + }, + { + "include": "#absent-invalid-extended" + } + ] + } + }, + "name": "json-textmate-regex", + "patterns": [ + { + "include": "#test" + }, + { + "include": "#dot" + }, + { + "include": "#anchor" + }, + { + "include": "#alternation" + }, + { + "include": "#quantifier" + }, + { + "include": "#character-class" + }, + { + "include": "#groups" + }, + { + "include": "#escapes" + }, + { + "include": "#invalid" + }, + { + "include": "#character-literal" + } + ], + "repository": { + "$self-extended": { + "patterns": [ + { + "include": "#groups-extended" + }, + { + "include": "#comment-extended" + }, + { + "include": "#escape-character-extended" + }, + { + "include": "$self" + } + ] + }, + "_disabled_": { + "//": "https://github.com/kkos/oniguruma/blob/v6.9.8/doc/RE", + "comment": "Basic visual test", + "patterns": [ + { + "match": "(*FAIL) !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ " + }, + { + "match": "(*FAIL) \"/\b\f\n\r\t\u0000 " + }, + { + "match": "(*FAIL) \\ \\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\-\\.\\/\\0\\10\\20\\30\\40\\50\\60\\70\\80\\90\\:\\;\\<\\=\\>\\\\\\?\\@\\A\\B\\C- \\D\\E\\F\\G\\H\\I\\J\\K\\L\\M-a\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\\[\\\\\\]\\^\\_\\`\\a\\b\\c]\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u0000\\v\\w\\x\\y\\z\\{\\|\\}\\~ " + }, + { + "match": "(*FAIL) \\\"\\/\\\b\\\f\\\n\\\r\\\t\\\u0000 " + }, + { + "match": "(*FAIL) \\\\ " + }, + { + "match": "(*FAIL) (?x).{2,3}{2,3}(.{2,3}(?:.{2,3})){2,3}{,3}{2,}{2} {000} *{0} {0}* *{0}* {0}{0}{0} {0}{2,3} {2,3}{0}{2,3} {2,3\\} " + }, + { + "match": "(*FAIL) () (?<= (= (?> (=)? ) )? ) (?= (?= ) ) " + }, + { + "match": "(*FAIL) \\x \\x00 \\xFF \\x{} \\x{k} \\x\\{123} \\x{00000000 0013FFFF} [\\x{42 001FFFFF 48}-\\x{FFFFFFFF \n 45}] " + }, + { + "match": "(*FAIL) \\o{} \\o{k} \\o\\{123} \\o{00000000000 00004777777} [\\o{102 00004777777 110}-\\o{37777777777 105}] " + }, + { + "match": "(*FAIL) [a-z&&]u°𐐷Ꚛ�𐀀𐃘[�𐃘]®×ñÿ¡¼÷€Çô│╨ε■ ‚‚ Ȁ°Ççë£ ÿ[[:^upper:]] " + }, + { + "match": "(*FAIL) \\g<0>? \\x555 \\x{201E} \\p{L} \\p{L etter------} " + }, + { + "match": "(*FAIL) (?~a) (?{foo}) " + }, + { + "match": "(*FAIL) QabcE $ \\$ an{name}bc At aT aa abc abd cd a1 b a1b n1000 Q.E q.e test ab$abc " + }, + { + "match": "(*FAIL) (?x)#comment\n \\# abc (?-x)#notcomment\n \\# abc " + }, + { + "match": "(*FAIL) (?<_azAZ0-9 #$('°>) (?<_azAZ0>) (?(<_azAZ0-9>)true|false) \\g<_azAZ0-9 #$('°> \\k<_azAZ0-9> " + }, + { + "match": "(*FAIL) (){0}[[:word:]]\\g<1>\\k'1' (( (){0}[[:word:]]\\g<1>\\k'1' )) " + }, + { + "include": "#_disabled_" + } + ] + }, + "absent": { + "begin": "\\G(\\()(\\?~\\|?)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "comment": "(?~|...|...) (?~|...) (?~...) (?~|)", + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "patterns": [ + { + "begin": "(?<=\\|)\\G", + "end": "\\||(?=[)\"])", + "endCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "$self" + } + ] + }, + "absent-extended": { + "begin": "\\G(\\()(\\?~\\|?)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "comment": "(?~|...|...) (?~...)", + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "patterns": [ + { + "begin": "(?<=\\|)\\G", + "end": "\\||(?=\")", + "endCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "patterns": [ + { + "include": "#$self-extended" + } + ] + }, + { + "include": "#$self-extended" + } + ] + }, + "absent-invalid": { + "begin": "\\G(\\()(\\?~\\|)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "comment": "(?~|...|...) (?~|...) (?~|)", + "end": "(?!\\G)\\)|(?<=\\))|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\|)|(\\))|(?=\")", + "endCaptures": { + "1": { + "name": "support.function.tm" + }, + "2": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "$self" + } + ] + }, + "absent-invalid-extended": { + "begin": "\\G(\\()(\\?~\\|)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "comment": "(?~|...|...) (?~|...) (?~|)", + "end": "(?!\\G)\\)|(?<=\\))|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\|)|(\\))|(?=\")", + "endCaptures": { + "1": { + "name": "support.function.tm" + }, + "2": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "patterns": [ + { + "include": "#$self-extended" + } + ] + }, + { + "include": "#$self-extended" + } + ] + }, + "alternation": { + "captures": { + "0": { + "name": "keyword.control.tm" + }, + "1": { + "name": "invalid.illegal.tm regex" + } + }, + "comment": "|", + "match": "\\|([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?" + }, + "anchor": { + "captures": { + "0": { + "name": "variable.tm" + }, + "1": { + "name": "invalid.illegal.tm regex" + } + }, + "comment": "$ ^", + "match": "[$^]([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?" + }, + "backreference": { + "patterns": [ + { + "captures": { + "1": { + "name": "string.regexp.tm" + }, + "2": { + "name": "constant.numeric.tm" + }, + "3": { + "name": "invalid.illegal.tm" + } + }, + "comment": "\\1", + "match": "\\G(\\\\{2})([1-9][0-9]{2,0})([0-9]*)" + }, + { + "begin": "\\G(\\\\{2}k)((<)|')", + "beginCaptures": { + "1": { + "name": "string.regexp.tm" + }, + "2": { + "name": "constant.character.set.regexp.tm" + } + }, + "comment": "\\k<1> \\k'-2' \\k \\k'name_123+5' \\k<+000999-2147483647>", + "end": "(?!\\3)>|(?=\\3)'|(?=[)\"])", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "patterns": [ + { + "include": "#backreference-name" + } + ] + } + ] + }, + "backreference-name": { + "patterns": [ + { + "captures": { + "1": { + "name": "invalid.illegal.tm" + } + }, + "comment": "Capture group nesting level", + "match": "(?<=\\w)[+-]0*+(?>2(?>0[0-9]{8}|1(?>[0-3][0-9]{7}|4(?>[0-6][0-9]{6}|7(?>[0-3][0-9]{5}|4(?>[0-7][0-9]{4}|8(?>[0-2][0-9]{3}|3(?>[0-5][0-9]{2}|6(?>[0-3][0-9]|4[0-7]))))))))|1?+[0-9]{9,0})(\\w*+)", + "name": "constant.numeric.tm" + }, + { + "captures": { + "1": { + "name": "invalid.illegal.tm" + } + }, + "comment": "Capture group reference number", + "match": "[+-]?+0*+[1-9][0-9]{2,0}(\\w*+)", + "name": "constant.numeric.tm" + }, + { + "comment": "Named capture group reference name", + "match": "(?!0)\\w++", + "name": "markup.bold.tm" + }, + { + "include": "source.json.textmate#escape-characters" + }, + { + "match": ".[^\\\\\"'>\\w+-]*", + "name": "invalid.illegal.tm" + } + ] + }, + "callout": { + "patterns": [ + { + "captures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "10": { + "name": "support.function.tm" + }, + "11": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "12": { + "name": "markup.bold" + }, + "13": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "14": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "support.function.tm" + }, + "3": { + "name": "support.function.tm" + }, + "4": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "5": { + "name": "regex", + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + }, + "6": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "7": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "8": { + "name": "support.function.tm" + }, + "9": { + "patterns": [ + { + "match": "\\W+|[0-9]+", + "name": "invalid.illegal.tm markup.underline regex" + }, + { + "match": "\\w+", + "name": "markup.bold" + } + ] + } + }, + "comment": "(?{{{...contents...}}}[tag]D)", + "match": "\\G(\\()(\\?)({(?:\\g<-1>|({)?(.*?[^}])?(})?)})([^\\[)]*)(?>(\\[)([^]]*)(]))?([^X<>)]*)([X<>])?([^)]*)(\\))" + }, + { + "captures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "10": { + "name": "regex", + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + }, + "11": { + "name": "support.function.tm" + }, + "12": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "13": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "14": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "2": { + "name": "support.function.tm" + }, + "3": { + "name": "markup.bold" + }, + "4": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "5": { + "name": "support.function.tm" + }, + "6": { + "patterns": [ + { + "match": "\\W+|[0-9]+", + "name": "invalid.illegal.tm markup.underline regex" + }, + { + "match": "\\w+", + "name": "markup.bold" + } + ] + }, + "7": { + "name": "support.function.tm" + }, + "8": { + "name": "invalid.illegal.tm markup.underline regex" + }, + "9": { + "name": "support.function.tm" + } + }, + "comment": "(*name[tag]{args...})", + "match": "\\G(\\()(\\*)([A-Za-z_]\\w*+)([^\\[{)]*+)(?>(\\[)([^]]*+)(]))?+([^{)]*+)(?>({)([^}]*+)(}))?+([^)]*+)(\\))([+*?]|{(?>[0-9]++,?+[0-9]*+|,[0-9]++)})?+" + } + ] + }, + "capture-group": { + "begin": "\\G\\(", + "captures": { + "0": { + "name": "constant.character.set.regexp.tm strong" + } + }, + "comment": "( ... )", + "end": "\\)|(?=\")", + "patterns": [ + { + "include": "$self" + } + ] + }, + "capture-group-comment": { + "begin": "\\G(\\()(\\?#)(?#comment)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "support.function.tm" + } + }, + "comment": "(?#...)", + "contentName": "comment.tm", + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm markup.italic" + } + }, + "patterns": [ + { + "captures": { + "1": { + "name": "constant.character.escape.json.tm" + } + }, + "match": "(\\\\{2})\\)" + }, + { + "include": "source.json.textmate#escape-characters" + } + ] + }, + "capture-group-conditional": { + "begin": "\\G(?=\\(\\?\\()(\\()(\\?)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "comment": "(?(1)...|...) (?(-001)...) (?(1+0)...|...) (?(<1>)...) (?('+1')...|...) (?(<1-0>)...) (?()...) (?('name-0')...|...) (?()...) (?(...)...|...) (?(?{...})...|...) (?(*FAIL)|...)", + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "name": "meta.group.capture.conditional.tm", + "patterns": [ + { + "begin": "\\G\\((?=[<'])", + "captures": { + "0": { + "name": "constant.character.set.regexp.tm markup.italic" + } + }, + "end": "\\)|(?=\")", + "name": "meta.group.capture.conditional.name.tm", + "patterns": [ + { + "begin": "\\G(?>(<)|')", + "captures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "(?!\\1)>|(?=\\1)'|(?=[)\"])", + "patterns": [ + { + "include": "#backreference-name" + } + ] + }, + { + "include": "source.json.textmate#escape-characters" + }, + { + "match": ".[^\\\\\"'>\\w+-]*+", + "name": "invalid.illegal.tm" + } + ] + }, + { + "captures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "constant.numeric.tm" + }, + "3": { + "name": "punctuation.definition.tag.tm" + }, + "4": { + "name": "invalid.illegal.tm" + }, + "5": { + "name": "invalid.illegal.tm" + }, + "6": { + "name": "punctuation.definition.tag.tm" + }, + "8": { + "name": "constant.character.set.regexp.tm markup.italic" + } + }, + "match": "\\G(\\()((?>[+-](?=0*[1-9]))?(0*)(?=\\g\\b)(?>[1-9][0-9]{0,2}([0-9]*)|(0))(?>[+-](0*)(?2(?>0[0-9]{8}|1(?>[0-3][0-9]{7}|4(?>[0-6][0-9]{6}|7(?>[0-3][0-9]{5}|4(?>[0-7][0-9]{4}|8(?>[0-2][0-9]{3}|3(?>[0-5][0-9]{2}|6(?>[0-3][0-9]|4[0-7]))))))))|1?[0-9]{1,9}))?)(\\))", + "name": "meta.group.capture.conditional.reference.tm" + }, + { + "begin": "\\G\\((?!\\?{|\\*)", + "captures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "end": "\\)|(?=\")", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\|", + "beginCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "(?=[)\"])", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "$self" + } + ] + }, + "capture-group-conditional-extended": { + "begin": "\\G(?=\\(\\?\\()(\\()(\\?)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "comment": "(?(1)...|...) (?(-001)...) (?(1+0)...|...) (?(<1>)...) (?('+1')...|...) (?(<1-0>)...) (?()...) (?('name-0')...|...) (?()...) (?(...)...|...) (?(?{...})...|...) (?(*FAIL)|...)", + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "name": "meta.group.capture.conditional.extended.tm", + "patterns": [ + { + "begin": "\\G\\((?=[<'])", + "captures": { + "0": { + "name": "constant.character.set.regexp.tm markup.italic" + } + }, + "end": "\\)|(?=\")", + "name": "meta.group.capture.conditional.name.tm", + "patterns": [ + { + "begin": "\\G(?>(<)|')", + "captures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "(?!\\1)>|(?=\\1)'|(?=[)\"])", + "patterns": [ + { + "include": "#backreference-name" + } + ] + }, + { + "include": "source.json.textmate#escape-characters" + }, + { + "match": ".[^\\\\\"'>\\w+-]*", + "name": "invalid.illegal.tm" + } + ] + }, + { + "captures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "constant.numeric.tm" + }, + "3": { + "name": "punctuation.definition.tag.tm" + }, + "4": { + "name": "invalid.illegal.tm" + }, + "5": { + "name": "invalid.illegal.tm" + }, + "6": { + "name": "punctuation.definition.tag.tm" + }, + "8": { + "name": "constant.character.set.regexp.tm markup.italic" + } + }, + "match": "\\G(\\()((?>[+-](?=0*[1-9]))?(0*)(?=\\g\\b)(?>[1-9][0-9]{0,2}([0-9]*)|(0))(?>[+-](0*)(?2(?>0[0-9]{8}|1(?>[0-3][0-9]{7}|4(?>[0-6][0-9]{6}|7(?>[0-3][0-9]{5}|4(?>[0-7][0-9]{4}|8(?>[0-2][0-9]{3}|3(?>[0-5][0-9]{2}|6(?>[0-3][0-9]|4[0-7]))))))))|1?[0-9]{1,9}))?)(\\))", + "name": "meta.group.capture.conditional.reference.tm" + }, + { + "begin": "\\G\\((?!\\?{|\\*)", + "captures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "end": "\\)|(?=\")", + "patterns": [ + { + "include": "#$self-extended" + } + ] + }, + { + "begin": "\\|", + "beginCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "(?=[)\"])", + "patterns": [ + { + "include": "#$self-extended" + } + ] + }, + { + "include": "#$self-extended" + } + ] + }, + "capture-group-extended": { + "begin": "\\G\\(", + "captures": { + "0": { + "name": "constant.character.set.regexp.tm strong" + } + }, + "comment": "( ... )", + "end": "\\)|(?=\")", + "patterns": [ + { + "include": "#$self-extended" + } + ] + }, + "capture-group-lookahead": { + "begin": "\\G(\\()(\\?[!=])", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "support.function.tm" + } + }, + "comment": "(?=...) (?!...)", + "end": "(\\))([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "endCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + "capture-group-lookahead-extended": { + "begin": "\\G(\\()(\\?[!=])", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "support.function.tm" + } + }, + "comment": "(?=...) (?!...)", + "end": "(\\))([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "endCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "patterns": [ + { + "include": "#$self-extended" + } + ] + }, + "capture-group-lookbehind": { + "begin": "\\G(\\()(\\?<=)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "support.function.tm regex" + } + }, + "comment": "(?<=...)", + "contentName": "capture-group-lookbehind", + "end": "(\\))([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "endCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "patterns": [ + { + "include": "#capture-group-lookbehind-invalid" + }, + { + "include": "#absent-invalid" + }, + { + "include": "$self" + } + ] + }, + "capture-group-lookbehind-extended": { + "begin": "\\G(\\()(\\?<=)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "support.function.tm regex" + } + }, + "comment": "(?<=...)", + "contentName": "capture-group-lookbehind-extended", + "end": "(\\))([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "endCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "patterns": [ + { + "include": "#capture-group-lookbehind-invalid-extended" + }, + { + "include": "#absent-invalid-extended" + }, + { + "include": "#$self-extended" + } + ] + }, + "capture-group-lookbehind-invalid": { + "begin": "\\G\\(\\?([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "patterns": [ + { + "include": "#capture-group-lookbehind-invalid" + }, + { + "include": "#absent-invalid" + }, + { + "include": "$self" + } + ] + }, + "capture-group-lookbehind-invalid-extended": { + "begin": "\\G\\(\\?([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "patterns": [ + { + "include": "#capture-group-lookbehind-invalid-extended" + }, + { + "include": "#absent-invalid-extended" + }, + { + "include": "#$self-extended" + } + ] + }, + "capture-group-modify": { + "patterns": [ + { + "match": "\\G\\(\\?-+:?\\)", + "name": "punctuation.definition.tag.tm" + }, + { + "begin": "(?<=\")\\G(?>(\\((?=[^:)]++:))|(\\())(\\?)(?=[IimxWDSPy])(?=[^-I:)]*+I)(?=[^x:)]++[:)]|[^-:)]*+-[^x:)]*+x)", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "3": { + "name": "support.function.tm" + } + }, + "comment": "(?y{g}I-imxWDSP)... (?y{w}IimxWDSP-x:...)", + "end": "(?=\")", + "name": "capture-group-modify-whole", + "patterns": [ + { + "begin": "(?<=\\?)\\G", + "end": "(?=[):\"])", + "patterns": [ + { + "match": "I(?=[^-I:)]*I)", + "name": "punctuation.definition.tag.tm" + }, + { + "match": "I", + "name": "support.function.tm" + }, + { + "include": "#capture-group-modify-options" + } + ] + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "(?=\")", + "patterns": [ + { + "begin": "\\G(?!\\))", + "beginCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "end": "(?=\\))", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\)", + "beginCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "contentName": "invalid.illegal.tm markup.underline.tm", + "end": "(?=\")", + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + } + ] + }, + { + "begin": "\\)", + "beginCaptures": { + "0": { + "name": "constant.character.set.regexp.tm markup.italic" + } + }, + "end": "(?=\")", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + { + "begin": "\\G(?=\\(\\?[-IimxWDSPy])(?>(\\((?=[^:)]++:))|(\\())(\\?)(?=[^x:)]++[:)]|[^-:)]*+-[^x:)]*+x[^:)]*+[:)])", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "3": { + "name": "support.function.tm" + } + }, + "comment": "(?y{g}-imxWDSP) (?y{w}imxWDSP-x: ...)", + "end": "(?!\\1)\\)|(?=\\1)(?=\\))|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "name": "capture-group-modify", + "patterns": [ + { + "begin": "(?<=\\?)\\G", + "end": "(:)|(\\))", + "endCaptures": { + "1": { + "name": "support.function.tm" + }, + "2": { + "name": "constant.character.set.regexp.tm markup.italic" + } + }, + "patterns": [ + { + "include": "#capture-group-modify-options" + } + ] + }, + { + "begin": "(?<=[:)])(?![)\"])", + "end": "(?=[)\"])", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + } + ] + }, + "capture-group-modify-extended": { + "patterns": [ + { + "match": "\\G\\(\\?-+:?\\)", + "name": "punctuation.definition.tag.tm" + }, + { + "begin": "\\G(?=\\(\\?[-IimxWDSPy])(?>(\\((?=[^:)]++:))|(\\())(\\?)(?=[^-:)]*+[^x:)]*+[:)])", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "3": { + "name": "support.function.tm" + } + }, + "comment": "(?y{g}imxWDSP-) (?y{w}x-imWDSP:...)", + "end": "(?!\\1)\\)|(?=\\1)(?=\\))|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "name": "capture-group-modify-extended", + "patterns": [ + { + "begin": "(?<=\\?)\\G", + "end": "(:)|(\\))", + "endCaptures": { + "1": { + "name": "support.function.tm" + }, + "2": { + "name": "constant.character.set.regexp.tm markup.italic" + } + }, + "patterns": [ + { + "include": "#capture-group-modify-options" + } + ] + }, + { + "begin": "(?<=[:)])(?![)\"])", + "end": "(?=[)\"])", + "patterns": [ + { + "include": "#$self-extended" + } + ] + } + ] + } + ] + }, + "capture-group-modify-options": { + "comment": "- i m x W D S P y{g} y{w}", + "patterns": [ + { + "match": "([imxWDSP]|y{[gw]})(?=[^:)]*?\\1)", + "name": "punctuation.definition.tag.tm" + }, + { + "begin": "-", + "beginCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "(?=[:)\"])", + "patterns": [ + { + "match": "-+", + "name": "punctuation.definition.tag.tm" + }, + { + "match": "y{[gw]}", + "name": "invalid.illegal.tm markup.underline" + }, + { + "include": "#capture-group-modify-options" + } + ] + }, + { + "match": "[imxWDSP]|y{[gw]}", + "name": "support.function.tm" + }, + { + "match": ".[^-IimxWDSPy{gw}:)]*", + "name": "invalid.illegal.tm markup.underline" + } + ] + }, + "capture-group-name": { + "begin": "\\G(\\()(\\?[<'])", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm strong" + }, + "2": { + "name": "support.function.tm" + } + }, + "comment": "(?...) (?'name'...)", + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm strong" + } + }, + "name": "meta.group.capture.named.tm", + "patterns": [ + { + "include": "#capture-group-name-name" + }, + { + "include": "$self" + } + ] + }, + "capture-group-name-extended": { + "begin": "\\G(\\()(\\?[<'])", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm strong" + }, + "2": { + "name": "support.function.tm" + } + }, + "comment": "(?...) (?'name'...)", + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm strong" + } + }, + "name": "capture-group-name", + "patterns": [ + { + "include": "#capture-group-name-name" + }, + { + "include": "#$self-extended" + } + ] + }, + "capture-group-name-name": { + "patterns": [ + { + "begin": "(?<=<)\\G[0-9[^\\w)>\"]]*", + "beginCaptures": { + "0": { + "name": "invalid.illegal.tm regex" + } + }, + "comment": "_name;0%>", + "contentName": "markup.bold regex", + "end": ">|(?=[)\"])", + "endCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + }, + { + "begin": "(?<=')\\G[0-9[^\\w)'\"]]*", + "beginCaptures": { + "0": { + "name": "invalid.illegal.tm regex" + } + }, + "comment": "_name;0%'", + "contentName": "markup.bold regex", + "end": "'|(?=[)\"])", + "endCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + } + ] + }, + "capture-group-negative-lookbehind": { + "begin": "\\G(\\()(\\?[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "endCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "patterns": [ + { + "include": "#capture-group-negative-lookbehind-invalid" + }, + { + "include": "#absent-invalid" + }, + { + "include": "$self" + } + ] + }, + "capture-group-negative-lookbehind-extended": { + "begin": "\\G(\\()(\\?[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "endCaptures": { + "1": { + "name": "constant.character.set.regexp.tm markup.italic" + }, + "2": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "patterns": [ + { + "include": "#capture-group-negative-lookbehind-invalid-extended" + }, + { + "include": "#absent-invalid-extended" + }, + { + "include": "#$self-extended" + } + ] + }, + "capture-group-negative-lookbehind-invalid": { + "patterns": [ + { + "begin": "\\G\\(\\?[!=]", + "captures": { + "0": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "comment": "(?=...)? (?!...){2,3}", + "end": "\\)(?>[+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\G\\((?!\\?[-~<>=:!{(|IimxWDSPy]|\\*[A-Za-z_])", + "captures": { + "0": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "comment": "(...)", + "end": "\\)|(?=\")", + "patterns": [ + { + "include": "#capture-group-negative-lookbehind-invalid-extended" + }, + { + "include": "#absent-invalid-extended" + }, + { + "include": "#$self-extended" + } + ] + } + ] + }, + "capture-group-negative-lookbehind-invalid-extended": { + "patterns": [ + { + "begin": "\\G\\(\\?[!=]", + "captures": { + "0": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "comment": "(?=...)? (?!...){2,3}", + "end": "\\)(?>[+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "patterns": [ + { + "include": "#capture-group-negative-lookbehind-invalid-extended" + }, + { + "include": "#absent-invalid-extended" + }, + { + "include": "#$self-extended" + } + ] + }, + { + "begin": "\\G\\((?!\\?[-~<>=:!{(|IimxWDSPy]|\\*[A-Za-z_])", + "captures": { + "0": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "comment": "(...)", + "end": "\\)|(?=\")", + "patterns": [ + { + "include": "#capture-group-negative-lookbehind-invalid-extended" + }, + { + "include": "#absent-invalid-extended" + }, + { + "include": "#$self-extended" + } + ] + } + ] + }, + "character-class": { + "begin": "(\\[)(\\^)?", + "beginCaptures": { + "1": { + "name": "support.class.tm" + }, + "2": { + "name": "support.function.tm strong" + } + }, + "comment": "[...] [^...]", + "contentName": "character-class", + "end": "(?!\\G)]|(?=\")", + "endCaptures": { + "0": { + "name": "support.class.tm" + } + }, + "patterns": [ + { + "include": "#character-class-range" + }, + { + "include": "#character-class-escape" + }, + { + "begin": "(?=\\[)", + "end": "(?!\\G)", + "patterns": [ + { + "include": "#character-class-posix" + }, + { + "include": "#character-class" + } + ] + }, + { + "include": "#character-class-literal" + } + ] + }, + "character-class-code-point": { + "comment": "\\o{0 7777777} \\x{0 1FFFFF}", + "patterns": [ + { + "begin": "\\G\\\\{2}o{(?=[0-7])", + "captures": { + "0": { + "name": "punctuation.definition.list.begin.markdown.tm" + } + }, + "end": "}|(?=\")", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.tag.tm" + }, + "2": { + "name": "constant.numeric.tm" + }, + "3": { + "name": "invalid.illegal.tm markup.underline" + } + }, + "match": "(0{,10}+)([0-7]{1,7})(?[^]\\x00-\\x1F\"&:\\[\\\\\\x7F-]+(?!-))?", + "name": "literal.tm regex" + }, + "character-class-posix": { + "patterns": [ + { + "match": "\\G\\[:\\^?:]", + "name": "posix.tm invalid.illegal.tm" + }, + { + "begin": "\\G\\[:\\^?(?=[^]:]{,20}(?(?alnum|alpha|ascii|blank|cntrl|x?digit|graph|lower|print|punct|space|upper|word)|((?i)\\g))" + }, + { + "match": "[^]:]+", + "name": "invalid.illegal.regex.tm" + } + ] + }, + { + "begin": "\\G\\[:(?=(?~(?\\\\{2}*+\"|\\\\{4}*+]))(?>$|(?alnum|alpha|ascii|blank|cntrl|x?digit|graph|lower|print|punct|space|upper|word)", + "name": "invalid.illegal.tm markup.italic" + }, + { + "match": ":", + "name": "support.function.tm markup.italic" + }, + { + "captures": { + "1": { + "name": "constant.character.escape.tm" + }, + "2": { + "name": "support.function.tm markup.italic regex" + } + }, + "match": "(\\\\{2})(])" + }, + { + "include": "#character-class-range" + }, + { + "include": "#character-class-code-point" + }, + { + "include": "#character-class-escape" + }, + { + "include": "#character-class-posix" + }, + { + "include": "#character-class-literal" + } + ] + } + ] + }, + "character-class-range": { + "patterns": [ + { + "captures": { + "1": { + "name": "character-class-range.tm invalid.illegal.tm regex" + }, + "2": { + "name": "punctuation.definition.tag.tm" + } + }, + "match": "([\\\\-\\x{10FFFF}]-(?!&&)[\\x00-Z]|[+-\\x{10FFFF}]-(?!&&)[\\x00-*])(\\\\{2}(?=-))?" + }, + { + "captures": { + "1": { + "name": "character-class-range.tm support.class.tm" + }, + "2": { + "name": "punctuation.definition.tag.tm strong" + }, + "3": { + "name": "punctuation.definition.tag.tm" + } + }, + "match": "(\\*(-)\\+)(\\\\{2}(?=-))?" + }, + { + "captures": { + "1": { + "name": "character-class-range.tm constant.numeric.tm" + }, + "2": { + "name": "strong" + }, + "3": { + "name": "punctuation.definition.tag.tm" + } + }, + "match": "([0-9](-)[0-9])(\\\\{2}(?=-))?" + }, + { + "captures": { + "1": { + "name": "character-class-range.tm variable.other.enummember.tm" + }, + "2": { + "name": "strong" + }, + "3": { + "name": "punctuation.definition.tag.tm" + } + }, + "match": "([A-Z](-)[A-Z])(\\\\{2}(?=-))?" + }, + { + "captures": { + "1": { + "name": "character-class-range.tm variable.other.enummember.tm" + }, + "2": { + "name": "strong" + }, + "3": { + "name": "punctuation.definition.tag.tm" + } + }, + "match": "([a-z](-)[a-z])(\\\\{2}(?=-))?" + }, + { + "captures": { + "1": { + "name": "keyword.control.tm" + }, + "2": { + "name": "punctuation.definition.tag.tm" + } + }, + "match": "(&&)(\\\\{2}(?=-))?" + }, + { + "//": "TODO: Convert to `begin`/`end` for better performance", + "captures": { + "0": { + "name": "character-class-range.tm support.class.tm regex" + }, + "1": { + "name": "punctuation.definition.tag.tm" + }, + "10": { + "name": "punctuation.definition.tag.tm" + }, + "2": { + "name": "constant.character.escape.tm" + }, + "3": { + "name": "strong" + }, + "4": { + "name": "punctuation.definition.tag.tm" + }, + "5": { + "name": "constant.character.escape.tm" + }, + "6": { + "patterns": [ + { + "include": "#character-class-range-code-point" + } + ] + }, + "7": { + "name": "constant.character.escape.tm" + }, + "8": { + "name": "invalid.illegal.tm regex" + }, + "9": { + "name": "support.class.tm regex", + "patterns": [ + { + "include": "#character-class-escape" + } + ] + } + }, + "comment": "For some reason (\\G|...) and any of its variations are extremely performance heavy", + "match": "\\G(?>(\\\\{2})?[]-]|(?(\\\\{2})-|(\\\\{3})\\\\|((?>\\\\{2}(?>c|[CM]-))+(?>\\\\u.{4}|\\\\{,3}.)|\\\\{2}(?>x{\\h[^}]*}|o{[0-7][^}]*}|x\\h{,2}|[0-7]{1,3})|\\\\{1,2}u.{,4})|(\\\\{2})[]\\[-]|(\\\\{2}(?i:[DHSW]|p{[^}]*})|\\[:[^]]+:])|(\\\\{1,2}[^\\\\u])|[^]\\[\\\\])(\\\\{2}(?=-))?" + }, + { + "begin": "(?=(((?>\\\\{4}|(?>\\\\{2}(?>c|[CM]-))+(?>\\\\u.{4}|\\\\{,3}.)|\\\\{2}(?>x{\\h[^}]*}|o{[0-7][^}]*}|x\\h{,2}|[0-7]{1,3}|p{[^}]*})|\\\\{1,2}u.{,4}|\\\\{1,2}[^\\\\u]|\\[:[^]]+:]|[^]\\[\\\\]))-(?!&&)\\g<2>))-?", + "beginCaptures": { + "0": { + "name": "support.class.tm" + } + }, + "end": "(?<=\\1)(?!\\G)(?>\\\\{2}(?=-))?", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.tm" + } + }, + "name": "character-class-range.tm", + "patterns": [ + { + "begin": "-", + "beginCaptures": { + "0": { + "name": "support.class.tm strong" + } + }, + "end": "(?<=-\\\\{2})(.)|(?!\\G)|(\\\\{3})(\\\\)|(\\\\{2})([]\\[])|(\\\\{2})([-:^])|(\\\\{2}(?i:[DHSW]|p{[^}]*})|\\[:[^]]+:])|(\\\\{1,2})(/)|([^]\\[\\\\])", + "endCaptures": { + "1": { + "name": "support.class.tm regex" + }, + "10": { + "name": "support.class.tm" + }, + "11": { + "name": "support.class.tm regex" + }, + "2": { + "name": "constant.character.escape.tm" + }, + "3": { + "name": "support.class.tm" + }, + "4": { + "name": "constant.character.escape.tm" + }, + "5": { + "name": "support.class.tm regex" + }, + "6": { + "name": "punctuation.definition.tag.tm" + }, + "7": { + "name": "support.class.tm regex" + }, + "8": { + "name": "invalid.illegal.tm" + }, + "9": { + "name": "punctuation.definition.tag.tm" + } + }, + "patterns": [ + { + "include": "#character-class-range-code-point" + }, + { + "include": "#character-class-escape" + } + ] + }, + { + "begin": "\\G", + "end": "(\\\\{3})(\\\\)|(\\\\{2})([]\\[-])|(\\\\{2})([:^])|(\\\\{2}(?i:[DHSW]|p{[^}]*})|\\[:[^]]+:])|(\\\\{1,2})(/)|([^]\\[\\\\-])|(?=-)", + "endCaptures": { + "1": { + "name": "constant.character.escape.tm" + }, + "10": { + "name": "support.class.tm regex" + }, + "2": { + "name": "support.class.tm" + }, + "3": { + "name": "constant.character.escape.tm" + }, + "4": { + "name": "support.class.tm regex" + }, + "5": { + "name": "punctuation.definition.tag.tm" + }, + "6": { + "name": "support.class.tm" + }, + "7": { + "name": "invalid.illegal.tm" + }, + "8": { + "name": "punctuation.definition.tag.tm" + }, + "9": { + "name": "support.class.tm" + } + }, + "patterns": [ + { + "include": "#character-class-code-point" + }, + { + "include": "#character-class-escape" + } + ] + } + ] + } + ] + }, + "character-class-range-code-point": { + "comment": "\\o{37777777777 0 1777777} \\x{FFFFFFFF 0 1FFFFF}", + "patterns": [ + { + "begin": "(\\\\{2}o{)(0{,10}+)(3?[0-7]{1,10})(?(\\h{4})|([^\"].{3,0}))" + }, + { + "captures": { + "1": { + "name": "constant.character.escape.tm" + }, + "2": { + "name": "constant.numeric.json.tm" + }, + "3": { + "name": "constant.numeric.tm", + "patterns": [ + { + "match": "\\H+", + "name": "invalid.illegal.regex.tm" + } + ] + } + }, + "match": "\\G(\\\\u)(?>(\\h{4})|([^\"].{3,0}))" + }, + { + "captures": { + "0": { + "name": "punctuation.definition.list.begin.markdown.tm" + }, + "2": { + "name": "invalid.illegal.tm regex" + }, + "3": { + "name": "constant.character.escape.tm" + }, + "4": { + "name": "markup.bold" + }, + "5": { + "name": "punctuation.definition.tag.tm" + }, + "6": { + "name": "markup.bold regex", + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + } + }, + "match": "\\G(\\\\{2}(?>c|[CM](?>-|(.))?+)(?>(\\\\{3})(\\\\)|\\g<1>|(\\\\{2})?+(\\\\u.{4,0}|\\\\?+.))?+)" + }, + { + "//": "[pP] degrades performance :shrug:", + "begin": "\\G(\\\\{2}p{)(\\^)?", + "beginCaptures": { + "1": { + "name": "variable.language.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "comment": "https://github.com/kkos/oniguruma/blob/v6.9.8/doc/UNICODE_PROPERTIES", + "end": "}|$|(?=[(){|\"])", + "endCaptures": { + "0": { + "name": "variable.language.tm" + } + }, + "name": "unicode.properties.tm", + "patterns": [ + { + "match": "[a-zA-Z1]+", + "name": "variable.other.enummember.tm" + }, + { + "match": "[ _-]+", + "name": "comment.tm" + }, + { + "match": "[^\"(){}|a-zA-Z1 _-]+", + "name": "invalid.illegal.regex.tm" + } + ] + }, + { + "//": "[pP] degrades performance :shrug:", + "begin": "\\G(\\\\{2}P{)(\\^)?", + "beginCaptures": { + "1": { + "name": "variable.language.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "comment": "https://github.com/kkos/oniguruma/blob/v6.9.8/doc/UNICODE_PROPERTIES", + "end": "}|$|(?=[(){|\"])", + "endCaptures": { + "0": { + "name": "variable.language.tm" + } + }, + "name": "unicode.properties.tm", + "patterns": [ + { + "match": "[a-zA-Z1]+", + "name": "variable.other.enummember.tm" + }, + { + "match": "[ _-]+", + "name": "comment.tm" + }, + { + "match": "[^\"(){}|a-zA-Z1 _-]+", + "name": "invalid.illegal.regex.tm" + } + ] + } + ] + }, + "code-point-sequence-separator": { + "comment": "Spaces ` `, Newlines `\n` and their unicode equivalents & \n. Tabs `\t` are not allowed", + "patterns": [ + { + "match": " +" + }, + { + "match": "\\\\n", + "name": "constant.character.escape.tm" + }, + { + "captures": { + "1": { + "name": "constant.character.escape.tm" + }, + "2": { + "name": "constant.numeric.tm" + } + }, + "match": "(\\\\u)(0020|000[aA])" + } + ] + }, + "comment-extended": { + "patterns": [ + { + "match": " +", + "name": "comment.tm" + }, + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "comment": "#...\n", + "end": "\\\\n|(?=\")|$", + "endCaptures": { + "0": { + "name": "constant.character.escape.tm" + } + }, + "name": "comment.tm", + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + } + ] + }, + "dot": { + "comment": "\\. cannot be used in character classes", + "match": "\\.", + "name": "variable.other.enummember.tm" + }, + "escape-character": { + "comment": "\\[ \\{ \\} \\( \\) \\$ \\? \\| \\^ \\* \\+ \\. \\\\ \" \b \f \n \r \t", + "patterns": [ + { + "captures": { + "1": { + "name": "constant.character.escape.tm" + }, + "2": { + "name": "entity.name.label.tm strong" + } + }, + "match": "\\G(\\\\{3})(\\\\)" + }, + { + "begin": "\\G\\\\{2}(?={(?>[0-9]+\\\\{2}?,?[0-9]*|\\\\{2}?,?[0-9]+)\\\\{2}?})", + "beginCaptures": { + "0": { + "name": "constant.character.escape.tm" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "include": "#character-literal" + } + ] + }, + { + "captures": { + "1": { + "name": "constant.character.escape.tm" + }, + "2": { + "name": "entity.name.label.tm strong regex" + } + }, + "match": "\\G(\\\\{2})([\\[()$?|^*+.])" + }, + { + "match": "\\G\\\\(\\\\|(?=/))", + "name": "punctuation.definition.tag.tm" + }, + { + "match": "\\G\\\\\"", + "name": "string.tm" + }, + { + "match": "\\G\\\\[bfnrt]", + "name": "constant.character.escape.tm" + }, + { + "comment": "single escaped characters (including at EOL)", + "match": "\\G\\\\.?", + "name": "invalid.illegal.tm regex" + } + ] + }, + "escape-character-extended": { + "captures": { + "1": { + "name": "constant.character.escape.tm" + }, + "2": { + "name": "entity.name.label.tm strong" + } + }, + "comment": "\\# \\ ", + "match": "(\\\\{2})(#| )" + }, + "escaped-anchor": { + "captures": { + "0": { + "name": "variable.tm" + }, + "1": { + "name": "invalid.illegal.tm regex" + } + }, + "comment": "\\A \\B \\b \\G \\K \\Y \\y \\Z \\z", + "match": "\\G\\\\{2}[ABbGKYyZz]([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?" + }, + "escapes": { + "begin": "(?=\\\\)", + "end": "(?!\\G)", + "patterns": [ + { + "include": "#character-types" + }, + { + "include": "#character-types-2" + }, + { + "include": "#characters" + }, + { + "include": "#escaped-anchor" + }, + { + "include": "#subroutine" + }, + { + "include": "#backreference" + }, + { + "include": "#code-point" + }, + { + "include": "#escape-character" + } + ] + }, + "groups": { + "begin": "(?=\\()", + "end": "(?!\\G)", + "patterns": [ + { + "include": "#absent" + }, + { + "include": "#callout" + }, + { + "include": "#non-capture-group" + }, + { + "include": "#capture-group-modify" + }, + { + "include": "#capture-group-modify-extended" + }, + { + "include": "#capture-group-conditional" + }, + { + "include": "#capture-group-negative-lookbehind" + }, + { + "include": "#capture-group-lookbehind" + }, + { + "include": "#capture-group-lookahead" + }, + { + "include": "#capture-group-comment" + }, + { + "include": "#capture-group-name" + }, + { + "include": "#capture-group" + } + ] + }, + "groups-extended": { + "begin": "(?=\\()", + "end": "(?!\\G)", + "patterns": [ + { + "include": "#absent-extended" + }, + { + "include": "#callout" + }, + { + "include": "#non-capture-group-extended" + }, + { + "include": "#capture-group-comment" + }, + { + "include": "#capture-group-modify-extended" + }, + { + "include": "#capture-group-modify" + }, + { + "include": "#capture-group-conditional-extended" + }, + { + "include": "#capture-group-negative-lookbehind-extended" + }, + { + "include": "#capture-group-lookbehind-extended" + }, + { + "include": "#capture-group-lookahead-extended" + }, + { + "include": "#capture-group-name-extended" + }, + { + "include": "#capture-group-extended" + } + ] + }, + "invalid": { + "comment": "invalid: Rogue right brackets, unescaped double quotes and any invalid control characters", + "match": "[)\"\\x00-\\x1F\\x7F]", + "name": "invalid.illegal.tm regex" + }, + "non-capture-group": { + "begin": "\\G(\\()(\\?[:>])", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "support.function.tm regex" + } + }, + "comment": "(?:...) (?>...)", + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + "non-capture-group-extended": { + "begin": "\\G(\\()(\\?[:>])", + "beginCaptures": { + "1": { + "name": "constant.character.set.regexp.tm" + }, + "2": { + "name": "support.function.tm regex" + } + }, + "comment": "(?:...) (?>...)", + "end": "\\)|(?=\")", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "patterns": [ + { + "include": "#$self-extended" + } + ] + }, + "quantifier": { + "comment": "+ * ? {1,9}", + "patterns": [ + { + "comment": "For some reason (\\G|...) and any of its variations are extremely performance heavy", + "match": "\\G(?>[+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})", + "name": "invalid.illegal.tm" + }, + { + "comment": "For some reason it isn't very performant using ^", + "match": "\\A(?>[+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})", + "name": "invalid.illegal.tm" + }, + { + "captures": { + "0": { + "name": "keyword.tm" + }, + "1": { + "name": "strong" + } + }, + "comment": "+ * ? ++ +? *+ *? ?+ ?? \n ? creates a lazy quantifier and + a possessive quantifier", + "match": "[+*?]([+?])?" + }, + { + "begin": "(?={)", + "end": "(?!\\G)", + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.tm" + }, + "10": { + "name": "keyword.tm strong" + }, + "2": { + "name": "constant.numeric.tm" + }, + "3": { + "name": "punctuation.definition.tag.tm" + }, + "4": { + "name": "invalid.illegal.tm" + }, + "5": { + "name": "support.function.tm" + }, + "6": { + "name": "constant.numeric.tm" + }, + "7": { + "name": "punctuation.definition.tag.tm" + }, + "8": { + "name": "invalid.illegal.tm" + }, + "9": { + "name": "keyword.tm" + } + }, + "match": "\\G({)((0*)(?>100000|[0-9]{1,5})([0-9]*)|(?=,[0-9]))(,)?((0*)(?>100000|[0-9]{1,5})([0-9]*))?(})((?<=,[0-9]?)\\?)?" + }, + { + "begin": "\\G(?={(?>[0-9]+\\\\{2}?,?[0-9]*|\\\\{2}?,?[0-9]+)\\\\{2}?})", + "contentName": "entity.name.label.tm strong regex", + "end": "\\\\{2}", + "endCaptures": { + "0": { + "name": "constant.character.escape.tm" + } + } + }, + { + "include": "#character-literal" + } + ] + } + ] + }, + "subroutine": { + "begin": "\\G(\\\\{2}g)((<)|')", + "beginCaptures": { + "1": { + "name": "string.regexp.tm" + }, + "2": { + "name": "constant.character.set.regexp.tm" + } + }, + "comment": "\\g<0> \\g'+999' \\g<-0065535> \\g'name_123' \\g<_\\#°$°% ^&(\"'[0-9]>", + "end": "(?!\\3)>|(?=\\3)'|(?=[)\"])", + "endCaptures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "name": "subroutine.tm", + "patterns": [ + { + "comment": "Capture group reference number", + "match": "(?)])", + "name": "markup.bold.tm regex", + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + }, + { + "begin": "(?)])", + "name": "markup.bold.tm regex", + "patterns": [ + { + "include": "source.json.textmate#escape-characters" + } + ] + }, + { + "include": "source.json.textmate#escape-characters" + }, + { + "match": ".[^\\\\\"\\w)'>+-]*", + "name": "invalid.illegal.tm regex" + } + ] + }, + "test": { + "//match": "(*FAIL).", + "comment": "Just a easy spot for testing", + "name": "token.debug-token strong regex" + } + }, + "scopeName": "source.json.textmate.regexp", + "version": "https://github.com/RedCMD/TmLanguage-Syntax-Highlighter/blob/main/syntaxes/regex.tmLanguage.json" +} diff --git a/packages/tm-grammars/raw/json-textmate.json b/packages/tm-grammars/raw/json-textmate.json new file mode 100644 index 00000000..94bd5017 --- /dev/null +++ b/packages/tm-grammars/raw/json-textmate.json @@ -0,0 +1,2458 @@ +{ + "$schema": "https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/vscode.tmLanguage.schema.json", + "displayName": "JSON TextMate", + "injections": { + "L:capture-group-lookbehind -capture-group-modify-extended -character-class -comment": { + "patterns": [ + { + "include": "source.json.textmate.regexp#capture-group-lookbehind-invalid" + }, + { + "include": "source.json.textmate.regexp#absent-invalid" + } + ] + }, + "L:capture-group-lookbehind-extended -capture-group-modify -character-class -comment": { + "patterns": [ + { + "include": "source.json.textmate.regexp#capture-group-lookbehind-invalid-extended" + }, + { + "include": "source.json.textmate.regexp#absent-invalid-extended" + } + ] + }, + "L:capture-group-negative-lookbehind -capture-group-modify-extended -character-class -comment": { + "patterns": [ + { + "include": "source.json.textmate.regexp#capture-group-negative-lookbehind-invalid" + }, + { + "include": "source.json.textmate.regexp#absent-invalid" + } + ] + }, + "L:capture-group-negative-lookbehind-extended -capture-group-modify -character-class -comment": { + "patterns": [ + { + "include": "source.json.textmate.regexp#capture-group-negative-lookbehind-invalid-extended" + }, + { + "include": "source.json.textmate.regexp#absent-invalid-extended" + } + ] + } + }, + "name": "json-textmate", + "patterns": [ + { + "include": "#root" + }, + { + "include": "#fallback" + } + ], + "repository": { + "$schema": { + "begin": "(\")(\\$schema)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.schema.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"$schema\": \"...\"", + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "include": "#string" + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "applyEndPatternLast": { + "begin": "(\")(applyEndPatternLast)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.applyEndPatternLast.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"applyEndPatternLast\": true", + "end": "(?<=\\w)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\\w)|(?=[},])", + "patterns": [ + { + "match": "true|false|null", + "name": "keyword.constant.$0.json.tm" + }, + { + "match": "-?[0-9]+", + "name": "constant.numeric.json.tm" + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "array-separator": { + "patterns": [ + { + "begin": "\\G(?=\\s|,|$)|,", + "beginCaptures": { + "0": { + "name": "punctuation.separator.array.json.tm" + } + }, + "end": "(?!\\s|,|$)", + "patterns": [ + { + "match": ",", + "name": "invalid.illegal.duplicate-array-separator.json.tm" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + "capture": { + "begin": "(\")([0-9]{1,3})(.*?(?beginC|whileC|endC|c)aptures)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.$2.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"captures\": { ... }", + "end": "(?<=}|])|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=}|])|(?=[},])", + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "include": "#capture" + }, + { + "include": "#include" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.json.tm" + } + }, + "comment": "An array of `\"captures\"` is not officially supported by VSCode TextMate. But still happens to work because JavaScript", + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.json.tm" + } + }, + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "comment": "All normal \"patterns\" rules are allowed here. With the exception of \"include\". But only when they are paired with \"patterns\"" + }, + { + "include": "#name" + }, + { + "include": "#contentName" + }, + { + "include": "#match" + }, + { + "include": "#patterns" + }, + { + "include": "#captures" + }, + { + "include": "#repository" + }, + { + "include": "#applyEndPatternLast" + }, + { + "include": "#id" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "include": "#array-separator" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "comment": { + "patterns": [ + { + "//": "Vscode's TextMate does NOT acknowledge \"comment\" but instead just ignores it like all other unsupported keys", + "begin": "(\")(comment)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.comment.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"comment\": \"...\"", + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "name": "quoted.double.json.tm comment.json.tm", + "patterns": [ + { + "captures": { + "1": { + "name": "constant.character.escape.json.tm" + } + }, + "match": "(\\\\)/" + }, + { + "include": "#escape-characters" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "//": { + "object": { + "array": [ + "string", + true, + 999, + { + }, + [ + ] + ] + } + }, + "begin": "(\")(//)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.comment-slash.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"//\": ...", + "end": "(?<=[]}\"])(?!\\G)|(?=[},])", + "patterns": [ + { + "include": "#comment-slash-pair" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "begin": "(\")(information_for_contributors)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.information_for_contributors.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"information_for_contributors\": ...", + "end": "(?<=[]}\"])(?!\\G)|(?=[},])", + "patterns": [ + { + "include": "#comment-slash-pair" + }, + { + "include": "#dictionary-separator" + } + ] + } + ], + "repository": { + "comment-slash-array": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.json.tm" + } + }, + "comment": "[ ... ]", + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.json.tm" + } + }, + "patterns": [ + { + "include": "#comment-slash-dictionary" + }, + { + "include": "#comment-slash-array" + }, + { + "include": "#comment-slash-string" + }, + { + "include": "#array-separator" + } + ] + }, + "comment-slash-dictionary": { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "comment": "{ ... }", + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "begin": "(?=\")", + "comment": "\"...\": ...", + "end": "(?<=[]}])|(?<=\")(?!:)(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "name": "comment.double.slash.json.tm", + "patterns": [ + { + "include": "#escape-characters" + } + ] + }, + { + "include": "#comment-slash-pair" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "comment-slash-pair": { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "comment": ": ...", + "end": "(?<=[]}\"])|(?=[},])", + "patterns": [ + { + "include": "#comment-slash-dictionary" + }, + { + "include": "#comment-slash-array" + }, + { + "include": "#comment-slash-string" + }, + { + "include": "#json-value" + } + ] + }, + "comment-slash-string": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "comment": "\"...\"", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "name": "comment.double.slash.json.tm", + "patterns": [ + { + "include": "#escape-characters" + } + ] + } + } + }, + "comments": { + "patterns": [ + { + "begin": "/\\*\\*(?!/)", + "captures": { + "0": { + "name": "invalid.illegal.punctuation.definition.comment.json.tm" + } + }, + "end": "\\*/", + "name": "comment.block.documentation.json.tm" + }, + { + "begin": "/\\*", + "captures": { + "0": { + "name": "invalid.illegal.punctuation.definition.comment.json.tm" + } + }, + "end": "\\*/", + "name": "comment.block.json.tm" + }, + { + "begin": "//", + "captures": { + "0": { + "name": "invalid.illegal.punctuation.definition.comment.json.tm" + } + }, + "end": "$", + "name": "comment.line.double-slash.json.tm" + } + ] + }, + "contentName": { + "begin": "(\")(contentName)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.contentName.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"contentName\": \"...\"", + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "include": "#name_scopes" + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "dictionary-separator": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#json-pair" + }, + { + "begin": "\\G(?=\\s|,|$)|,", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.json.tm" + } + }, + "end": "(?!\\s|,|$)", + "patterns": [ + { + "match": ",", + "name": "invalid.illegal.duplicate-dictionary-separator.json.tm" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + "escape-characters": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.tag.json.tm" + } + }, + "match": "(\\\\)/" + }, + { + "captures": { + "1": { + "name": "constant.character.escape.json.tm" + } + }, + "match": "(\\\\)[\\\\\"]" + }, + { + "match": "\\\\[bfnrt]", + "name": "constant.character.escape.json.tm" + }, + { + "captures": { + "1": { + "name": "constant.character.escape.json.tm" + }, + "2": { + "name": "constant.numeric.json.tm" + }, + "3": { + "comment": "Fallback if `\\h{4}` fails. \"patterns\" inside a (capture) causes a performance hit", + "name": "constant.numeric.json.tm", + "patterns": [ + { + "match": "\\H+", + "name": "invalid.illegal.regex.json.tm" + } + ] + } + }, + "match": "(\\\\u)(\\h{4,0})" + }, + { + "match": "\\\\.?|[\"\\x00-\\x1F\\x7F]", + "name": "invalid.illegal.json.tm markup.underline regex" + } + ] + }, + "fallback": { + "comment": "Fallback for when only part of the file is loaded or code snippets inside a hover", + "patterns": [ + { + "include": "#version" + }, + { + "include": "#$schema" + }, + { + "include": "#match" + }, + { + "include": "#captures" + }, + { + "include": "#name" + }, + { + "include": "#contentName" + }, + { + "include": "#scopeName" + }, + { + "include": "#fileTypes" + }, + { + "include": "#firstLineMatch" + }, + { + "include": "#foldingStartMarker" + }, + { + "include": "#foldingStopMarker" + }, + { + "include": "#injectionSelector" + }, + { + "include": "#injections" + }, + { + "include": "#include" + }, + { + "include": "#applyEndPatternLast" + }, + { + "include": "#patterns" + }, + { + "include": "#repository" + }, + { + "include": "#uuid" + }, + { + "include": "#comment" + }, + { + "include": "#capture" + }, + { + "include": "#repo" + }, + { + "match": ",", + "name": "punctuation.separator.json.tm" + }, + { + "begin": "\\A(?!$|\\s*{\\s*(?>$|})|\\s*\\[\\s*(?>$|\\[|{)|[^\t]*\t|(?>[^\\\\\"]+|\\\\.)*+.)", + "comment": "This must be strict. So to reduce false positives", + "end": "(?=[)\"])|$", + "name": "meta.embedded.json.textmate.regexp", + "patterns": [ + { + "include": "source.json.textmate.regexp" + }, + { + "comment": "Fallback if `source.json.textmate.regexp` fails", + "include": "#escape-characters" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + "fileTypes": { + "//": "Vscode's TextMate acknowledges \"fileTypes\" but doesn't do anything with it", + "begin": "(\")(fileTypes)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.fileTypes.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"fileTypes\": [ \"...\" ]", + "end": "(?<=])|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=])|(?=[},])", + "patterns": [ + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.json.tm" + } + }, + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.json.tm" + } + }, + "patterns": [ + { + "include": "#string" + }, + { + "include": "#array-separator" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "firstLineMatch": { + "begin": "(\")(firstLineMatch)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.firstLineMatch.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"firstLineMatch\": \"...\"", + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "contentName": "meta.embedded.json.textmate.regexp", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "patterns": [ + { + "include": "source.json.textmate.regexp" + }, + { + "comment": "Fallback if `source.json.textmate.regexp` fails", + "include": "#escape-characters" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "foldingStartMarker": { + "begin": "(\")(foldingStartMarker)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.foldingStartMarker.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"foldingStartMarker\": \"...\"", + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "contentName": "meta.embedded.json.textmate.regexp", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "patterns": [ + { + "include": "source.json.textmate.regexp" + }, + { + "comment": "Fallback if `source.json.textmate.regexp` fails", + "include": "#escape-characters" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "foldingStopMarker": { + "begin": "(\")(foldingStopMarker)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.foldingStopMarker.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"foldingStopMarker\": \"...\"", + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "contentName": "meta.embedded.json.textmate.regexp", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "patterns": [ + { + "include": "source.json.textmate.regexp" + }, + { + "comment": "Fallback if `source.json.textmate.regexp` fails", + "include": "#escape-characters" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "id": { + "begin": "(\")(id)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "invalid.illegal.keyword.property-name.string.id.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"id\": 1", + "end": "(?<=\\S)(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\\w)|(?=[},])", + "patterns": [ + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "include": { + "begin": "(\")(include)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.include.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"include\": \"...#...\"", + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "contentName": "regex", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "patterns": [ + { + "begin": "\\G(?=(?>(?>[^\\\\\"#]++|\\\\[\\\\\"]?)*#|#?)\\$base\")", + "contentName": "markup.strikethrough.json.tm", + "end": "((#)?\\$)(base)", + "endCaptures": { + "1": { + "name": "keyword.json.tm" + }, + "2": { + "name": "markup.strikethrough.json.tm" + }, + "3": { + "name": "support.function.json.tm" + } + }, + "patterns": [ + { + "include": "#scope-string" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.json.tm" + }, + "2": { + "name": "markup.strikethrough.json.tm" + }, + "3": { + "name": "support.function.json.tm" + } + }, + "match": "\\G((#)?\\$)(self)(?=\")" + }, + { + "captures": { + "0": { + "name": "markup.strikethrough.json.tm" + }, + "1": { + "name": "keyword.json.tm" + }, + "2": { + "name": "support.function.json.tm" + } + }, + "match": "(#\\$)(self)(?=\")" + }, + { + "match": "(?!\\G)#?(?=\")", + "name": "keyword.json.tm markup.strikethrough.json.tm" + }, + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "keyword.json.tm" + } + }, + "contentName": "variable.json.tm", + "end": "(?=\")", + "patterns": [ + { + "include": "#escape-characters" + } + ] + }, + { + "include": "#scope-string" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "injection": { + "begin": "(?=\")", + "comment": "\"...\": { ... }", + "end": "(?<=})|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "contentName": "meta.embedded.injection.tm", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "patterns": [ + { + "include": "#injection-string" + } + ] + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=})|(?=[},])", + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "include": "#patterns" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "injection-string": { + "comment": "All non-functional characters are treated as whitespace. This includes whitespace ` ` and asterisk `*`. [^\\w.,:|()-]", + "patterns": [ + { + "match": "(?>\\\\[\\\\\"/bfnrt])+", + "name": "comment.injection.whitespace.tm" + }, + { + "include": "#escape-characters" + }, + { + "begin": "[)|]", + "end": "(?=\")", + "name": "comment.injection.whitespace.tm" + }, + { + "captures": { + "1": { + "name": "comment.injection.whitespace.tm" + }, + "2": { + "name": "support.function.tm" + } + }, + "match": "(?<=(?>^|[^\\\\])\"|,)((?>\\\\[\\\\\"/bfnrt]|[^\\\\\"\\w.:|()-])*)([LR]:|[\\w.:]:(?![\\w.:-]))" + }, + { + "begin": "(?>text|source)(?=\\.[\\w.:])", + "beginCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "(?![\\w.:-])", + "name": "string", + "patterns": [ + { + "match": "\\.", + "name": "support.function.tm" + } + ] + }, + { + "match": "[\\w.:][\\w.:-]*", + "name": "string $0" + }, + { + "begin": "\\(", + "captures": { + "0": { + "name": "constant.character.set.regexp.tm" + } + }, + "end": "\\)|(?=\")", + "patterns": [ + { + "match": "(?<=[,|])(?>\\\\[\\\\\"/bfnrt]|[^\\\\\\w.:()-])+", + "name": "comment.injection.whitespace.tm" + }, + { + "match": "\\|", + "name": "keyword.control.tm" + }, + { + "include": "#injection-string" + } + ] + }, + { + "match": "(?>\\\\[\\\\\"/bfnrt]|[^\\\\\"\\w.:,|()-])+", + "name": "comment.injection.whitespace.tm" + }, + { + "match": "(?<=,)(?>\\\\[\\\\\"/bfnrt]|[^\\\\\"\\w.:|()-])+", + "name": "comment.injection.whitespace.tm" + }, + { + "match": ",", + "name": "keyword.control.tm" + }, + { + "match": "-(?>\\\\[\\\\\"/bfnrt]|[^\\\\\"\\w.:|()-])*-", + "name": "comment.injection.whitespace.tm" + }, + { + "begin": "-", + "beginCaptures": { + "0": { + "name": "support.function.tm" + } + }, + "end": "(?=[\"\t\n,|()-])", + "name": "emphasis", + "patterns": [ + { + "include": "#injection-string" + } + ] + }, + { + "match": "-", + "name": "support.function.tm" + } + ] + }, + "injectionSelector": { + "begin": "(\")(injectionSelector)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.injectionSelector.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"injectionSelector\": \"...\"", + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "include": "#injectionSelectorValue" + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "injectionSelectorValue": { + "comment": "\"...\" [ ... ]", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "patterns": [ + { + "include": "#injection-string" + } + ] + }, + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.json.tm" + } + }, + "comment": "An array of `\"injectionSelector\"` is not officially supported by VSCode TextMate. But still happens to work because JavaScript", + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.json.tm" + } + }, + "patterns": [ + { + "include": "#injectionSelectorValue" + }, + { + "include": "#array-separator" + } + ] + } + ] + }, + "injections": { + "begin": "(\")(injections)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.injectionSelector.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"injections\": { ... }", + "end": "(?<=})|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=})|(?=[},])", + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "include": "#injection" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "json-array": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.json.tm" + } + }, + "comment": "[ ... ]", + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.json.tm" + } + }, + "patterns": [ + { + "include": "#array-separator" + } + ] + }, + "json-dictionary": { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "comment": "{ ... }", + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "include": "#dictionary-separator" + } + ] + }, + "json-pair": { + "begin": "(?=\")", + "comment": "\"...\": ...", + "end": "(?<=[]}])(?!\\G)|(?!\\G)(?=[},\"])", + "patterns": [ + { + "begin": "\\G\"", + "beginCaptures": { + "0": { + "name": "punctuation.support.type.property-name.begin.json.tm" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.support.type.property-name.end.json.tm" + } + }, + "name": "string.json.tm support.type.property-name.json.tm", + "patterns": [ + { + "match": "\\\\[\"\\\\/bfnrt]", + "name": "constant.character.escape.json.tm" + }, + { + "match": "\\\\u\\h{4}", + "name": "constant.character.escape.json.tm" + }, + { + "match": "\\\\.?", + "name": "invalid.illegal.unrecognized-string-escape.json.tm" + } + ] + }, + { + "begin": ":", + "end": "(?<=[]}\"])|(?=[},])", + "patterns": [ + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "json-value": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#json-dictionary" + }, + { + "include": "#json-array" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "comment": "\"...\"", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "name": "string.quoted.double.json.tm", + "patterns": [ + { + "match": "\\\\[\"\\\\/bfnrt]", + "name": "constant.character.escape.json.tm" + }, + { + "match": "\\\\u\\h{4}", + "name": "constant.character.escape.json.tm" + }, + { + "match": "\\\\.?", + "name": "invalid.illegal.unrecognized-string-escape.json.tm" + }, + { + "match": "[\\x00-\\x1F\\x7F]+", + "name": "invalid.illegal.control-character.json.tm" + } + ] + }, + { + "match": "\\btrue\\b", + "name": "constant.language.json.tm" + }, + { + "match": "\\bfalse\\b", + "name": "constant.language.json.tm" + }, + { + "match": "\\bnull\\b", + "name": "constant.language.json.tm" + }, + { + "match": "-?(?>0|[1-9][0-9]*)(?>\\.[0-9]+)?(?>[eE][+-]?[0-9]+)?", + "name": "constant.numeric.json.tm" + }, + { + "match": "\\S[^,:/{}\\[\\]\\s\"]*", + "name": "invalid.illegal.expected-separator.json.tm" + } + ] + }, + "match": { + "begin": "(\")(match|begin|while|end)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.$2.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"match\": \"...\"", + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "contentName": "meta.embedded.json.textmate.regexp", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "patterns": [ + { + "include": "source.json.textmate.regexp" + }, + { + "comment": "Fallback if `source.json.textmate.regexp` fails", + "include": "#escape-characters" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "name": { + "begin": "(\")(name)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.name.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"name\": \"...\"", + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "include": "#name_scopes" + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "name_display": { + "begin": "(\")(name)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.name.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"name\": \"...\"", + "end": "(?<=\")(?!\\G)|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=\")|(?=[},])", + "patterns": [ + { + "include": "#string" + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "name_scopes": { + "//": [ + "replaceCaptures `$1` removes all leading dots `.`", + "Causing us to deviate from VSCode TextMate", + "If a scopename is placed at the beginning of \"name\" and has leading dots `.`", + " \"name\": \"...keyword\" ", + "The dots will be striped by `$1` and it will appear that `...keyword` matches the scopename `keyword`, highlighting it", + "We can *partially* correct this by putting another character in front of the first dot `.`", + "Sadly the beginning double quote `\"` is the only one available to us. Space ` ` would have been nicer", + "and it ends up showing up in `Inspect Editor Tokens and Scopes`. Once again deviating from VSCode TextMate", + "However, I doubt anyone would create a scopename starting with a double quote `\"` and leading dots `.`", + " \"...scopename " + ], + "begin": "(?=(\"\\.(?>[^\\\\\"]++|\\\\.)*)\")\"|\"(?=((?>[^\\\\\"]++|\\\\.)*)\")", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "comment": "\"...\"", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "name": "$1$2", + "patterns": [ + { + "include": "#escape-characters" + }, + { + "match": "\\b(?>comment|string|regex|meta\\.embedded)\\b", + "name": "markup.italic" + }, + { + "captures": { + "1": { + "name": "meta.embedded constant.character.escape.json.tm markup.italic" + }, + "2": { + "name": "punctuation.definition.tag.json.tm" + }, + "3": { + "name": "constant.numeric.json.tm" + } + }, + "comment": "An invalid capture group number does not convert, nor becomes null", + "match": "(\\$)(0*)([0-9]{3,1})(?![0-9])" + }, + { + "captures": { + "1": { + "name": "meta.embedded constant.character.escape.json.tm markup.italic.tm" + }, + "2": { + "name": "meta.embedded constant.character.escape.json.tm" + }, + "3": { + "name": "punctuation.definition.tag.json.tm" + }, + "4": { + "name": "constant.numeric.json.tm" + }, + "5": { + "name": "constant.character.escape.json.tm" + }, + "6": { + "name": "markup.heading.json.tm" + }, + "7": { + "name": "meta.embedded constant.character.escape.json.tm" + } + }, + "match": "(\\$)({)(0*)([0-9]{3,1})(:/)(upcase|downcase)(})" + } + ] + }, + "patterns": { + "begin": "(\")(patterns)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.patterns.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"patterns\": [ ... ]", + "end": "(?<=])|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=])|(?=[},])", + "patterns": [ + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.json.tm" + } + }, + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.json.tm" + } + }, + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "comment": "{ ... }", + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "include": "#name" + }, + { + "include": "#contentName" + }, + { + "include": "#match" + }, + { + "include": "#include" + }, + { + "include": "#patterns" + }, + { + "include": "#captures" + }, + { + "include": "#repository" + }, + { + "include": "#applyEndPatternLast" + }, + { + "include": "#id" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "include": "#array-separator" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "repo": { + "begin": "(?=\")", + "comment": "\"...\": { ... }", + "end": "(?<=})|(?=[},])", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.tm" + } + }, + "contentName": "variable.json.tm regex", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "patterns": [ + { + "match": "\\G\\$(?>self|base)(?=\")", + "name": "markup.strikethrough.json.tm" + }, + { + "include": "#escape-characters" + } + ] + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=})|(?=[},])", + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "include": "#name" + }, + { + "include": "#contentName" + }, + { + "include": "#match" + }, + { + "include": "#captures" + }, + { + "include": "#patterns" + }, + { + "include": "#include" + }, + { + "include": "#repository" + }, + { + "include": "#applyEndPatternLast" + }, + { + "include": "#id" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "include": "#json-value" + } + ] + } + ] + }, + "repository": { + "begin": "(\")(repository)(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.json.tm" + }, + "2": { + "name": "keyword.property-name.string.repository.json.tm" + }, + "3": { + "name": "punctuation.definition.string.end.json.tm" + } + }, + "comment": "\"repository\": { ... }", + "end": "(?<=})|(?=[},])", + "patterns": [ + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.tm" + } + }, + "end": "(?<=})|(?=[},])", + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "include": "#repo" + }, + { + "include": "#dictionary-separator" + } + ] + }, + { + "include": "#json-value" + } + ] + }, + { + "include": "#dictionary-separator" + } + ] + }, + "root": { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.tm" + } + }, + "comment": "{ ... }", + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.tm" + } + }, + "patterns": [ + { + "include": "#version" + }, + { + "include": "#$schema" + }, + { + "include": "#name_display" + }, + { + "include": "#scopeName" + }, + { + "include": "#fileTypes" + }, + { + "include": "#firstLineMatch" + }, + { + "include": "#foldingStartMarker" + }, + { + "include": "#foldingStopMarker" + }, + { + "include": "#injectionSelector" + }, + { + "include": "#injections" + }, + { + "include": "#patterns" + }, + { + "include": "#repository" + }, + { + "include": "#uuid" + }, + { + "include": "#dictionary-separator" + } + ] + }, + "scope-string": { + "patterns": [ + { + "match": "(?<= |\")(?>source|text)\\.(?![ \"#])", + "name": "support.function.json.tm" + }, + { + "match": "(?text|source)\\b", + "name": "support.function.json.tm" + }, + { + "match": "(?[0-9]+\\\\{2}?,?[0-9]*|\\\\{2}?,?[0-9]+)\\\\{2}?})", + "end": "(?!\\G)", + "beginCaptures": { "0": { "name": "constant.character.escape.tm" } }, + "patterns": [ { "include": "#character-literal" } ] + }, + { + "match": "\\G(\\\\{2})([\\[()$?|^*+.])", + "captures": { + "1": { "name": "constant.character.escape.tm" }, + "2": { "name": "entity.name.label.tm strong regex" } + } + }, + { + "match": "\\G\\\\(\\\\|(?=/))", + "name": "punctuation.definition.tag.tm" + }, + { + "match": "\\G\\\\\"", + "name": "string.tm" + }, + { + "match": "\\G\\\\[bfnrt]", + "name": "constant.character.escape.tm" + }, + { + "comment": "single escaped characters (including at EOL)", + "match": "\\G\\\\.?", + "name": "invalid.illegal.tm regex" + } + ] + }, + "escape-character-extended": { + "comment": "\\# \\ ", + "match": "(\\\\{2})(#| )", + "captures": { + "1": { "name": "constant.character.escape.tm" }, + "2": { "name": "entity.name.label.tm strong" } + } + }, + "groups": { + "begin": "(?=\\()", + "end": "(?!\\G)", + "patterns": [ + { "include": "#absent" }, + { "include": "#callout" }, + { "include": "#non-capture-group" }, + { "include": "#capture-group-modify" }, + { "include": "#capture-group-modify-extended" }, + { "include": "#capture-group-conditional" }, + { "include": "#capture-group-negative-lookbehind" }, + { "include": "#capture-group-lookbehind" }, + { "include": "#capture-group-lookahead" }, + { "include": "#capture-group-comment" }, + { "include": "#capture-group-name" }, + { "include": "#capture-group" } + ] + }, + "groups-extended": { + "begin": "(?=\\()", + "end": "(?!\\G)", + "patterns": [ + { "include": "#absent-extended" }, + { "include": "#callout" }, + { "include": "#non-capture-group-extended" }, + { "include": "#capture-group-comment" }, + { "include": "#capture-group-modify-extended" }, + { "include": "#capture-group-modify" }, + { "include": "#capture-group-conditional-extended" }, + { "include": "#capture-group-negative-lookbehind-extended" }, + { "include": "#capture-group-lookbehind-extended" }, + { "include": "#capture-group-lookahead-extended" }, + { "include": "#capture-group-name-extended" }, + { "include": "#capture-group-extended" } + ] + }, + "escapes": { + "begin": "(?=\\\\)", + "end": "(?!\\G)", + "patterns": [ + { "include": "#character-types" }, + { "include": "#character-types-2" }, + { "include": "#characters" }, + { "include": "#escaped-anchor" }, + { "include": "#subroutine" }, + { "include": "#backreference" }, + { "include": "#code-point" }, + { "include": "#escape-character" } + ] + }, + "capture-group": { + "comment": "( ... )", + "begin": "\\G\\(", + "end": "\\)|(?=\")", + "captures": { "0": { "name": "constant.character.set.regexp.tm strong" } }, + "patterns": [ { "include": "$self" } ] + }, + "capture-group-extended": { + "comment": "( ... )", + "begin": "\\G\\(", + "end": "\\)|(?=\")", + "captures": { "0": { "name": "constant.character.set.regexp.tm strong" } }, + "patterns": [ { "include": "#$self-extended" } ] + }, + "non-capture-group": { + "comment": "(?:...) (?>...)", + "begin": "\\G(\\()(\\?[:>])", + "end": "\\)|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm" }, + "2": { "name": "support.function.tm regex" } + }, + "endCaptures": { "0": { "name": "constant.character.set.regexp.tm" } }, + "patterns": [ { "include": "$self" } ] + }, + "non-capture-group-extended": { + "comment": "(?:...) (?>...)", + "begin": "\\G(\\()(\\?[:>])", + "end": "\\)|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm" }, + "2": { "name": "support.function.tm regex" } + }, + "endCaptures": { "0": { "name": "constant.character.set.regexp.tm" } }, + "patterns": [ { "include": "#$self-extended" } ] + }, + "capture-group-lookahead": { + "comment": "(?=...) (?!...)", + "begin": "\\G(\\()(\\?[!=])", + "end": "(\\))([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "support.function.tm" } + }, + "endCaptures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "invalid.illegal.tm markup.underline" } + }, + "patterns": [ { "include": "$self" } ] + }, + "capture-group-lookahead-extended": { + "comment": "(?=...) (?!...)", + "begin": "\\G(\\()(\\?[!=])", + "end": "(\\))([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "support.function.tm" } + }, + "endCaptures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "invalid.illegal.tm markup.underline" } + }, + "patterns": [ { "include": "#$self-extended" } ] + }, + "capture-group-lookbehind": { + "comment": "(?<=...)", + "begin": "\\G(\\()(\\?<=)", + "end": "(\\))([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "support.function.tm regex" } + }, + "endCaptures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "invalid.illegal.tm markup.underline" } + }, + "contentName": "capture-group-lookbehind", + "patterns": [ + { "include": "#capture-group-lookbehind-invalid" }, + { "include": "#absent-invalid" }, + { "include": "$self" } + ] + }, + "capture-group-lookbehind-extended": { + "comment": "(?<=...)", + "begin": "\\G(\\()(\\?<=)", + "end": "(\\))([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "support.function.tm regex" } + }, + "endCaptures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "invalid.illegal.tm markup.underline" } + }, + "contentName": "capture-group-lookbehind-extended", + "patterns": [ + { "include": "#capture-group-lookbehind-invalid-extended" }, + { "include": "#absent-invalid-extended" }, + { "include": "#$self-extended" } + ] + }, + "capture-group-lookbehind-invalid": { + "comment": "(?=...)? (?!...)+ (?[+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "captures": { + "0": { "name": "invalid.illegal.tm markup.underline" }, + "1": { "name": "regex" } + }, + "patterns": [ + { "include": "#capture-group-lookbehind-invalid" }, + { "include": "#absent-invalid" }, + { "include": "$self" } + ] + }, + "capture-group-lookbehind-invalid-extended": { + "comment": "(?=...)? (?!...)+ (?[+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "captures": { + "0": { "name": "invalid.illegal.tm markup.underline" }, + "1": { "name": "regex" } + }, + "patterns": [ + { "include": "#capture-group-lookbehind-invalid-extended" }, + { "include": "#absent-invalid-extended" }, + { "include": "#$self-extended" } + ] + }, + "capture-group-negative-lookbehind": { + "comment": "(?[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "support.function.tm regex" } + }, + "endCaptures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "invalid.illegal.tm markup.underline" } + }, + "contentName": "capture-group-negative-lookbehind", + "patterns": [ + { "include": "#capture-group-negative-lookbehind-invalid" }, + { "include": "#absent-invalid" }, + { "include": "$self" } + ] + }, + "capture-group-negative-lookbehind-extended": { + "comment": "(?[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "support.function.tm regex" } + }, + "endCaptures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "invalid.illegal.tm markup.underline" } + }, + "contentName": "capture-group-negative-lookbehind-extended", + "patterns": [ + { "include": "#capture-group-negative-lookbehind-invalid-extended" }, + { "include": "#absent-invalid-extended" }, + { "include": "#$self-extended" } + ] + }, + "capture-group-negative-lookbehind-invalid": { + "patterns": [ + { + "comment": "(?=...)? (?!...){2,3}", + "begin": "\\G\\(\\?[!=]", + "end": "\\)(?>[+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "captures": { "0": { "name": "invalid.illegal.tm markup.underline" } }, + "patterns": [ { "include": "$self" } ] + }, + { + "comment": "(...)", + "begin": "\\G\\((?!\\?[-~<>=:!{(|IimxWDSPy]|\\*[A-Za-z_])", + "end": "\\)|(?=\")", + "captures": { "0": { "name": "invalid.illegal.tm markup.underline" } }, + "patterns": [ + { "include": "#capture-group-negative-lookbehind-invalid-extended" }, + { "include": "#absent-invalid-extended" }, + { "include": "#$self-extended" } + ] + } + ] + }, + "capture-group-negative-lookbehind-invalid-extended": { + "patterns": [ + { + "comment": "(?=...)? (?!...){2,3}", + "begin": "\\G\\(\\?[!=]", + "end": "\\)(?>[+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?|(?=\")", + "captures": { "0": { "name": "invalid.illegal.tm markup.underline" } }, + "patterns": [ + { "include": "#capture-group-negative-lookbehind-invalid-extended" }, + { "include": "#absent-invalid-extended" }, + { "include": "#$self-extended" } + ] + }, + { + "comment": "(...)", + "begin": "\\G\\((?!\\?[-~<>=:!{(|IimxWDSPy]|\\*[A-Za-z_])", + "end": "\\)|(?=\")", + "captures": { "0": { "name": "invalid.illegal.tm markup.underline" } }, + "patterns": [ + { "include": "#capture-group-negative-lookbehind-invalid-extended" }, + { "include": "#absent-invalid-extended" }, + { "include": "#$self-extended" } + ] + } + ] + }, + "capture-group-modify": { + "patterns": [ + { + "match": "\\G\\(\\?-+:?\\)", + "name": "punctuation.definition.tag.tm" + }, + { + "comment": "(?y{g}I-imxWDSP)... (?y{w}IimxWDSP-x:...)", + "begin": "(?<=\")\\G(?>(\\((?=[^:)]++:))|(\\())(\\?)(?=[IimxWDSPy])(?=[^-I:)]*+I)(?=[^x:)]++[:)]|[^-:)]*+-[^x:)]*+x)", + "end": "(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm" }, + "2": { "name": "constant.character.set.regexp.tm markup.italic" }, + "3": { "name": "support.function.tm" } + }, + "name": "capture-group-modify-whole", + "patterns": [ + { + "begin": "(?<=\\?)\\G", + "end": "(?=[):\"])", + "patterns": [ + { + "match": "I(?=[^-I:)]*I)", + "name": "punctuation.definition.tag.tm" + }, + { + "match": "I", + "name": "support.function.tm" + }, + { "include": "#capture-group-modify-options" } + ] + }, + { + "begin": ":", + "end": "(?=\")", + "beginCaptures": { "0": { "name": "support.function.tm" } }, + "patterns": [ + { + "begin": "\\G(?!\\))", + "end": "(?=\\))", + "beginCaptures": { "0": { "name": "constant.character.set.regexp.tm" } }, + "patterns": [ { "include": "$self" } ] + }, + { + "begin": "\\)", + "end": "(?=\")", + "beginCaptures": { "0": { "name": "constant.character.set.regexp.tm" } }, + "contentName": "invalid.illegal.tm markup.underline.tm", + "patterns": [ { "include": "source.json.textmate#escape-characters" } ] + } + ] + }, + { + "begin": "\\)", + "end": "(?=\")", + "beginCaptures": { "0": { "name": "constant.character.set.regexp.tm markup.italic" } }, + "patterns": [ { "include": "$self" } ] + } + ] + }, + { + "comment": "(?y{g}-imxWDSP) (?y{w}imxWDSP-x: ...)", + "begin": "\\G(?=\\(\\?[-IimxWDSPy])(?>(\\((?=[^:)]++:))|(\\())(\\?)(?=[^x:)]++[:)]|[^-:)]*+-[^x:)]*+x[^:)]*+[:)])", + "end": "(?!\\1)\\)|(?=\\1)(?=\\))|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm" }, + "2": { "name": "constant.character.set.regexp.tm markup.italic" }, + "3": { "name": "support.function.tm" } + }, + "endCaptures": { "0": { "name": "constant.character.set.regexp.tm" } }, + "name": "capture-group-modify", + "patterns": [ + { + "begin": "(?<=\\?)\\G", + "end": "(:)|(\\))", + "endCaptures": { + "1": { "name": "support.function.tm" }, + "2": { "name": "constant.character.set.regexp.tm markup.italic" } + }, + "patterns": [ { "include": "#capture-group-modify-options" } ] + }, + { + "begin": "(?<=[:)])(?![)\"])", + "end": "(?=[)\"])", + "patterns": [ { "include": "$self" } ] + } + ] + } + ] + }, + "capture-group-modify-extended": { + "patterns": [ + { + "match": "\\G\\(\\?-+:?\\)", + "name": "punctuation.definition.tag.tm" + }, + { + "comment": "(?y{g}imxWDSP-) (?y{w}x-imWDSP:...)", + "begin": "\\G(?=\\(\\?[-IimxWDSPy])(?>(\\((?=[^:)]++:))|(\\())(\\?)(?=[^-:)]*+[^x:)]*+[:)])", + "end": "(?!\\1)\\)|(?=\\1)(?=\\))|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm" }, + "2": { "name": "constant.character.set.regexp.tm markup.italic" }, + "3": { "name": "support.function.tm" } + }, + "endCaptures": { "0": { "name": "constant.character.set.regexp.tm" } }, + "name": "capture-group-modify-extended", + "patterns": [ + { + "begin": "(?<=\\?)\\G", + "end": "(:)|(\\))", + "endCaptures": { + "1": { "name": "support.function.tm" }, + "2": { "name": "constant.character.set.regexp.tm markup.italic" } + }, + "patterns": [ { "include": "#capture-group-modify-options" } ] + }, + { + "begin": "(?<=[:)])(?![)\"])", + "end": "(?=[)\"])", + "patterns": [ { "include": "#$self-extended" } ] + } + ] + } + ] + }, + "capture-group-modify-options": { + "comment": "- i m x W D S P y{g} y{w}", + "patterns": [ + { + "match": "([imxWDSP]|y{[gw]})(?=[^:)]*?\\1)", + "name": "punctuation.definition.tag.tm" + }, + { + "begin": "-", + "end": "(?=[:)\"])", + "beginCaptures": { "0": { "name": "support.function.tm" } }, + "patterns": [ + { + "match": "-+", + "name": "punctuation.definition.tag.tm" + }, + { + "match": "y{[gw]}", + "name": "invalid.illegal.tm markup.underline" + }, + { "include": "#capture-group-modify-options" } + ] + }, + { + "match": "[imxWDSP]|y{[gw]}", + "name": "support.function.tm" + }, + { + "match": ".[^-IimxWDSPy{gw}:)]*", + "name": "invalid.illegal.tm markup.underline" + } + ] + }, + "capture-group-conditional": { + "comment": "(?(1)...|...) (?(-001)...) (?(1+0)...|...) (?(<1>)...) (?('+1')...|...) (?(<1-0>)...) (?()...) (?('name-0')...|...) (?()...) (?(...)...|...) (?(?{...})...|...) (?(*FAIL)|...)", + "begin": "\\G(?=\\(\\?\\()(\\()(\\?)", + "end": "\\)|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm" }, + "2": { "name": "support.function.tm" } + }, + "endCaptures": { "0": { "name": "constant.character.set.regexp.tm" } }, + "name": "meta.group.capture.conditional.tm", + "patterns": [ + { + "begin": "\\G\\((?=[<'])", + "end": "\\)|(?=\")", + "captures": { "0": { "name": "constant.character.set.regexp.tm markup.italic" } }, + "name": "meta.group.capture.conditional.name.tm", + "patterns": [ + { + "begin": "\\G(?>(<)|')", + "end": "(?!\\1)>|(?=\\1)'|(?=[)\"])", + "captures": { "0": { "name": "support.function.tm" } }, + "patterns": [ { "include": "#backreference-name" } ] + }, + { "include": "source.json.textmate#escape-characters" }, + { + "match": ".[^\\\\\"'>\\w+-]*+", + "name": "invalid.illegal.tm" + } + ] + }, + { + "match": "\\G(\\()((?>[+-](?=0*[1-9]))?(0*)(?=\\g\\b)(?>[1-9][0-9]{0,2}([0-9]*)|(0))(?>[+-](0*)(?2(?>0[0-9]{8}|1(?>[0-3][0-9]{7}|4(?>[0-6][0-9]{6}|7(?>[0-3][0-9]{5}|4(?>[0-7][0-9]{4}|8(?>[0-2][0-9]{3}|3(?>[0-5][0-9]{2}|6(?>[0-3][0-9]|4[0-7]))))))))|1?[0-9]{1,9}))?)(\\))", + "captures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "constant.numeric.tm" }, + "3": { "name": "punctuation.definition.tag.tm" }, + "4": { "name": "invalid.illegal.tm" }, + "5": { "name": "invalid.illegal.tm" }, + "6": { "name": "punctuation.definition.tag.tm" }, + "8": { "name": "constant.character.set.regexp.tm markup.italic" } + }, + "name": "meta.group.capture.conditional.reference.tm" + }, + { + "begin": "\\G\\((?!\\?{|\\*)", + "end": "\\)|(?=\")", + "captures": { "0": { "name": "constant.character.set.regexp.tm" } }, + "patterns": [ { "include": "$self" } ] + }, + { + "begin": "\\|", + "end": "(?=[)\"])", + "beginCaptures": { "0": { "name": "support.function.tm" } }, + "patterns": [ { "include": "$self" } ] + }, + { "include": "$self" } + ] + }, + "capture-group-conditional-extended": { + "comment": "(?(1)...|...) (?(-001)...) (?(1+0)...|...) (?(<1>)...) (?('+1')...|...) (?(<1-0>)...) (?()...) (?('name-0')...|...) (?()...) (?(...)...|...) (?(?{...})...|...) (?(*FAIL)|...)", + "begin": "\\G(?=\\(\\?\\()(\\()(\\?)", + "end": "\\)|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm" }, + "2": { "name": "support.function.tm" } + }, + "endCaptures": { "0": { "name": "constant.character.set.regexp.tm" } }, + "name": "meta.group.capture.conditional.extended.tm", + "patterns": [ + { + "begin": "\\G\\((?=[<'])", + "end": "\\)|(?=\")", + "captures": { "0": { "name": "constant.character.set.regexp.tm markup.italic" } }, + "name": "meta.group.capture.conditional.name.tm", + "patterns": [ + { + "begin": "\\G(?>(<)|')", + "end": "(?!\\1)>|(?=\\1)'|(?=[)\"])", + "captures": { "0": { "name": "support.function.tm" } }, + "patterns": [ { "include": "#backreference-name" } ] + }, + { "include": "source.json.textmate#escape-characters" }, + { + "match": ".[^\\\\\"'>\\w+-]*", + "name": "invalid.illegal.tm" + } + ] + }, + { + "match": "\\G(\\()((?>[+-](?=0*[1-9]))?(0*)(?=\\g\\b)(?>[1-9][0-9]{0,2}([0-9]*)|(0))(?>[+-](0*)(?2(?>0[0-9]{8}|1(?>[0-3][0-9]{7}|4(?>[0-6][0-9]{6}|7(?>[0-3][0-9]{5}|4(?>[0-7][0-9]{4}|8(?>[0-2][0-9]{3}|3(?>[0-5][0-9]{2}|6(?>[0-3][0-9]|4[0-7]))))))))|1?[0-9]{1,9}))?)(\\))", + "captures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "constant.numeric.tm" }, + "3": { "name": "punctuation.definition.tag.tm" }, + "4": { "name": "invalid.illegal.tm" }, + "5": { "name": "invalid.illegal.tm" }, + "6": { "name": "punctuation.definition.tag.tm" }, + "8": { "name": "constant.character.set.regexp.tm markup.italic" } + }, + "name": "meta.group.capture.conditional.reference.tm" + }, + { + "begin": "\\G\\((?!\\?{|\\*)", + "end": "\\)|(?=\")", + "captures": { "0": { "name": "constant.character.set.regexp.tm" } }, + "patterns": [ { "include": "#$self-extended" } ] + }, + { + "begin": "\\|", + "end": "(?=[)\"])", + "beginCaptures": { "0": { "name": "support.function.tm" } }, + "patterns": [ { "include": "#$self-extended" } ] + }, + { "include": "#$self-extended" } + ] + }, + "capture-group-name": { + "comment": "(?...) (?'name'...)", + "begin": "\\G(\\()(\\?[<'])", + "end": "\\)|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm strong" }, + "2": { "name": "support.function.tm" } + }, + "endCaptures": { "0": { "name": "constant.character.set.regexp.tm strong" } }, + "name": "meta.group.capture.named.tm", + "patterns": [ + { "include": "#capture-group-name-name" }, + { "include": "$self" } + ] + }, + "capture-group-name-extended": { + "comment": "(?...) (?'name'...)", + "begin": "\\G(\\()(\\?[<'])", + "end": "\\)|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm strong" }, + "2": { "name": "support.function.tm" } + }, + "endCaptures": { "0": { "name": "constant.character.set.regexp.tm strong" } }, + "name": "capture-group-name", + "patterns": [ + { "include": "#capture-group-name-name" }, + { "include": "#$self-extended" } + ] + }, + "capture-group-name-name": { + "patterns": [ + { + "comment": "_name;0%>", + "begin": "(?<=<)\\G[0-9[^\\w)>\"]]*", + "end": ">|(?=[)\"])", + "beginCaptures": { "0": { "name": "invalid.illegal.tm regex" } }, + "endCaptures": { "0": { "name": "support.function.tm" } }, + "contentName": "markup.bold regex", + "patterns": [ { "include": "source.json.textmate#escape-characters" } ] + }, + { + "comment": "_name;0%'", + "begin": "(?<=')\\G[0-9[^\\w)'\"]]*", + "end": "'|(?=[)\"])", + "beginCaptures": { "0": { "name": "invalid.illegal.tm regex" } }, + "endCaptures": { "0": { "name": "support.function.tm" } }, + "contentName": "markup.bold regex", + "patterns": [ { "include": "source.json.textmate#escape-characters" } ] + } + ] + }, + "capture-group-comment": { + "comment": "(?#...)", + "begin": "\\G(\\()(\\?#)(?#comment)", + "end": "\\)|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "support.function.tm" } + }, + "endCaptures": { "0": { "name": "constant.character.set.regexp.tm markup.italic" } }, + "contentName": "comment.tm", + "patterns": [ + { + "match": "(\\\\{2})\\)", + "captures": { "1": { "name": "constant.character.escape.json.tm" } } + }, + { "include": "source.json.textmate#escape-characters" } + ] + }, + "absent": { + "comment": "(?~|...|...) (?~|...) (?~...) (?~|)", + "begin": "\\G(\\()(\\?~\\|?)", + "end": "\\)|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm" }, + "2": { "name": "support.function.tm" } + }, + "endCaptures": { "0": { "name": "constant.character.set.regexp.tm" } }, + "patterns": [ + { + "begin": "(?<=\\|)\\G", + "end": "\\||(?=[)\"])", + "endCaptures": { "0": { "name": "support.function.tm" } }, + "patterns": [ { "include": "$self" } ] + }, + { "include": "$self" } + ] + }, + "absent-extended": { + "comment": "(?~|...|...) (?~...)", + "begin": "\\G(\\()(\\?~\\|?)", + "end": "\\)|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm" }, + "2": { "name": "support.function.tm" } + }, + "endCaptures": { "0": { "name": "constant.character.set.regexp.tm" } }, + "patterns": [ + { + "begin": "(?<=\\|)\\G", + "end": "\\||(?=\")", + "endCaptures": { "0": { "name": "support.function.tm" } }, + "patterns": [ { "include": "#$self-extended" } ] + }, + { "include": "#$self-extended" } + ] + }, + "absent-invalid": { + "comment": "(?~|...|...) (?~|...) (?~|)", + "begin": "\\G(\\()(\\?~\\|)", + "end": "(?!\\G)\\)|(?<=\\))|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm" }, + "2": { "name": "support.function.tm" } + }, + "endCaptures": { "0": { "name": "constant.character.set.regexp.tm" } }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\|)|(\\))|(?=\")", + "endCaptures": { + "1": { "name": "support.function.tm" }, + "2": { "name": "invalid.illegal.tm markup.underline" } + }, + "patterns": [ { "include": "$self" } ] + }, + { "include": "$self" } + ] + }, + "absent-invalid-extended": { + "comment": "(?~|...|...) (?~|...) (?~|)", + "begin": "\\G(\\()(\\?~\\|)", + "end": "(?!\\G)\\)|(?<=\\))|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm" }, + "2": { "name": "support.function.tm" } + }, + "endCaptures": { "0": { "name": "constant.character.set.regexp.tm" } }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\|)|(\\))|(?=\")", + "endCaptures": { + "1": { "name": "support.function.tm" }, + "2": { "name": "invalid.illegal.tm markup.underline" } + }, + "patterns": [ { "include": "#$self-extended" } ] + }, + { "include": "#$self-extended" } + ] + }, + "callout": { + "patterns": [ + { + "comment": "(?{{{...contents...}}}[tag]D)", + "match": "\\G(\\()(\\?)({(?:\\g<-1>|({)?(.*?[^}])?(})?)})([^\\[)]*)(?>(\\[)([^]]*)(]))?([^X<>)]*)([X<>])?([^)]*)(\\))", + "captures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "support.function.tm" }, + "3": { "name": "support.function.tm" }, + "4": { "name": "invalid.illegal.tm markup.underline regex" }, + "5": { + "name": "regex", + "patterns": [ { "include": "source.json.textmate#escape-characters" } ] + }, + "6": { "name": "invalid.illegal.tm markup.underline regex" }, + "7": { "name": "invalid.illegal.tm markup.underline regex" }, + "8": { "name": "support.function.tm" }, + "9": { + "patterns": [ + { + "match": "\\W+|[0-9]+", + "name": "invalid.illegal.tm markup.underline regex" + }, + { + "match": "\\w+", + "name": "markup.bold" + } + ] + }, + "10": { "name": "support.function.tm" }, + "11": { "name": "invalid.illegal.tm markup.underline regex" }, + "12": { "name": "markup.bold" }, + "13": { "name": "invalid.illegal.tm markup.underline regex" }, + "14": { "name": "constant.character.set.regexp.tm markup.italic" } + } + }, + { + "comment": "(*NAME[Tag]{,,args,,,})", + "begin": "\\G(\\()(\\*)", + "end": "(\\))([+*?]|{(?>,[0-9]+|[0-9]+,?[0-9]*)})?|(?=\")", + "beginCaptures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "support.function.tm" } + }, + "endCaptures": { + "1": { "name": "constant.character.set.regexp.tm markup.italic" }, + "2": { "name": "invalid.illegal.quantifier.tm regex" } + }, + "name": "meta.group.callout.named.tm", + "patterns": [ + { + "match": "\\G(?>FAIL|MISMATCH|SKIP|ERROR|MAX|COUNT|TOTAL_COUNT|CMP)", + "name": "markup.bold.name.$0.tm" + }, + { + "begin": "\\b\\[", + "end": "]|(?=[{)\"])", + "patterns": [ + { + "match": "[A-Za-z_][A-Za-z_0-9]*", + "name": "markup.bold.tag.tm" + }, + { + "match": ".[^]{)\"A-Za-z_]*", + "name": "invalid.illegal.tm regex" + } + ] + }, + { + "begin": "(?<=[]A-Z]){", + "end": "}|(?=[)\"])", + "patterns": [ + { "include": "source.json.textmate#escape-characters" }, + { + "match": "(?!X\\b)[A-Za-z_][A-Za-z_0-9]*", + "name": "markup.bold.tag.tm" + }, + { + "match": "[+-]?[0-9]+\\b", + "name": "constant.numeric.tm" + }, + { + "match": "\\G,+", + "name": "punctuation.definition.tag.tm" + }, + { + "match": ",+(?=})", + "name": "punctuation.definition.tag.tm" + }, + { + "match": "(?<=,),+", + "name": "punctuation.definition.tag.tm" + }, + { + "match": ",", + "name": "support.function.tm" + }, + { + "match": ".[^,})\"A-Za-z_0-9+-]*", + "name": "string.tm" + } + ] + }, + { + "match": ".[^\\[{)\"A-Za-z_]*", + "name": "invalid.illegal.tm regex" + } + ] + } + ] + }, + "character-class": { + "comment": "[...] [^...]", + "begin": "(\\[)(\\^)?", + "end": "(?!\\G)]|(?=\")", + "beginCaptures": { + "1": { "name": "support.class.tm" }, + "2": { "name": "support.function.tm strong" } + }, + "endCaptures": { "0": { "name": "support.class.tm" } }, + "contentName": "character-class", + "patterns": [ + { "include": "#character-class-range" }, + { "include": "#character-class-escape" }, + { + "begin": "(?=\\[)", + "end": "(?!\\G)", + "patterns": [ + { "include": "#character-class-posix" }, + { "include": "#character-class" } + ] + }, + { "include": "#character-class-literal" } + ] + }, + "character-class-escape": { + "patterns": [ + { + "match": "\\G(\\\\{2})([]-])", + "captures": { + "1": { "name": "punctuation.definition.tag.tm" }, + "2": { "name": "literal.tm regex" } + } + }, + { + "match": "(?<=\\^)\\G(\\\\{2})(\\^)", + "captures": { + "1": { "name": "punctuation.definition.tag.tm" }, + "2": { "name": "literal.tm" } + } + }, + { + "match": "\\G(\\\\{2})(\\^|:)", + "captures": { + "1": { "name": "constant.character.escape.tm" }, + "2": { "name": "literal.tm" } + } + }, + { + "begin": "(?=\\\\)", + "end": "(?!\\G)", + "patterns": [ + { "include": "#character-class-code-point" }, + { + "match": "\\G(\\\\{3})(\\\\)", + "captures": { + "1": { "name": "constant.character.escape.tm" }, + "2": { "name": "literal.tm" } + } + }, + { + "match": "\\G(\\\\{2})(-)(?=])", + "captures": { + "1": { "name": "punctuation.definition.tag.tm" }, + "2": { "name": "literal.tm" } + } + }, + { + "match": "\\G(\\\\{2})([]\\[-]|:(?=]))", + "captures": { + "1": { "name": "constant.character.escape.tm" }, + "2": { "name": "literal.tm regex" } + } + }, + { + "match": "\\G(\\\\{2})(&)(?=&)", + "captures": { + "1": { "name": "constant.character.escape.tm" }, + "2": { "name": "literal.tm" } + } + }, + { + "match": "\\G(&)(\\\\{2})(&)", + "captures": { + "1": { "name": "literal.tm" }, + "2": { "name": "constant.character.escape.tm" }, + "3": { "name": "literal.tm" } + } + }, + { + "match": "\\G\\\\{2}b", + "name": "punctuation.definition.list.begin.markdown" + }, + { "include": "#character-types" }, + { "include": "#characters" }, + { + "match": "\\G\\\\{2}", + "name": "punctuation.definition.tag.tm" + }, + { + "match": "\\G(\\\\)(/)", + "captures": { + "1": { "name": "punctuation.definition.tag.tm" }, + "2": { "name": "literal.tm" } + } + }, + { + "match": "\\G\\\\\"", + "name": "string.tm" + }, + { + "match": "\\G\\\\[bfnrt]", + "name": "constant.character.escape.tm" + } + ] + }, + { + "match": "\\\\.?|[\"\\x00-\\x1F\\x7F]", + "name": "invalid.illegal.tm regex" + } + ] + }, + "character-class-range": { + "patterns": [ + { + "match": "([\\\\-\\x{10FFFF}]-(?!&&)[\\x00-Z]|[+-\\x{10FFFF}]-(?!&&)[\\x00-*])(\\\\{2}(?=-))?", + "captures": { + "1": { "name": "character-class-range.tm invalid.illegal.tm regex" }, + "2": { "name": "punctuation.definition.tag.tm" } + } + }, + { + "match": "(\\*(-)\\+)(\\\\{2}(?=-))?", + "captures": { + "1": { "name": "character-class-range.tm support.class.tm" }, + "2": { "name": "punctuation.definition.tag.tm strong" }, + "3": { "name": "punctuation.definition.tag.tm" } + } + }, + { + "match": "([0-9](-)[0-9])(\\\\{2}(?=-))?", + "captures": { + "1": { "name": "character-class-range.tm constant.numeric.tm" }, + "2": { "name": "strong" }, + "3": { "name": "punctuation.definition.tag.tm" } + } + }, + { + "match": "([A-Z](-)[A-Z])(\\\\{2}(?=-))?", + "captures": { + "1": { "name": "character-class-range.tm variable.other.enummember.tm" }, + "2": { "name": "strong" }, + "3": { "name": "punctuation.definition.tag.tm" } + } + }, + { + "match": "([a-z](-)[a-z])(\\\\{2}(?=-))?", + "captures": { + "1": { "name": "character-class-range.tm variable.other.enummember.tm" }, + "2": { "name": "strong" }, + "3": { "name": "punctuation.definition.tag.tm" } + } + }, + { + "match": "(&&)(\\\\{2}(?=-))?", + "captures": { + "1": { "name": "keyword.control.tm" }, + "2": { "name": "punctuation.definition.tag.tm" } + } + }, + { + "comment": "For some reason (\\G|...) and any of its variations are extremely performance heavy", + "//": "TODO: Convert to `begin`/`end` for better performance", + "match": "\\G(?>(\\\\{2})?[]-]|(?(\\\\{2})-|(\\\\{3})\\\\|((?>\\\\{2}(?>c|[CM]-))+(?>\\\\u.{4}|\\\\{,3}.)|\\\\{2}(?>x{\\h[^}]*}|o{[0-7][^}]*}|x\\h{,2}|[0-7]{1,3})|\\\\{1,2}u.{,4})|(\\\\{2})[]\\[-]|(\\\\{2}(?i:[DHSW]|p{[^}]*})|\\[:[^]]+:])|(\\\\{1,2}[^\\\\u])|[^]\\[\\\\])(\\\\{2}(?=-))?", + "captures": { + "0": { "name": "character-class-range.tm support.class.tm regex" }, + "1": { "name": "punctuation.definition.tag.tm" }, + "2": { "name": "constant.character.escape.tm" }, + "3": { "name": "strong" }, + "4": { "name": "punctuation.definition.tag.tm" }, + "5": { "name": "constant.character.escape.tm" }, + "6": { "patterns": [ { "include": "#character-class-range-code-point" } ] }, + "7": { "name": "constant.character.escape.tm" }, + "8": { "name": "invalid.illegal.tm regex" }, + "9": { + "name": "support.class.tm regex", + "patterns": [ { "include": "#character-class-escape" } ] + }, + "10": { "name": "punctuation.definition.tag.tm" } + } + }, + { + "begin": "(?=(((?>\\\\{4}|(?>\\\\{2}(?>c|[CM]-))+(?>\\\\u.{4}|\\\\{,3}.)|\\\\{2}(?>x{\\h[^}]*}|o{[0-7][^}]*}|x\\h{,2}|[0-7]{1,3}|p{[^}]*})|\\\\{1,2}u.{,4}|\\\\{1,2}[^\\\\u]|\\[:[^]]+:]|[^]\\[\\\\]))-(?!&&)\\g<2>))-?", + "end": "(?<=\\1)(?!\\G)(?>\\\\{2}(?=-))?", + "beginCaptures": { "0": { "name": "support.class.tm" } }, + "endCaptures": { "0": { "name": "punctuation.definition.tag.tm" } }, + "name": "character-class-range.tm", + "patterns": [ + { + "begin": "-", + "end": "(?<=-\\\\{2})(.)|(?!\\G)|(\\\\{3})(\\\\)|(\\\\{2})([]\\[])|(\\\\{2})([-:^])|(\\\\{2}(?i:[DHSW]|p{[^}]*})|\\[:[^]]+:])|(\\\\{1,2})(/)|([^]\\[\\\\])", + "beginCaptures": { "0": { "name": "support.class.tm strong" } }, + "endCaptures": { + "1": { "name": "support.class.tm regex" }, + "2": { "name": "constant.character.escape.tm" }, + "3": { "name": "support.class.tm" }, + "4": { "name": "constant.character.escape.tm" }, + "5": { "name": "support.class.tm regex" }, + "6": { "name": "punctuation.definition.tag.tm" }, + "7": { "name": "support.class.tm regex" }, + "8": { "name": "invalid.illegal.tm" }, + "9": { "name": "punctuation.definition.tag.tm" }, + "10": { "name": "support.class.tm" }, + "11": { "name": "support.class.tm regex" } + }, + "patterns": [ + { "include": "#character-class-range-code-point" }, + { "include": "#character-class-escape" } + ] + }, + { + "begin": "\\G", + "end": "(\\\\{3})(\\\\)|(\\\\{2})([]\\[-])|(\\\\{2})([:^])|(\\\\{2}(?i:[DHSW]|p{[^}]*})|\\[:[^]]+:])|(\\\\{1,2})(/)|([^]\\[\\\\-])|(?=-)", + "endCaptures": { + "1": { "name": "constant.character.escape.tm" }, + "2": { "name": "support.class.tm" }, + "3": { "name": "constant.character.escape.tm" }, + "4": { "name": "support.class.tm regex" }, + "5": { "name": "punctuation.definition.tag.tm" }, + "6": { "name": "support.class.tm" }, + "7": { "name": "invalid.illegal.tm" }, + "8": { "name": "punctuation.definition.tag.tm" }, + "9": { "name": "support.class.tm" }, + "10": { "name": "support.class.tm regex" } + }, + "patterns": [ + { "include": "#character-class-code-point" }, + { "include": "#character-class-escape" } + ] + } + ] + } + ] + }, + "character-class-posix": { + "patterns": [ + { + "match": "\\G\\[:\\^?:]", + "name": "posix.tm invalid.illegal.tm" + }, + { + "comment": "[:...:] [:^...:]", + "begin": "\\G\\[:\\^?(?=[^]:]{,20}(?(?alnum|alpha|ascii|blank|cntrl|x?digit|graph|lower|print|punct|space|upper|word)|((?i)\\g))", + "captures": { + "1": { "name": "invalid.illegal.regex.tm" }, + "2": { "name": "variable.other.enummember.tm" }, + "3": { + "name": "variable.other.enummember.tm", + "patterns": [ + { + "match": "[A-Z]+", + "name": "invalid.illegal.tm" + } + ] + } + } + }, + { + "match": "[^]:]+", + "name": "invalid.illegal.regex.tm" + } + ] + }, + { + "comment": "[:...[:...\\]...:...[:...:]", + "begin": "\\G\\[:(?=(?~(?\\\\{2}*+\"|\\\\{4}*+]))(?>$|(?alnum|alpha|ascii|blank|cntrl|x?digit|graph|lower|print|punct|space|upper|word)", + "name": "invalid.illegal.tm markup.italic" + }, + { + "match": ":", + "name": "support.function.tm markup.italic" + }, + { + "match": "(\\\\{2})(])", + "captures": { + "1": { "name": "constant.character.escape.tm" }, + "2": { "name": "support.function.tm markup.italic regex" } + } + }, + { "include": "#character-class-range" }, + { "include": "#character-class-code-point" }, + { "include": "#character-class-escape" }, + { "include": "#character-class-posix" }, + { "include": "#character-class-literal" } + ] + } + ] + }, + "character-class-literal": { + "comment": "Match anything left over and all non-meta characters", + "match": ".(?>[^]\\x00-\\x1F\\x7F\"&:\\[\\\\-]+(?!-))?", + "name": "literal.tm regex" + }, + "character-class-range-code-point": { + "comment": "\\o{37777777777 0 1777777} \\x{FFFFFFFF 0 1FFFFF}", + "patterns": [ + { + "begin": "(\\\\{2}o{)(0{,10}+)(3?[0-7]{1,10})(?(\\h{4})|([^\"].{3,0}))", + "captures": { + "1": { "name": "variable.language.tm" }, + "2": { "name": "constant.numeric.json.tm" }, + "3": { + "name": "constant.numeric.tm", + "patterns": [ + { + "match": "\\H+", + "name": "invalid.illegal.regex.tm" + } + ] + } + } + }, + { + "match": "\\G(\\\\u)(?>(\\h{4})|([^\"].{3,0}))", + "captures": { + "1": { "name": "constant.character.escape.tm" }, + "2": { "name": "constant.numeric.json.tm" }, + "3": { + "name": "constant.numeric.tm", + "patterns": [ + { + "match": "\\H+", + "name": "invalid.illegal.regex.tm" + } + ] + } + } + }, + { + "match": "\\G(\\\\{2}(?>c|[CM](?>-|(.))?+)(?>(\\\\{3})(\\\\)|\\g<1>|(\\\\{2})?+(\\\\u.{4,0}|\\\\?+.))?+)", + "captures": { + "0": { "name": "punctuation.definition.list.begin.markdown.tm" }, + "2": { "name": "invalid.illegal.tm regex" }, + "3": { "name": "constant.character.escape.tm" }, + "4": { "name": "markup.bold" }, + "5": { "name": "punctuation.definition.tag.tm" }, + "6": { + "name": "markup.bold regex", + "patterns": [ { "include": "source.json.textmate#escape-characters" } ] + } + } + }, + { + "//": "[pP] degrades performance :shrug:", + "comment": "https://github.com/kkos/oniguruma/blob/v6.9.8/doc/UNICODE_PROPERTIES", + "begin": "\\G(\\\\{2}p{)(\\^)?", + "end": "}|$|(?=[(){|\"])", + "beginCaptures": { + "1": { "name": "variable.language.tm" }, + "2": { "name": "support.function.tm" } + }, + "endCaptures": { "0": { "name": "variable.language.tm" } }, + "name": "unicode.properties.tm", + "patterns": [ + { + "match": "[a-zA-Z1]+", + "name": "variable.other.enummember.tm" + }, + { + "match": "[ _-]+", + "name": "comment.tm" + }, + { + "match": "[^\"(){}|a-zA-Z1 _-]+", + "name": "invalid.illegal.regex.tm" + } + ] + }, + { + "//": "[pP] degrades performance :shrug:", + "comment": "https://github.com/kkos/oniguruma/blob/v6.9.8/doc/UNICODE_PROPERTIES", + "begin": "\\G(\\\\{2}P{)(\\^)?", + "end": "}|$|(?=[(){|\"])", + "beginCaptures": { + "1": { "name": "variable.language.tm" }, + "2": { "name": "support.function.tm" } + }, + "endCaptures": { "0": { "name": "variable.language.tm" } }, + "name": "unicode.properties.tm", + "patterns": [ + { + "match": "[a-zA-Z1]+", + "name": "variable.other.enummember.tm" + }, + { + "match": "[ _-]+", + "name": "comment.tm" + }, + { + "match": "[^\"(){}|a-zA-Z1 _-]+", + "name": "invalid.illegal.regex.tm" + } + ] + } + ] + }, + "code-point-sequence-separator": { + "comment": "Spaces ` `, Newlines `\n` and their unicode equivalents \u0020 & \u000A. Tabs `\t` are not allowed", + "patterns": [ + { "match": " +" }, + { + "match": "\\\\n", + "name": "constant.character.escape.tm" + }, + { + "match": "(\\\\u)(0020|000[aA])", + "captures": { + "1": { "name": "constant.character.escape.tm" }, + "2": { "name": "constant.numeric.tm" } + } + } + ] + }, + "subroutine": { + "comment": "\\g<0> \\g'+999' \\g<-0065535> \\g'name_123' \\g<_\\#°$\u00b0% ^&(\"'[0-9]>", + "begin": "\\G(\\\\{2}g)((<)|')", + "end": "(?!\\3)>|(?=\\3)'|(?=[)\"])", + "beginCaptures": { + "1": { "name": "string.regexp.tm" }, + "2": { "name": "constant.character.set.regexp.tm" } + }, + "endCaptures": { "0": { "name": "constant.character.set.regexp.tm" } }, + "name": "subroutine.tm", + "patterns": [ + { + "comment": "Capture group reference number", + "match": "(?)])", + "name": "markup.bold.tm regex", + "patterns": [ { "include": "source.json.textmate#escape-characters" } ] + }, + { + "comment": "Named capture group reference name", + "begin": "(?)])", + "name": "markup.bold.tm regex", + "patterns": [ { "include": "source.json.textmate#escape-characters" } ] + }, + { "include": "source.json.textmate#escape-characters" }, + { + "match": ".[^\\\\\"\\w)'>+-]*", + "name": "invalid.illegal.tm regex" + } + ] + }, + "backreference": { + "patterns": [ + { + "comment": "\\1", + "match": "\\G(\\\\{2})([1-9][0-9]{2,0})([0-9]*)", + "captures": { + "1": { "name": "string.regexp.tm" }, + "2": { "name": "constant.numeric.tm" }, + "3": { "name": "invalid.illegal.tm" } + } + }, + { + "comment": "\\k<1> \\k'-2' \\k \\k'name_123+5' \\k<+000999-2147483647>", + "begin": "\\G(\\\\{2}k)((<)|')", + "end": "(?!\\3)>|(?=\\3)'|(?=[)\"])", + "beginCaptures": { + "1": { "name": "string.regexp.tm" }, + "2": { "name": "constant.character.set.regexp.tm" } + }, + "endCaptures": { "0": { "name": "constant.character.set.regexp.tm" } }, + "patterns": [ { "include": "#backreference-name" } ] + } + ] + }, + "backreference-name": { + "patterns": [ + { + "comment": "Capture group nesting level", + "match": "(?<=\\w)[+-]0*+(?>2(?>0[0-9]{8}|1(?>[0-3][0-9]{7}|4(?>[0-6][0-9]{6}|7(?>[0-3][0-9]{5}|4(?>[0-7][0-9]{4}|8(?>[0-2][0-9]{3}|3(?>[0-5][0-9]{2}|6(?>[0-3][0-9]|4[0-7]))))))))|1?+[0-9]{9,0})(\\w*+)", + "captures": { "1": { "name": "invalid.illegal.tm" } }, + "name": "constant.numeric.tm" + }, + { + "comment": "Capture group reference number", + "match": "[+-]?+0*+[1-9][0-9]{2,0}(\\w*+)", + "captures": { "1": { "name": "invalid.illegal.tm" } }, + "name": "constant.numeric.tm" + }, + { + "comment": "Named capture group reference name", + "match": "(?!0)\\w++", + "name": "markup.bold.tm" + }, + { "include": "source.json.textmate#escape-characters" }, + { + "match": ".[^\\\\\"'>\\w+-]*", + "name": "invalid.illegal.tm" + } + ] + }, + "quantifier": { + "comment": "+ * ? {1,9}", + "patterns": [ + { + "comment": "For some reason (\\G|...) and any of its variations are extremely performance heavy", + "match": "\\G(?>[+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})", + "name": "invalid.illegal.tm" + }, + { + "comment": "For some reason it isn't very performant using ^", + "match": "\\A(?>[+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})", + "name": "invalid.illegal.tm" + }, + { + "comment": "+ * ? ++ +? *+ *? ?+ ?? \n ? creates a lazy quantifier and + a possessive quantifier", + "match": "[+*?]([+?])?", + "captures": { + "0": { "name": "keyword.tm" }, + "1": { "name": "strong" } + } + }, + { + "begin": "(?={)", + "end": "(?!\\G)", + "patterns": [ + { + "match": "\\G({)((0*)(?>100000|[0-9]{1,5})([0-9]*)|(?=,[0-9]))(,)?((0*)(?>100000|[0-9]{1,5})([0-9]*))?(})((?<=,[0-9]?)\\?)?", + "captures": { + "1": { "name": "keyword.tm" }, + "2": { "name": "constant.numeric.tm" }, + "3": { "name": "punctuation.definition.tag.tm" }, + "4": { "name": "invalid.illegal.tm" }, + "5": { "name": "support.function.tm" }, + "6": { "name": "constant.numeric.tm" }, + "7": { "name": "punctuation.definition.tag.tm" }, + "8": { "name": "invalid.illegal.tm" }, + "9": { "name": "keyword.tm" }, + "10": { "name": "keyword.tm strong" } + } + }, + { + "begin": "\\G(?={(?>[0-9]+\\\\{2}?,?[0-9]*|\\\\{2}?,?[0-9]+)\\\\{2}?})", + "end": "\\\\{2}", + "endCaptures": { "0": { "name": "constant.character.escape.tm" } }, + "contentName": "entity.name.label.tm strong regex" + }, + { "include": "#character-literal" } + ] + } + ] + }, + "anchor": { + "comment": "$ ^", + "match": "[$^]([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?", + "captures": { + "0": { "name": "variable.tm" }, + "1": { "name": "invalid.illegal.tm regex" } + } + }, + "escaped-anchor": { + "comment": "\\A \\B \\b \\G \\K \\Y \\y \\Z \\z", + "match": "\\G\\\\{2}[ABbGKYyZz]([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?", + "captures": { + "0": { "name": "variable.tm" }, + "1": { "name": "invalid.illegal.tm regex" } + } + }, + "alternation": { + "comment": "|", + "match": "\\|([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?", + "captures": { + "0": { "name": "keyword.control.tm" }, + "1": { "name": "invalid.illegal.tm regex" } + } + }, + "character-types": { + "comment": "\\D \\d \\H \\h \\S \\s \\W \\w", + "match": "\\G(?i)\\\\{2}[DHSW]", + "name": "variable.other.enummember.tm" + }, + "character-types-2": { + "comment": "\\N \\O \\R \\X cannot be used in character classes", + "match": "\\G\\\\{2}[NORX]", + "name": "variable.other.enummember.tm" + }, + "characters": { + "comment": "\\a \\e \\f \\n \\r \\t \\v", + "match": "\\G\\\\{2}[aefnrtv]", + "name": "punctuation.definition.list.begin.markdown" + }, + "dot": { + "comment": "\\. cannot be used in character classes", + "match": "\\.", + "name": "variable.other.enummember.tm" + }, + "character-literal": { + "comment": "Match anything left over and all non-meta characters", + "match": ".[^\\x00-\\x1F\\x7F \"#$^.+*?|\\[{()\\\\]*", + "name": "entity.name.label.tm strong regex" + }, + "invalid": { + "comment": "invalid: Rogue right brackets, unescaped double quotes and any invalid control characters", + "match": "[)\"\\x00-\\x1F\\x7F]", + "name": "invalid.illegal.tm regex" + }, + "test": { + "comment": "Just a easy spot for testing", + "//match": "(*FAIL).", + "name": "token.debug-token strong regex" + }, + "_disabled_": { + "comment": "Basic visual test", + "//": "https://github.com/kkos/oniguruma/blob/v6.9.8/doc/RE", + "patterns": [ + { "match": "(*FAIL) !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ " }, + { "match": "(*FAIL) \"\/\b\f\n\r\t\u0000 " }, + { "match": "(*FAIL) \\ \\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\-\\.\\/\\0\\10\\20\\30\\40\\50\\60\\70\\80\\90\\:\\;\\<\\=\\>\\\\\\?\\@\\A\\B\\C- \\D\\E\\F\\G\\H\\I\\J\\K\\L\\M-a\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\\[\\\\\\]\\^\\_\\`\\a\\b\\c]\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u0000\\v\\w\\x\\y\\z\\{\\|\\}\\~ " }, + { "match": "(*FAIL) \\\"\\\/\\\b\\\f\\\n\\\r\\\t\\\u0000 " }, + { "match": "(*FAIL) \\\\ " }, + { "match": "(*FAIL) (?x).{2,3}{2,3}(.{2,3}(?:.{2,3})){2,3}{,3}{2,}{2} {000} *{0} {0}* *{0}* {0}{0}{0} {0}{2,3} {2,3}{0}{2,3} {2,3\\} " }, + { "match": "(*FAIL) () (?<= (= (?> (=)? ) )? ) (?= (?= ) ) " }, + { "match": "(*FAIL) \\x \\x00 \\xFF \\x{} \\x{k} \\x\\{123} \\x{00000000 0013FFFF} [\\x{42 001FFFFF 48}-\\x{FFFFFFFF \n 45}] " }, + { "match": "(*FAIL) \\o{} \\o{k} \\o\\{123} \\o{00000000000 00004777777} [\\o{102 00004777777 110}-\\o{37777777777 \u0020 105}] " }, + { "match": "(*FAIL) [a-z&&]u°𐐷Ꚛ�𐀀𐃘[�𐃘]®×ñÿ¡¼÷€Çô│╨ε■ ‚‚ Ȁ°Ççë£ ÿ[[:^upper:]] " }, + { "match": "(*FAIL) \\g<0>? \\x555 \\x{201E} \\p{L} \\p{L etter------} " }, + { "match": "(*FAIL) (?~a) (?{foo}) " }, + { "match": "(*FAIL) QabcE $ \\$ an{name}bc At aT aa abc abd cd a1 b a1b n1000 Q.E q.e test ab$abc " }, + { "match": "(*FAIL) (?x)#comment\n \\# abc (?-x)#notcomment\n \\# abc " }, + { "match": "(*FAIL) (?<_azAZ0-9 #$('°>) (?<_azAZ0>) (?(<_azAZ0-9>)true|false) \\g<_azAZ0-9 #$('°> \\k<_azAZ0-9> " }, + { "match": "(*FAIL) (){0}[[:word:]]\\g<1>\\k'1' (( (){0}[[:word:]]\\g<1>\\k'1' )) " }, + { "include": "#_disabled_" } + ] + } + }, + "From": "https://github.com/RedCMD/TmLanguage-Syntax-Highlighter/blob/main/syntaxes/regex.tmLanguage.json" +} \ No newline at end of file diff --git a/sources-grammars.ts b/sources-grammars.ts index e8dbdb90..74a79b29 100644 --- a/sources-grammars.ts +++ b/sources-grammars.ts @@ -706,6 +706,12 @@ export const sourcesCommunity: GrammarSource[] = [ source: 'https://github.com/cdibbs/language-jison/blob/master/grammars/jison.cson', categories: ['data', 'web'], }, + { + name: 'json-textmate', + aliases: ['JSON TextMate'], + source: 'https://github.com/RedCMD/TmLanguage-Syntax-Highlighter/blob/main/syntaxes/json.tmLanguage.json', + categories: ['dsl'], + }, { name: 'json5', source: 'https://github.com/mrmlnc/vscode-json5/blob/master/syntaxes/json5.json', @@ -1229,6 +1235,11 @@ export const sourcesInjections: GrammarSource[] = [ source: 'https://github.com/samuelcolvin/jinjahtml-vscode/blob/main/syntaxes/jinja-html.tmLanguage.json', embeddedIn: ['jinja'], }, + { + name: 'json-textmate-regex', + source: 'https://github.com/RedCMD/TmLanguage-Syntax-Highlighter/blob/main/syntaxes/regex.tmLanguage.json', + embeddedIn: ['json-textmate'], + }, // ========== Vue ========== { name: 'vue-directives',