github-linguist 5.0.4 → 5.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/grammars/source.regexp.comment.json +11 -0
- data/grammars/source.regexp.extended.json +17 -0
- data/grammars/source.regexp.json +1070 -0
- data/lib/linguist/classifier.rb +1 -1
- data/lib/linguist/heuristics.rb +1 -1
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +20 -4
- data/lib/linguist/samples.json +333 -87
- data/lib/linguist/version.rb +1 -1
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de02ae7b02cb77478f2b9488bf2668d60fabd365
|
4
|
+
data.tar.gz: a932bf3328656fe4369a32baef90c8152af81e7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 992908dd7d5bfa9e5558e454987e715ef69eae7715ee6ec272c4fd8a168b4b68b0fbb089278cbe1c31a33848e0297cf91035afb937bec4c87ff6044249e48dbe
|
7
|
+
data.tar.gz: 23d36905619c7db21f681d4644fb0d88a588ca3349d90793bfb90c0e22b73ce3f0727344e834dc7e3845b83f61f251e17815b0fa9631035df7d190e88456a116
|
data/LICENSE
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"name": "Regular Expression (Extended)",
|
3
|
+
"scopeName": "source.regexp.extended",
|
4
|
+
"firstLineMatch": "^\\s*\\(\\?[im]*x[im]*\\)",
|
5
|
+
"patterns": [
|
6
|
+
{
|
7
|
+
"name": "source.regexp.extended",
|
8
|
+
"begin": "\\A",
|
9
|
+
"end": "(?=A)B",
|
10
|
+
"patterns": [
|
11
|
+
{
|
12
|
+
"include": "source.regexp#main"
|
13
|
+
}
|
14
|
+
]
|
15
|
+
}
|
16
|
+
]
|
17
|
+
}
|
@@ -0,0 +1,1070 @@
|
|
1
|
+
{
|
2
|
+
"name": "Regular Expression",
|
3
|
+
"scopeName": "source.regexp",
|
4
|
+
"fileTypes": [
|
5
|
+
"regexp",
|
6
|
+
"regex"
|
7
|
+
],
|
8
|
+
"patterns": [
|
9
|
+
{
|
10
|
+
"include": "#main"
|
11
|
+
}
|
12
|
+
],
|
13
|
+
"repository": {
|
14
|
+
"main": {
|
15
|
+
"patterns": [
|
16
|
+
{
|
17
|
+
"include": "#comment"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"include": "#variable"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"include": "#anchor"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"include": "#escape"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"include": "#alternation"
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"include": "#quantifier"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"include": "#assertion"
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"include": "#conditional"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"include": "#group"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"include": "#class"
|
45
|
+
}
|
46
|
+
]
|
47
|
+
},
|
48
|
+
"alternation": {
|
49
|
+
"name": "keyword.operator.logical.or.regexp",
|
50
|
+
"match": "\\|"
|
51
|
+
},
|
52
|
+
"anchor": {
|
53
|
+
"patterns": [
|
54
|
+
{
|
55
|
+
"match": "\\^",
|
56
|
+
"name": "keyword.control.anchor.line-start.regexp"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"match": "\\$",
|
60
|
+
"name": "keyword.control.anchor.line-end.regexp"
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"match": "\\\\A",
|
64
|
+
"name": "keyword.control.anchor.string-start.regexp"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"match": "\\\\Z",
|
68
|
+
"name": "keyword.control.anchor.string-end-line.regexp"
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"match": "\\\\z",
|
72
|
+
"name": "keyword.control.anchor.string-end.regexp"
|
73
|
+
},
|
74
|
+
{
|
75
|
+
"match": "\\\\G",
|
76
|
+
"name": "keyword.control.anchor.search-start.regexp"
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"name": "meta.unicode-boundary.regexp",
|
80
|
+
"match": "(?:(\\\\b)|(\\\\B))(\\{)(\\w+)(})",
|
81
|
+
"captures": {
|
82
|
+
"1": {
|
83
|
+
"name": "keyword.control.anchor.word-boundary.regexp"
|
84
|
+
},
|
85
|
+
"2": {
|
86
|
+
"name": "keyword.control.anchor.non-word-boundary.regexp"
|
87
|
+
},
|
88
|
+
"3": {
|
89
|
+
"name": "punctuation.definition.unicode-boundary.bracket.curly.begin.regexp"
|
90
|
+
},
|
91
|
+
"4": {
|
92
|
+
"name": "entity.property.name.regexp"
|
93
|
+
},
|
94
|
+
"5": {
|
95
|
+
"name": "punctuation.definition.unicode-boundary.bracket.curly.end.regexp"
|
96
|
+
}
|
97
|
+
}
|
98
|
+
},
|
99
|
+
{
|
100
|
+
"match": "\\\\b",
|
101
|
+
"name": "keyword.control.anchor.word-boundary.regexp"
|
102
|
+
},
|
103
|
+
{
|
104
|
+
"match": "\\\\B",
|
105
|
+
"name": "keyword.control.anchor.non-word-boundary.regexp"
|
106
|
+
}
|
107
|
+
]
|
108
|
+
},
|
109
|
+
"assertion": {
|
110
|
+
"patterns": [
|
111
|
+
{
|
112
|
+
"name": "meta.assertion.positive.look-ahead.regexp",
|
113
|
+
"begin": "\\(\\?=",
|
114
|
+
"end": "\\)",
|
115
|
+
"beginCaptures": {
|
116
|
+
"0": {
|
117
|
+
"name": "punctuation.definition.assertion.begin.regexp"
|
118
|
+
}
|
119
|
+
},
|
120
|
+
"endCaptures": {
|
121
|
+
"0": {
|
122
|
+
"name": "punctuation.definition.assertion.end.regexp"
|
123
|
+
}
|
124
|
+
},
|
125
|
+
"patterns": [
|
126
|
+
{
|
127
|
+
"include": "#main"
|
128
|
+
}
|
129
|
+
]
|
130
|
+
},
|
131
|
+
{
|
132
|
+
"name": "meta.assertion.negative.look-ahead.regexp",
|
133
|
+
"begin": "\\(\\?!",
|
134
|
+
"end": "\\)",
|
135
|
+
"beginCaptures": {
|
136
|
+
"0": {
|
137
|
+
"name": "punctuation.definition.assertion.begin.regexp"
|
138
|
+
}
|
139
|
+
},
|
140
|
+
"endCaptures": {
|
141
|
+
"0": {
|
142
|
+
"name": "punctuation.definition.assertion.end.regexp"
|
143
|
+
}
|
144
|
+
},
|
145
|
+
"patterns": [
|
146
|
+
{
|
147
|
+
"include": "#main"
|
148
|
+
}
|
149
|
+
]
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"name": "meta.assertion.negative.look-behind.regexp",
|
153
|
+
"begin": "\\(\\?<!",
|
154
|
+
"end": "\\)",
|
155
|
+
"beginCaptures": {
|
156
|
+
"0": {
|
157
|
+
"name": "punctuation.definition.assertion.begin.regexp"
|
158
|
+
}
|
159
|
+
},
|
160
|
+
"endCaptures": {
|
161
|
+
"0": {
|
162
|
+
"name": "punctuation.definition.assertion.end.regexp"
|
163
|
+
}
|
164
|
+
},
|
165
|
+
"patterns": [
|
166
|
+
{
|
167
|
+
"include": "#main"
|
168
|
+
}
|
169
|
+
]
|
170
|
+
},
|
171
|
+
{
|
172
|
+
"name": "meta.assertion.positive.look-behind.regexp",
|
173
|
+
"begin": "\\(\\?<=",
|
174
|
+
"end": "\\)",
|
175
|
+
"beginCaptures": {
|
176
|
+
"0": {
|
177
|
+
"name": "punctuation.definition.assertion.begin.regexp"
|
178
|
+
}
|
179
|
+
},
|
180
|
+
"endCaptures": {
|
181
|
+
"0": {
|
182
|
+
"name": "punctuation.definition.assertion.end.regexp"
|
183
|
+
}
|
184
|
+
},
|
185
|
+
"patterns": [
|
186
|
+
{
|
187
|
+
"include": "#main"
|
188
|
+
}
|
189
|
+
]
|
190
|
+
}
|
191
|
+
]
|
192
|
+
},
|
193
|
+
"class": {
|
194
|
+
"name": "meta.character-class.set.regexp",
|
195
|
+
"begin": "\\[",
|
196
|
+
"end": "\\]",
|
197
|
+
"beginCaptures": {
|
198
|
+
"0": {
|
199
|
+
"name": "punctuation.definition.character-class.set.begin.regexp"
|
200
|
+
}
|
201
|
+
},
|
202
|
+
"endCaptures": {
|
203
|
+
"0": {
|
204
|
+
"name": "punctuation.definition.character-class.set.end.regexp"
|
205
|
+
}
|
206
|
+
},
|
207
|
+
"patterns": [
|
208
|
+
{
|
209
|
+
"include": "#classInnards"
|
210
|
+
}
|
211
|
+
]
|
212
|
+
},
|
213
|
+
"classInnards": {
|
214
|
+
"patterns": [
|
215
|
+
{
|
216
|
+
"name": "keyword.operator.logical.not.regexp",
|
217
|
+
"match": "\\G\\^"
|
218
|
+
},
|
219
|
+
{
|
220
|
+
"name": "constant.character.escape.backspace.regexp",
|
221
|
+
"match": "\\\\b"
|
222
|
+
},
|
223
|
+
{
|
224
|
+
"begin": "(&&)(\\[)",
|
225
|
+
"end": "\\]",
|
226
|
+
"beginCaptures": {
|
227
|
+
"1": {
|
228
|
+
"name": "keyword.operator.logical.intersect.regexp"
|
229
|
+
},
|
230
|
+
"2": {
|
231
|
+
"name": "punctuation.definition.character-class.set.begin.regexp"
|
232
|
+
}
|
233
|
+
},
|
234
|
+
"endCaptures": {
|
235
|
+
"0": {
|
236
|
+
"name": "punctuation.definition.character-class.set.end.regexp"
|
237
|
+
}
|
238
|
+
},
|
239
|
+
"patterns": [
|
240
|
+
{
|
241
|
+
"include": "#classInnards"
|
242
|
+
}
|
243
|
+
]
|
244
|
+
},
|
245
|
+
{
|
246
|
+
"name": "keyword.operator.logical.intersect.regexp",
|
247
|
+
"match": "&&"
|
248
|
+
},
|
249
|
+
{
|
250
|
+
"name": "constant.other.character-class.range.regexp",
|
251
|
+
"match": "(?x) ([^\\\\]|\\\\(?:x[0-9A-Fa-f]{2}|x\\{[0-9A-Fa-f]+\\}|\\d{3}|.)) (-) ([^\\\\]|\\\\(?:x[0-9A-Fa-f]{2}|x\\{[0-9A-Fa-f]+\\}|\\d{3}|.))",
|
252
|
+
"captures": {
|
253
|
+
"1": {
|
254
|
+
"patterns": [
|
255
|
+
{
|
256
|
+
"include": "#escape"
|
257
|
+
}
|
258
|
+
]
|
259
|
+
},
|
260
|
+
"2": {
|
261
|
+
"name": "punctuation.separator.range.dash.regexp"
|
262
|
+
},
|
263
|
+
"3": {
|
264
|
+
"patterns": [
|
265
|
+
{
|
266
|
+
"include": "#escape"
|
267
|
+
}
|
268
|
+
]
|
269
|
+
}
|
270
|
+
}
|
271
|
+
},
|
272
|
+
{
|
273
|
+
"name": "constant.language.posix.$2-char.character-class.regexp",
|
274
|
+
"match": "(\\[:)(\\^?)(\\w+)(:\\])",
|
275
|
+
"captures": {
|
276
|
+
"1": {
|
277
|
+
"name": "punctuation.definition.character-class.set.begin.regexp"
|
278
|
+
},
|
279
|
+
"2": {
|
280
|
+
"name": "keyword.operator.logical.not.regexp"
|
281
|
+
},
|
282
|
+
"3": {
|
283
|
+
"name": "support.constant.posix-class.regexp"
|
284
|
+
},
|
285
|
+
"4": {
|
286
|
+
"name": "punctuation.definition.character-class.set.end.regexp"
|
287
|
+
}
|
288
|
+
}
|
289
|
+
},
|
290
|
+
{
|
291
|
+
"name": "constant.character.escape.backslash.regexp",
|
292
|
+
"match": "\\\\\\[|\\\\\\]"
|
293
|
+
},
|
294
|
+
{
|
295
|
+
"match": "\\^|\\$|\\(|\\)|\\["
|
296
|
+
},
|
297
|
+
{
|
298
|
+
"include": "$self"
|
299
|
+
},
|
300
|
+
{
|
301
|
+
"name": "constant.single.character.character-class.regexp",
|
302
|
+
"match": "[^\\]]"
|
303
|
+
}
|
304
|
+
]
|
305
|
+
},
|
306
|
+
"comment": {
|
307
|
+
"begin": "\\(\\?#",
|
308
|
+
"end": "\\)",
|
309
|
+
"name": "comment.block.regexp",
|
310
|
+
"patterns": [
|
311
|
+
{
|
312
|
+
"match": "\\\\.",
|
313
|
+
"name": "constant.character.escape.backslash.regexp"
|
314
|
+
}
|
315
|
+
]
|
316
|
+
},
|
317
|
+
"conditional": {
|
318
|
+
"name": "meta.conditional.regexp",
|
319
|
+
"begin": "(\\()(\\?)(?=\\()",
|
320
|
+
"end": "\\)",
|
321
|
+
"beginCaptures": {
|
322
|
+
"1": {
|
323
|
+
"name": "punctuation.section.condition.begin.regexp"
|
324
|
+
},
|
325
|
+
"2": {
|
326
|
+
"name": "keyword.control.flow.regexp"
|
327
|
+
}
|
328
|
+
},
|
329
|
+
"endCaptures": {
|
330
|
+
"0": {
|
331
|
+
"name": "punctuation.section.condition.end.regexp"
|
332
|
+
}
|
333
|
+
},
|
334
|
+
"patterns": [
|
335
|
+
{
|
336
|
+
"name": "punctuation.separator.condition.if-else.regexp",
|
337
|
+
"match": "\\|"
|
338
|
+
},
|
339
|
+
{
|
340
|
+
"include": "#assertion"
|
341
|
+
},
|
342
|
+
{
|
343
|
+
"name": "meta.condition.function-call.regexp",
|
344
|
+
"begin": "\\G\\(",
|
345
|
+
"end": "\\)",
|
346
|
+
"beginCaptures": {
|
347
|
+
"0": {
|
348
|
+
"name": "punctuation.section.condition.begin.regexp"
|
349
|
+
}
|
350
|
+
},
|
351
|
+
"endCaptures": {
|
352
|
+
"0": {
|
353
|
+
"name": "punctuation.section.condition.end.regexp"
|
354
|
+
}
|
355
|
+
},
|
356
|
+
"patterns": [
|
357
|
+
{
|
358
|
+
"match": "\\GDEFINE",
|
359
|
+
"name": "storage.type.function.subpattern.regexp"
|
360
|
+
},
|
361
|
+
{
|
362
|
+
"match": "\\Gassert",
|
363
|
+
"name": "keyword.other.assertion.regexp"
|
364
|
+
},
|
365
|
+
{
|
366
|
+
"match": "\\G(?:(<)([^>]+)(>)|(')([^>]+)('))",
|
367
|
+
"captures": {
|
368
|
+
"1": {
|
369
|
+
"name": "punctuation.definition.group-reference.bracket.angle.begin.regexp"
|
370
|
+
},
|
371
|
+
"2": {
|
372
|
+
"name": "entity.group.name.regexp"
|
373
|
+
},
|
374
|
+
"3": {
|
375
|
+
"name": "punctuation.definition.group-reference.bracket.angle.end.regexp"
|
376
|
+
},
|
377
|
+
"4": {
|
378
|
+
"name": "punctuation.definition.group-reference.quote.single.begin.regexp"
|
379
|
+
},
|
380
|
+
"5": {
|
381
|
+
"name": "entity.group.name.regexp"
|
382
|
+
},
|
383
|
+
"6": {
|
384
|
+
"name": "punctuation.definition.group-reference.quote.single.end.regexp"
|
385
|
+
}
|
386
|
+
}
|
387
|
+
},
|
388
|
+
{
|
389
|
+
"match": "\\G(R(&))(\\w+)",
|
390
|
+
"captures": {
|
391
|
+
"1": {
|
392
|
+
"name": "keyword.other.recursion.specific.regexp"
|
393
|
+
},
|
394
|
+
"2": {
|
395
|
+
"name": "punctuation.definition.reference.regexp"
|
396
|
+
},
|
397
|
+
"3": {
|
398
|
+
"name": "entity.group.name.regexp"
|
399
|
+
}
|
400
|
+
}
|
401
|
+
},
|
402
|
+
{
|
403
|
+
"match": "\\GR\\d+",
|
404
|
+
"name": "keyword.other.recursion.specific-group.regexp"
|
405
|
+
},
|
406
|
+
{
|
407
|
+
"match": "\\GR",
|
408
|
+
"name": "keyword.other.recursion.overall.regexp"
|
409
|
+
},
|
410
|
+
{
|
411
|
+
"match": "\\G\\d+",
|
412
|
+
"name": "keyword.other.reference.absolute.regexp"
|
413
|
+
},
|
414
|
+
{
|
415
|
+
"match": "\\G[-+]\\d+",
|
416
|
+
"name": "keyword.other.reference.relative.regexp"
|
417
|
+
},
|
418
|
+
{
|
419
|
+
"match": "\\G\\w+",
|
420
|
+
"name": "entity.group.name.regexp"
|
421
|
+
}
|
422
|
+
]
|
423
|
+
},
|
424
|
+
{
|
425
|
+
"include": "#main"
|
426
|
+
}
|
427
|
+
]
|
428
|
+
},
|
429
|
+
"escape": {
|
430
|
+
"patterns": [
|
431
|
+
{
|
432
|
+
"match": "\\\\d",
|
433
|
+
"name": "constant.character.escape.decimal.regexp"
|
434
|
+
},
|
435
|
+
{
|
436
|
+
"match": "\\\\s",
|
437
|
+
"name": "constant.character.escape.whitespace.regexp"
|
438
|
+
},
|
439
|
+
{
|
440
|
+
"match": "\\\\w",
|
441
|
+
"name": "constant.character.escape.word-char.regexp"
|
442
|
+
},
|
443
|
+
{
|
444
|
+
"match": "\\\\n",
|
445
|
+
"name": "constant.character.escape.newline.regexp"
|
446
|
+
},
|
447
|
+
{
|
448
|
+
"match": "\\\\t",
|
449
|
+
"name": "constant.character.escape.tab.regexp"
|
450
|
+
},
|
451
|
+
{
|
452
|
+
"match": "\\\\r",
|
453
|
+
"name": "constant.character.escape.return.regexp"
|
454
|
+
},
|
455
|
+
{
|
456
|
+
"match": "\\\\D",
|
457
|
+
"name": "constant.character.escape.non-decimal.regexp"
|
458
|
+
},
|
459
|
+
{
|
460
|
+
"match": "\\\\S",
|
461
|
+
"name": "constant.character.escape.non-whitespace.regexp"
|
462
|
+
},
|
463
|
+
{
|
464
|
+
"match": "\\\\W",
|
465
|
+
"name": "constant.character.escape.non-word-char.regexp"
|
466
|
+
},
|
467
|
+
{
|
468
|
+
"match": "\\\\a",
|
469
|
+
"name": "constant.character.escape.alarm.regexp"
|
470
|
+
},
|
471
|
+
{
|
472
|
+
"match": "\\\\e",
|
473
|
+
"name": "constant.character.escape.escape-char.regexp"
|
474
|
+
},
|
475
|
+
{
|
476
|
+
"match": "\\\\f",
|
477
|
+
"name": "constant.character.escape.form-feed.regexp"
|
478
|
+
},
|
479
|
+
{
|
480
|
+
"match": "\\\\v",
|
481
|
+
"name": "constant.character.escape.vertical-tab.regexp"
|
482
|
+
},
|
483
|
+
{
|
484
|
+
"match": "\\\\x[0-9A-Fa-f]{2}",
|
485
|
+
"name": "constant.character.escape.numeric.regexp"
|
486
|
+
},
|
487
|
+
{
|
488
|
+
"name": "meta.character-escape.hex.regexp",
|
489
|
+
"match": "(\\\\x)(\\{)([0-9A-Fa-f]{2,})(\\})",
|
490
|
+
"captures": {
|
491
|
+
"1": {
|
492
|
+
"name": "keyword.operator.unicode-escape.hex.regexp"
|
493
|
+
},
|
494
|
+
"2": {
|
495
|
+
"name": "punctuation.definition.unicode-escape.bracket.curly.begin.regexp"
|
496
|
+
},
|
497
|
+
"3": {
|
498
|
+
"name": "constant.numeric.codepoint.hex.regexp"
|
499
|
+
},
|
500
|
+
"4": {
|
501
|
+
"name": "punctuation.definition.unicode-escape.bracket.curly.end.regexp"
|
502
|
+
}
|
503
|
+
}
|
504
|
+
},
|
505
|
+
{
|
506
|
+
"name": "meta.character-escape.octal.regexp",
|
507
|
+
"match": "(\\\\o)(\\{)(\\d{2,})(\\})",
|
508
|
+
"captures": {
|
509
|
+
"1": {
|
510
|
+
"name": "keyword.operator.unicode-escape.octal.regexp"
|
511
|
+
},
|
512
|
+
"2": {
|
513
|
+
"name": "punctuation.definition.unicode-escape.bracket.curly.begin.regexp"
|
514
|
+
},
|
515
|
+
"3": {
|
516
|
+
"name": "constant.numeric.codepoint.octal.regexp"
|
517
|
+
},
|
518
|
+
"4": {
|
519
|
+
"name": "punctuation.definition.unicode-escape.bracket.curly.end.regexp"
|
520
|
+
}
|
521
|
+
}
|
522
|
+
},
|
523
|
+
{
|
524
|
+
"name": "meta.unicode-property.regexp",
|
525
|
+
"match": "(\\\\[Pp])(\\{)(\\^?)([^{}]+)(\\})",
|
526
|
+
"captures": {
|
527
|
+
"1": {
|
528
|
+
"name": "keyword.operator.unicode-property.regexp"
|
529
|
+
},
|
530
|
+
"2": {
|
531
|
+
"name": "punctuation.definition.unicode-escape.bracket.curly.begin.regexp"
|
532
|
+
},
|
533
|
+
"3": {
|
534
|
+
"name": "keyword.operator.logical.not.regexp"
|
535
|
+
},
|
536
|
+
"4": {
|
537
|
+
"name": "entity.property.name.regexp",
|
538
|
+
"patterns": [
|
539
|
+
{
|
540
|
+
"include": "#propInnards"
|
541
|
+
}
|
542
|
+
]
|
543
|
+
},
|
544
|
+
"5": {
|
545
|
+
"name": "punctuation.definition.unicode-escape.bracket.curly.end.regexp"
|
546
|
+
}
|
547
|
+
}
|
548
|
+
},
|
549
|
+
{
|
550
|
+
"name": "meta.unicode-property.single-letter.regexp",
|
551
|
+
"match": "(\\\\[Pp])(\\w)",
|
552
|
+
"captures": {
|
553
|
+
"1": {
|
554
|
+
"name": "keyword.operator.unicode-property.regexp"
|
555
|
+
},
|
556
|
+
"2": {
|
557
|
+
"name": "entity.property.name.regexp"
|
558
|
+
}
|
559
|
+
}
|
560
|
+
},
|
561
|
+
{
|
562
|
+
"name": "meta.group-reference.regexp",
|
563
|
+
"contentName": "entity.group.name.regexp",
|
564
|
+
"patterns": [
|
565
|
+
{
|
566
|
+
"include": "#groupRefInnards"
|
567
|
+
}
|
568
|
+
],
|
569
|
+
"begin": "(\\\\[kg])(<)",
|
570
|
+
"end": ">",
|
571
|
+
"beginCaptures": {
|
572
|
+
"1": {
|
573
|
+
"name": "keyword.operator.group-reference.regexp"
|
574
|
+
},
|
575
|
+
"2": {
|
576
|
+
"name": "punctuation.definition.group-reference.bracket.angle.begin.regexp"
|
577
|
+
}
|
578
|
+
},
|
579
|
+
"endCaptures": {
|
580
|
+
"0": {
|
581
|
+
"name": "punctuation.definition.group-reference.bracket.angle.end.regexp"
|
582
|
+
}
|
583
|
+
}
|
584
|
+
},
|
585
|
+
{
|
586
|
+
"name": "meta.group-reference.regexp",
|
587
|
+
"contentName": "entity.group.name.regexp",
|
588
|
+
"patterns": [
|
589
|
+
{
|
590
|
+
"include": "#groupRefInnards"
|
591
|
+
}
|
592
|
+
],
|
593
|
+
"begin": "(\\\\[kg])(')",
|
594
|
+
"end": "'",
|
595
|
+
"beginCaptures": {
|
596
|
+
"1": {
|
597
|
+
"name": "keyword.operator.group-reference.regexp"
|
598
|
+
},
|
599
|
+
"2": {
|
600
|
+
"name": "punctuation.definition.group-reference.quote.single.begin.regexp"
|
601
|
+
}
|
602
|
+
},
|
603
|
+
"endCaptures": {
|
604
|
+
"0": {
|
605
|
+
"name": "punctuation.definition.group-reference.quote.single.end.regexp"
|
606
|
+
}
|
607
|
+
}
|
608
|
+
},
|
609
|
+
{
|
610
|
+
"name": "meta.group-reference.regexp",
|
611
|
+
"contentName": "entity.group.name.regexp",
|
612
|
+
"begin": "(\\\\[kg])({)",
|
613
|
+
"end": "}",
|
614
|
+
"beginCaptures": {
|
615
|
+
"1": {
|
616
|
+
"name": "keyword.operator.group-reference.regexp"
|
617
|
+
},
|
618
|
+
"2": {
|
619
|
+
"name": "punctuation.definition.group-reference.bracket.curly.begin.regexp"
|
620
|
+
}
|
621
|
+
},
|
622
|
+
"endCaptures": {
|
623
|
+
"0": {
|
624
|
+
"name": "punctuation.definition.group-reference.bracket.curly.end.regexp"
|
625
|
+
}
|
626
|
+
}
|
627
|
+
},
|
628
|
+
{
|
629
|
+
"name": "meta.group-reference.single-letter.regexp",
|
630
|
+
"match": "(\\\\g)(\\d)",
|
631
|
+
"captures": {
|
632
|
+
"1": {
|
633
|
+
"name": "keyword.operator.group-reference.regexp"
|
634
|
+
},
|
635
|
+
"2": {
|
636
|
+
"name": "entity.group.name.regexp"
|
637
|
+
}
|
638
|
+
}
|
639
|
+
},
|
640
|
+
{
|
641
|
+
"name": "meta.named-char.regexp",
|
642
|
+
"match": "(\\\\N)(\\{)([^{}]+)(\\})",
|
643
|
+
"captures": {
|
644
|
+
"1": {
|
645
|
+
"name": "keyword.operator.named-char.regexp"
|
646
|
+
},
|
647
|
+
"2": {
|
648
|
+
"name": "punctuation.definition.unicode-escape.bracket.curly.begin.regexp"
|
649
|
+
},
|
650
|
+
"3": {
|
651
|
+
"name": "entity.character.name.regexp",
|
652
|
+
"patterns": [
|
653
|
+
{
|
654
|
+
"name": "punctuation.separator.colon.regexp",
|
655
|
+
"match": ":"
|
656
|
+
},
|
657
|
+
{
|
658
|
+
"name": "punctuation.separator.codepoint.regexp",
|
659
|
+
"match": "(?<=U)\\+(?=[A-Fa-f0-9])"
|
660
|
+
}
|
661
|
+
]
|
662
|
+
},
|
663
|
+
"4": {
|
664
|
+
"name": "punctuation.definition.unicode-escape.bracket.curly.end.regexp"
|
665
|
+
}
|
666
|
+
}
|
667
|
+
},
|
668
|
+
{
|
669
|
+
"match": "\\\\(?:\\d{3}|0\\d)",
|
670
|
+
"name": "constant.character.escape.octal.numeric.regexp"
|
671
|
+
},
|
672
|
+
{
|
673
|
+
"match": "\\\\0",
|
674
|
+
"name": "constant.character.escape.null-byte.numeric.regexp"
|
675
|
+
},
|
676
|
+
{
|
677
|
+
"match": "\\\\(\\d{1,2})",
|
678
|
+
"name": "keyword.other.back-reference.$1.regexp"
|
679
|
+
},
|
680
|
+
{
|
681
|
+
"match": "\\\\(?:c|C-)[?-_]",
|
682
|
+
"name": "constant.character.escape.control-char.regexp"
|
683
|
+
},
|
684
|
+
{
|
685
|
+
"match": "\\\\h",
|
686
|
+
"name": "constant.character.escape.hex-digit.regexp"
|
687
|
+
},
|
688
|
+
{
|
689
|
+
"match": "\\\\H",
|
690
|
+
"name": "constant.character.escape.non-hex-digit.regexp"
|
691
|
+
},
|
692
|
+
{
|
693
|
+
"match": "\\\\E",
|
694
|
+
"name": "keyword.control.end-mode.regexp"
|
695
|
+
},
|
696
|
+
{
|
697
|
+
"match": "\\\\Q",
|
698
|
+
"name": "keyword.control.quote-mode.regexp"
|
699
|
+
},
|
700
|
+
{
|
701
|
+
"match": "\\\\F",
|
702
|
+
"name": "keyword.control.foldcase-mode.regexp"
|
703
|
+
},
|
704
|
+
{
|
705
|
+
"match": "\\\\L",
|
706
|
+
"name": "keyword.control.lowercase-mode.regexp"
|
707
|
+
},
|
708
|
+
{
|
709
|
+
"match": "\\\\U",
|
710
|
+
"name": "keyword.control.titlecase-mode.regexp"
|
711
|
+
},
|
712
|
+
{
|
713
|
+
"match": "\\\\K",
|
714
|
+
"name": "keyword.control.keep-out.regexp"
|
715
|
+
},
|
716
|
+
{
|
717
|
+
"match": "\\\\l",
|
718
|
+
"name": "constant.character.escape.lowercase-next.regexp"
|
719
|
+
},
|
720
|
+
{
|
721
|
+
"match": "\\\\u",
|
722
|
+
"name": "constant.character.escape.titlecase-next.regexp"
|
723
|
+
},
|
724
|
+
{
|
725
|
+
"match": "\\\\N",
|
726
|
+
"name": "constant.character.escape.non-newline.regexp"
|
727
|
+
},
|
728
|
+
{
|
729
|
+
"match": "\\\\X",
|
730
|
+
"name": "constant.character.escape.extended-grapheme.regexp"
|
731
|
+
},
|
732
|
+
{
|
733
|
+
"match": "\\\\R",
|
734
|
+
"name": "constnat.character.escape.linebreak-grapheme.regexp"
|
735
|
+
},
|
736
|
+
{
|
737
|
+
"match": "\\\\V",
|
738
|
+
"name": "constant.character.escape.non-vertical-whitespace.regexp"
|
739
|
+
},
|
740
|
+
{
|
741
|
+
"match": "\\\\M-\\\\C-[?-_]",
|
742
|
+
"name": "constant.character.escape.meta-control.regexp"
|
743
|
+
},
|
744
|
+
{
|
745
|
+
"match": "\\\\M-.",
|
746
|
+
"name": "constant.character.escape.meta-char.regexp"
|
747
|
+
},
|
748
|
+
{
|
749
|
+
"match": "\\\\.",
|
750
|
+
"name": "constant.character.escape.misc.regexp"
|
751
|
+
}
|
752
|
+
]
|
753
|
+
},
|
754
|
+
"group": {
|
755
|
+
"patterns": [
|
756
|
+
{
|
757
|
+
"name": "meta.callout.regexp",
|
758
|
+
"match": "(\\()(\\?C\\d*)(\\))",
|
759
|
+
"captures": {
|
760
|
+
"1": {
|
761
|
+
"name": "punctuation.definition.group.begin.regexp"
|
762
|
+
},
|
763
|
+
"2": {
|
764
|
+
"name": "keyword.control.callout.regexp"
|
765
|
+
},
|
766
|
+
"3": {
|
767
|
+
"name": "punctuation.definition.group.end.regexp"
|
768
|
+
}
|
769
|
+
}
|
770
|
+
},
|
771
|
+
{
|
772
|
+
"name": "meta.group.named.regexp",
|
773
|
+
"begin": "\\(\\?(?=P?[<'])",
|
774
|
+
"end": "\\)",
|
775
|
+
"beginCaptures": {
|
776
|
+
"0": {
|
777
|
+
"name": "punctuation.definition.group.begin.regexp"
|
778
|
+
}
|
779
|
+
},
|
780
|
+
"endCaptures": {
|
781
|
+
"0": {
|
782
|
+
"name": "punctuation.definition.group.end.regexp"
|
783
|
+
}
|
784
|
+
},
|
785
|
+
"patterns": [
|
786
|
+
{
|
787
|
+
"contentName": "entity.group.name.regexp",
|
788
|
+
"begin": "\\G(P?)(<)",
|
789
|
+
"end": ">",
|
790
|
+
"beginCaptures": {
|
791
|
+
"1": {
|
792
|
+
"name": "storage.type.function.named-group.regexp"
|
793
|
+
},
|
794
|
+
"2": {
|
795
|
+
"name": "punctuation.definition.named-group.bracket.angle.begin.regexp"
|
796
|
+
}
|
797
|
+
},
|
798
|
+
"endCaptures": {
|
799
|
+
"0": {
|
800
|
+
"name": "punctuation.definition.named-group.bracket.angle.end.regexp"
|
801
|
+
}
|
802
|
+
}
|
803
|
+
},
|
804
|
+
{
|
805
|
+
"contentName": "entity.group.name.regexp",
|
806
|
+
"begin": "\\G'",
|
807
|
+
"end": "'",
|
808
|
+
"beginCaptures": {
|
809
|
+
"0": {
|
810
|
+
"name": "punctuation.definition.named-group.quote.single.begin.regexp"
|
811
|
+
}
|
812
|
+
},
|
813
|
+
"endCaptures": {
|
814
|
+
"0": {
|
815
|
+
"name": "punctuation.definition.named-group.quote.single.end.regexp"
|
816
|
+
}
|
817
|
+
}
|
818
|
+
},
|
819
|
+
{
|
820
|
+
"include": "#main"
|
821
|
+
}
|
822
|
+
]
|
823
|
+
},
|
824
|
+
{
|
825
|
+
"name": "meta.group.non-capturing.regexp",
|
826
|
+
"patterns": [
|
827
|
+
{
|
828
|
+
"include": "#main"
|
829
|
+
}
|
830
|
+
],
|
831
|
+
"begin": "(\\(\\?)([-A-Za-z^]*)(:)",
|
832
|
+
"end": "\\)",
|
833
|
+
"beginCaptures": {
|
834
|
+
"1": {
|
835
|
+
"name": "punctuation.definition.group.begin.regexp"
|
836
|
+
},
|
837
|
+
"2": {
|
838
|
+
"patterns": [
|
839
|
+
{
|
840
|
+
"include": "#scopedModifiers"
|
841
|
+
}
|
842
|
+
]
|
843
|
+
},
|
844
|
+
"3": {
|
845
|
+
"name": "punctuation.separator.colon.regexp"
|
846
|
+
}
|
847
|
+
},
|
848
|
+
"endCaptures": {
|
849
|
+
"0": {
|
850
|
+
"name": "punctuation.definition.group.end.regexp"
|
851
|
+
}
|
852
|
+
}
|
853
|
+
},
|
854
|
+
{
|
855
|
+
"name": "meta.group.atomic.regexp",
|
856
|
+
"begin": "\\(\\?>",
|
857
|
+
"end": "\\)",
|
858
|
+
"beginCaptures": {
|
859
|
+
"0": {
|
860
|
+
"name": "punctuation.definition.group.begin.regexp"
|
861
|
+
}
|
862
|
+
},
|
863
|
+
"endCaptures": {
|
864
|
+
"0": {
|
865
|
+
"name": "punctuation.definition.group.end.regexp"
|
866
|
+
}
|
867
|
+
},
|
868
|
+
"patterns": [
|
869
|
+
{
|
870
|
+
"include": "#main"
|
871
|
+
}
|
872
|
+
]
|
873
|
+
},
|
874
|
+
{
|
875
|
+
"name": "meta.group.scoped-modifiers.regexp",
|
876
|
+
"match": "(\\(\\?)([-A-Za-z^]*)(\\))",
|
877
|
+
"captures": {
|
878
|
+
"1": {
|
879
|
+
"name": "punctuation.definition.group.begin.regexp"
|
880
|
+
},
|
881
|
+
"2": {
|
882
|
+
"patterns": [
|
883
|
+
{
|
884
|
+
"include": "#scopedModifiers"
|
885
|
+
}
|
886
|
+
]
|
887
|
+
},
|
888
|
+
"3": {
|
889
|
+
"name": "punctuation.definition.group.end.regexp"
|
890
|
+
}
|
891
|
+
}
|
892
|
+
},
|
893
|
+
{
|
894
|
+
"name": "meta.control-verb.regexp",
|
895
|
+
"match": "(\\(\\*)(\\w*)(?:([:=])([^\\s()]*))?(\\))",
|
896
|
+
"captures": {
|
897
|
+
"1": {
|
898
|
+
"name": "punctuation.definition.group.begin.regexp"
|
899
|
+
},
|
900
|
+
"2": {
|
901
|
+
"name": "keyword.control.verb.regexp"
|
902
|
+
},
|
903
|
+
"3": {
|
904
|
+
"name": "punctuation.separator.key-value.regexp"
|
905
|
+
},
|
906
|
+
"4": {
|
907
|
+
"name": "variable.parameter.control-verb.regexp"
|
908
|
+
},
|
909
|
+
"5": {
|
910
|
+
"name": "punctuation.definition.group.begin.regexp"
|
911
|
+
}
|
912
|
+
}
|
913
|
+
},
|
914
|
+
{
|
915
|
+
"name": "meta.group-reference.named.regexp",
|
916
|
+
"match": "(\\()(\\?(?:&|P[>=]))(\\w+)(\\))",
|
917
|
+
"captures": {
|
918
|
+
"1": {
|
919
|
+
"name": "punctuation.definition.group.begin.regexp"
|
920
|
+
},
|
921
|
+
"2": {
|
922
|
+
"name": "keyword.other.back-reference.regexp"
|
923
|
+
},
|
924
|
+
"3": {
|
925
|
+
"name": "entity.group.name.regexp"
|
926
|
+
},
|
927
|
+
"4": {
|
928
|
+
"name": "punctuation.definition.group.begin.regexp"
|
929
|
+
}
|
930
|
+
}
|
931
|
+
},
|
932
|
+
{
|
933
|
+
"name": "meta.group-reference.relative.regexp",
|
934
|
+
"match": "(\\()(\\?[-+]\\d+)(\\))",
|
935
|
+
"captures": {
|
936
|
+
"1": {
|
937
|
+
"name": "punctuation.definition.group.begin.regexp"
|
938
|
+
},
|
939
|
+
"2": {
|
940
|
+
"name": "keyword.other.back-reference.regexp"
|
941
|
+
},
|
942
|
+
"3": {
|
943
|
+
"name": "punctuation.definition.group.end.regexp"
|
944
|
+
}
|
945
|
+
}
|
946
|
+
},
|
947
|
+
{
|
948
|
+
"name": "meta.group.regexp",
|
949
|
+
"begin": "\\(",
|
950
|
+
"end": "\\)",
|
951
|
+
"beginCaptures": {
|
952
|
+
"0": {
|
953
|
+
"name": "punctuation.definition.group.begin.regexp"
|
954
|
+
}
|
955
|
+
},
|
956
|
+
"endCaptures": {
|
957
|
+
"0": {
|
958
|
+
"name": "punctuation.definition.group.end.regexp"
|
959
|
+
}
|
960
|
+
},
|
961
|
+
"patterns": [
|
962
|
+
{
|
963
|
+
"include": "#main"
|
964
|
+
}
|
965
|
+
]
|
966
|
+
}
|
967
|
+
]
|
968
|
+
},
|
969
|
+
"groupRefInnards": {
|
970
|
+
"patterns": [
|
971
|
+
{
|
972
|
+
"match": "\\-(?=\\d)",
|
973
|
+
"name": "keyword.operator.arithmetic.minus.regexp"
|
974
|
+
},
|
975
|
+
{
|
976
|
+
"match": "\\+(?=\\d)",
|
977
|
+
"name": "keyword.operator.arithmetic.plus.regexp"
|
978
|
+
}
|
979
|
+
]
|
980
|
+
},
|
981
|
+
"propInnards": {
|
982
|
+
"patterns": [
|
983
|
+
{
|
984
|
+
"match": "=",
|
985
|
+
"name": "keyword.operator.comparison.regexp"
|
986
|
+
},
|
987
|
+
{
|
988
|
+
"match": "True|False",
|
989
|
+
"name": "constant.language.boolean.${0:/downcase}.regexp"
|
990
|
+
}
|
991
|
+
]
|
992
|
+
},
|
993
|
+
"quantifier": {
|
994
|
+
"patterns": [
|
995
|
+
{
|
996
|
+
"name": "keyword.operator.quantifier.regexp",
|
997
|
+
"match": "[*+?]"
|
998
|
+
},
|
999
|
+
{
|
1000
|
+
"name": "keyword.operator.quantifier.specific.regexp",
|
1001
|
+
"match": "(\\{)(?:(\\d+)(,?)(\\d*)|(,)(\\d+))(\\})",
|
1002
|
+
"captures": {
|
1003
|
+
"1": {
|
1004
|
+
"name": "punctuation.definition.quantifier.bracket.curly.begin.regexp"
|
1005
|
+
},
|
1006
|
+
"2": {
|
1007
|
+
"name": "keyword.operator.quantifier.min.regexp"
|
1008
|
+
},
|
1009
|
+
"3": {
|
1010
|
+
"name": "punctuation.delimiter.comma.regexp"
|
1011
|
+
},
|
1012
|
+
"4": {
|
1013
|
+
"name": "keyword.operator.quantifier.max.regexp"
|
1014
|
+
},
|
1015
|
+
"5": {
|
1016
|
+
"name": "punctuation.delimiter.comma.regexp"
|
1017
|
+
},
|
1018
|
+
"6": {
|
1019
|
+
"name": "keyword.operator.quantifier.max.regexp"
|
1020
|
+
},
|
1021
|
+
"7": {
|
1022
|
+
"name": "punctuation.definition.quantifier.bracket.curly.end.regexp"
|
1023
|
+
}
|
1024
|
+
}
|
1025
|
+
}
|
1026
|
+
]
|
1027
|
+
},
|
1028
|
+
"scopedModifiers": {
|
1029
|
+
"patterns": [
|
1030
|
+
{
|
1031
|
+
"match": "(?<=\\?)\\^",
|
1032
|
+
"name": "keyword.operator.modifier.reset.regexp"
|
1033
|
+
},
|
1034
|
+
{
|
1035
|
+
"match": "-",
|
1036
|
+
"name": "keyword.operator.modifier.negate.regexp"
|
1037
|
+
},
|
1038
|
+
{
|
1039
|
+
"match": "[A-Za-z]",
|
1040
|
+
"name": "storage.modifier.flag.$0.regexp"
|
1041
|
+
}
|
1042
|
+
]
|
1043
|
+
},
|
1044
|
+
"variable": {
|
1045
|
+
"patterns": [
|
1046
|
+
{
|
1047
|
+
"name": "variable.other.regexp",
|
1048
|
+
"match": "(?<![^\\\\]\\\\|^\\\\)\\$(?!\\d|-)[-\\w]+",
|
1049
|
+
"captures": {
|
1050
|
+
"1": {
|
1051
|
+
"name": "punctuation.definition.variable.regexp"
|
1052
|
+
}
|
1053
|
+
}
|
1054
|
+
},
|
1055
|
+
{
|
1056
|
+
"name": "variable.other.bracket.regexp",
|
1057
|
+
"match": "(?<![^\\\\]\\\\|^\\\\)(\\$\\{)\\s*(?!\\d|-)[-\\w]+\\s*(\\})",
|
1058
|
+
"captures": {
|
1059
|
+
"1": {
|
1060
|
+
"name": "punctuation.definition.variable.begin.tmcg"
|
1061
|
+
},
|
1062
|
+
"2": {
|
1063
|
+
"name": "punctuation.definition.variable.end.tmcg"
|
1064
|
+
}
|
1065
|
+
}
|
1066
|
+
}
|
1067
|
+
]
|
1068
|
+
}
|
1069
|
+
}
|
1070
|
+
}
|