|
| 1 | +'fileTypes': [] |
| 2 | +'hideFromUser': true |
| 3 | +'name': 'Regular Expressions (JavaScript)' |
| 4 | +'patterns': [ |
| 5 | + { |
| 6 | + 'include': '#regexp' |
| 7 | + } |
| 8 | +] |
| 9 | +'repository': |
| 10 | + 'regex-character-class': |
| 11 | + 'patterns': [ |
| 12 | + { |
| 13 | + 'match': '\\\\[wWsSdD]|\\.' |
| 14 | + 'name': 'constant.character.character-class.regexp' |
| 15 | + } |
| 16 | + { |
| 17 | + 'match': '\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)' |
| 18 | + 'name': 'constant.character.numeric.regexp' |
| 19 | + } |
| 20 | + { |
| 21 | + 'match': '\\\\c[A-Z]' |
| 22 | + 'name': 'constant.character.control.regexp' |
| 23 | + } |
| 24 | + { |
| 25 | + 'match': '\\\\.' |
| 26 | + 'name': 'constant.character.escape.backslash.regexp' |
| 27 | + } |
| 28 | + ] |
| 29 | + 'regexp': |
| 30 | + 'patterns': [ |
| 31 | + { |
| 32 | + 'match': '\\\\[bB]|\\^|\\$' |
| 33 | + 'name': 'keyword.control.anchor.regexp' |
| 34 | + } |
| 35 | + { |
| 36 | + 'match': '\\\\[1-9]\\d*' |
| 37 | + 'name': 'keyword.other.back-reference.regexp' |
| 38 | + } |
| 39 | + { |
| 40 | + 'match': '[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??' |
| 41 | + 'name': 'keyword.operator.quantifier.regexp' |
| 42 | + } |
| 43 | + { |
| 44 | + 'match': '\\|' |
| 45 | + 'name': 'keyword.operator.or.regexp' |
| 46 | + } |
| 47 | + { |
| 48 | + 'begin': '(\\()((\\?=)|(\\?!))' |
| 49 | + 'beginCaptures': |
| 50 | + '1': |
| 51 | + 'name': 'punctuation.definition.group.regexp' |
| 52 | + '3': |
| 53 | + 'name': 'meta.assertion.look-ahead.regexp' |
| 54 | + '4': |
| 55 | + 'name': 'meta.assertion.negative-look-ahead.regexp' |
| 56 | + 'end': '(\\))' |
| 57 | + 'endCaptures': |
| 58 | + '1': |
| 59 | + 'name': 'punctuation.definition.group.regexp' |
| 60 | + 'name': 'meta.group.assertion.regexp' |
| 61 | + 'patterns': [ |
| 62 | + { |
| 63 | + 'include': '#regexp' |
| 64 | + } |
| 65 | + ] |
| 66 | + } |
| 67 | + { |
| 68 | + 'begin': '\\((\\?:)?' |
| 69 | + 'beginCaptures': |
| 70 | + '0': |
| 71 | + 'name': 'punctuation.definition.group.regexp' |
| 72 | + 'end': '\\)' |
| 73 | + 'endCaptures': |
| 74 | + '0': |
| 75 | + 'name': 'punctuation.definition.group.regexp' |
| 76 | + 'name': 'meta.group.regexp' |
| 77 | + 'patterns': [ |
| 78 | + { |
| 79 | + 'include': '#regexp' |
| 80 | + } |
| 81 | + ] |
| 82 | + } |
| 83 | + { |
| 84 | + 'begin': '(\\[)(\\^)?' |
| 85 | + 'beginCaptures': |
| 86 | + '1': |
| 87 | + 'name': 'punctuation.definition.character-class.regexp' |
| 88 | + '2': |
| 89 | + 'name': 'keyword.operator.negation.regexp' |
| 90 | + 'end': '(\\])' |
| 91 | + 'endCaptures': |
| 92 | + '1': |
| 93 | + 'name': 'punctuation.definition.character-class.regexp' |
| 94 | + 'name': 'constant.other.character-class.set.regexp' |
| 95 | + 'patterns': [ |
| 96 | + { |
| 97 | + 'captures': |
| 98 | + '1': |
| 99 | + 'name': 'constant.character.numeric.regexp' |
| 100 | + '2': |
| 101 | + 'name': 'constant.character.control.regexp' |
| 102 | + '3': |
| 103 | + 'name': 'constant.character.escape.backslash.regexp' |
| 104 | + '4': |
| 105 | + 'name': 'constant.character.numeric.regexp' |
| 106 | + '5': |
| 107 | + 'name': 'constant.character.control.regexp' |
| 108 | + '6': |
| 109 | + 'name': 'constant.character.escape.backslash.regexp' |
| 110 | + '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])|(\\\\.))' |
| 111 | + 'name': 'constant.other.character-class.range.regexp' |
| 112 | + } |
| 113 | + { |
| 114 | + 'include': '#regex-character-class' |
| 115 | + } |
| 116 | + ] |
| 117 | + } |
| 118 | + { |
| 119 | + 'include': '#regex-character-class' |
| 120 | + } |
| 121 | + ] |
| 122 | +'scopeName': 'source.js.regexp' |
0 commit comments