|
| 1 | +{ |
| 2 | + "information_for_contributors": [ |
| 3 | + "This file has been converted from https://github.com/microsoft/vscode/blob/main/extensions/javascript/syntaxes/Regular%20Expressions%20(JavaScript).tmLanguage", |
| 4 | + "If you want to provide a fix or improvement, please create a pull request against the original repository.", |
| 5 | + "Once accepted there, we are happy to receive an update request." |
| 6 | + ], |
| 7 | + "hideFromUser": true, |
| 8 | + "fileTypes": [], |
| 9 | + "repository": { |
| 10 | + "regex-character-class": { |
| 11 | + "patterns": [ |
| 12 | + { "match": "\\\\[wWsSdD]|\\.", "name": "constant.character.character-class.regexp" }, |
| 13 | + { "match": "\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)", "name": "constant.character.numeric.regexp" }, |
| 14 | + { "match": "\\\\c[A-Z]", "name": "constant.character.control.regexp" }, |
| 15 | + { "match": "\\\\.", "name": "constant.character.escape.backslash.regexp" } |
| 16 | + ] |
| 17 | + }, |
| 18 | + "regexp": { |
| 19 | + "patterns": [ |
| 20 | + { "match": "\\\\[bB]|\\^|\\$", "name": "keyword.control.anchor.regexp" }, |
| 21 | + { "match": "\\\\[1-9]\\d*", "name": "keyword.other.back-reference.regexp" }, |
| 22 | + { "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??", "name": "keyword.operator.quantifier.regexp" }, |
| 23 | + { "match": "\\|", "name": "keyword.operator.or.regexp" }, |
| 24 | + { |
| 25 | + "begin": "(\\()((\\?=)|(\\?!))", |
| 26 | + "endCaptures": { "1": { "name": "punctuation.definition.group.regexp" } }, |
| 27 | + "end": "(\\))", |
| 28 | + "patterns": [{ "include": "#regexp" }], |
| 29 | + "name": "meta.group.assertion.regexp", |
| 30 | + "beginCaptures": { |
| 31 | + "1": { "name": "punctuation.definition.group.regexp" }, |
| 32 | + "3": { "name": "meta.assertion.look-ahead.regexp" }, |
| 33 | + "4": { "name": "meta.assertion.negative-look-ahead.regexp" } |
| 34 | + } |
| 35 | + }, |
| 36 | + { |
| 37 | + "begin": "\\((\\?:)?", |
| 38 | + "endCaptures": { "0": { "name": "punctuation.definition.group.regexp" } }, |
| 39 | + "end": "\\)", |
| 40 | + "patterns": [{ "include": "#regexp" }], |
| 41 | + "name": "meta.group.regexp", |
| 42 | + "beginCaptures": { "0": { "name": "punctuation.definition.group.regexp" } } |
| 43 | + }, |
| 44 | + { |
| 45 | + "begin": "(\\[)(\\^)?", |
| 46 | + "endCaptures": { "1": { "name": "punctuation.definition.character-class.regexp" } }, |
| 47 | + "end": "(\\])", |
| 48 | + "patterns": [ |
| 49 | + { |
| 50 | + "match": "(?:.|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))", |
| 51 | + "name": "constant.other.character-class.range.regexp", |
| 52 | + "captures": { |
| 53 | + "3": { "name": "constant.character.escape.backslash.regexp" }, |
| 54 | + "1": { "name": "constant.character.numeric.regexp" }, |
| 55 | + "6": { "name": "constant.character.escape.backslash.regexp" }, |
| 56 | + "4": { "name": "constant.character.numeric.regexp" }, |
| 57 | + "2": { "name": "constant.character.control.regexp" }, |
| 58 | + "5": { "name": "constant.character.control.regexp" } |
| 59 | + } |
| 60 | + }, |
| 61 | + { "include": "#regex-character-class" } |
| 62 | + ], |
| 63 | + "name": "constant.other.character-class.set.regexp", |
| 64 | + "beginCaptures": { |
| 65 | + "1": { "name": "punctuation.definition.character-class.regexp" }, |
| 66 | + "2": { "name": "keyword.operator.negation.regexp" } |
| 67 | + } |
| 68 | + }, |
| 69 | + { "include": "#regex-character-class" } |
| 70 | + ] |
| 71 | + } |
| 72 | + }, |
| 73 | + "patterns": [{ "include": "#regexp" }], |
| 74 | + "name": "Regular Expressions (JavaScript)", |
| 75 | + "scopeName": "source.js.regexp" |
| 76 | +} |
0 commit comments