github-linguist 4.8.9 → 4.8.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/git-linguist +2 -2
- data/grammars/source.ats.json +58 -128
- data/grammars/source.autoit.json +158 -153
- data/grammars/source.awk.json +333 -383
- data/grammars/source.batchfile.json +194 -0
- data/grammars/source.c.platform.json +359 -22
- data/grammars/source.changelogs.rpm-spec.json +99 -0
- data/grammars/source.clojure.json +9 -3
- data/grammars/source.dockerfile.json +67 -78
- data/grammars/source.elm.json +20 -379
- data/grammars/source.emacs.lisp.json +656 -0
- data/grammars/source.gdscript.json +233 -228
- data/grammars/source.graphql.json +75 -10
- data/grammars/source.js.json +2 -2
- data/grammars/source.js.jsx.json +247 -839
- data/grammars/source.js.regexp.json +1 -1
- data/grammars/source.nginx.json +882 -768
- data/grammars/source.nsis.json +151 -143
- data/grammars/source.objc.json +3 -0
- data/grammars/source.objc.platform.json +174 -104
- data/grammars/source.puppet.json +429 -396
- data/grammars/source.pyjade.json +11 -0
- data/grammars/source.regexp.babel.json +1 -1
- data/grammars/source.rpm-spec.json +770 -0
- data/grammars/source.systemverilog.json +1110 -961
- data/grammars/source.ts.json +57 -57
- data/grammars/source.tsx.json +57 -57
- data/grammars/text.dart-analysis-output.json +67 -152
- data/grammars/text.error-list.json +54 -0
- data/grammars/text.find-refs.json +927 -0
- data/grammars/text.html.basic.json +1 -1
- data/grammars/text.html.mediawiki.elm-build-output.json +108 -0
- data/grammars/text.html.mediawiki.elm-documentation.json +22 -0
- data/grammars/text.html.vue.json +35 -0
- data/grammars/text.jade.json +34 -12
- data/grammars/text.roff.json +1 -1
- data/lib/linguist/heuristics.rb +16 -4
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +25 -5
- data/lib/linguist/samples.json +1367 -163
- data/lib/linguist/version.rb +1 -1
- metadata +10 -3
- data/grammars/source.dosbatch.json +0 -70
@@ -0,0 +1,54 @@
|
|
1
|
+
{
|
2
|
+
"name": "Error List",
|
3
|
+
"scopeName": "text.error-list",
|
4
|
+
"uuid": "52410ea6-4de5-4b0e-9be7-12842e39a3a6",
|
5
|
+
"patterns": [
|
6
|
+
{
|
7
|
+
"include": "#error-count"
|
8
|
+
},
|
9
|
+
{
|
10
|
+
"include": "#filename"
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"include": "#message"
|
14
|
+
}
|
15
|
+
],
|
16
|
+
"repository": {
|
17
|
+
"filename": {
|
18
|
+
"match": "^([^ ].*:)$",
|
19
|
+
"captures": {
|
20
|
+
"1": {
|
21
|
+
"name": "entity.name.filename.error-list"
|
22
|
+
}
|
23
|
+
}
|
24
|
+
},
|
25
|
+
"error-count": {
|
26
|
+
"match": "(?<=\\[)(\\d+\\s*errors)(?=\\])",
|
27
|
+
"captures": {
|
28
|
+
"1": {
|
29
|
+
"name": "keyword.other.error-list"
|
30
|
+
}
|
31
|
+
}
|
32
|
+
},
|
33
|
+
"message": {
|
34
|
+
"begin": "\\(",
|
35
|
+
"end": "\\n",
|
36
|
+
"patterns": [
|
37
|
+
{
|
38
|
+
"include": "#location"
|
39
|
+
}
|
40
|
+
]
|
41
|
+
},
|
42
|
+
"location": {
|
43
|
+
"match": "(?<=\\()(\\d+),\\s*(\\d+)(?=\\))",
|
44
|
+
"captures": {
|
45
|
+
"1": {
|
46
|
+
"name": "constant.numeric.location.error-list"
|
47
|
+
},
|
48
|
+
"2": {
|
49
|
+
"name": "constant.numeric.location.error-list"
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
@@ -0,0 +1,927 @@
|
|
1
|
+
{
|
2
|
+
"name": "Find Refs",
|
3
|
+
"scopeName": "text.find-refs",
|
4
|
+
"uuid": "de594c8b-2688-48c1-bc73-b5c935e408b8",
|
5
|
+
"patterns": [
|
6
|
+
{
|
7
|
+
"include": "#filename"
|
8
|
+
},
|
9
|
+
{
|
10
|
+
"include": "#header"
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"include": "#footer"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"include": "#reference"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"include": "#line-with-match"
|
20
|
+
}
|
21
|
+
],
|
22
|
+
"repository": {
|
23
|
+
"filename": {
|
24
|
+
"match": "^([^ ].*:)$",
|
25
|
+
"captures": {
|
26
|
+
"1": {
|
27
|
+
"name": "entity.name.filename.find-refs"
|
28
|
+
}
|
29
|
+
}
|
30
|
+
},
|
31
|
+
"footer": {
|
32
|
+
"name": "text.find-refs",
|
33
|
+
"match": "^[0-9]+ matches in [0-9+] files\\s*$"
|
34
|
+
},
|
35
|
+
"header": {
|
36
|
+
"name": "text.find-refs",
|
37
|
+
"match": "^References to .*$"
|
38
|
+
},
|
39
|
+
"line-with-match": {
|
40
|
+
"begin": "^ +([0-9]+):",
|
41
|
+
"end": "$",
|
42
|
+
"beginCaptures": {
|
43
|
+
"1": {
|
44
|
+
"name": "constant.numeric.line-number.match.find-refs"
|
45
|
+
}
|
46
|
+
},
|
47
|
+
"patterns": [
|
48
|
+
{
|
49
|
+
"include": "#single-line-ts"
|
50
|
+
}
|
51
|
+
]
|
52
|
+
},
|
53
|
+
"single-line-ts": {
|
54
|
+
"name": "meta.ts.find-refs",
|
55
|
+
"patterns": [
|
56
|
+
{
|
57
|
+
"include": "#expression"
|
58
|
+
}
|
59
|
+
]
|
60
|
+
},
|
61
|
+
"var-expr": {
|
62
|
+
"name": "meta.var.expr.ts",
|
63
|
+
"begin": "(?<!\\()\\s*\\b(var|let|const(?!\\s+enum))\\s+([a-zA-Z_$][\\w$]*)",
|
64
|
+
"beginCaptures": {
|
65
|
+
"1": {
|
66
|
+
"name": "storage.type.ts"
|
67
|
+
},
|
68
|
+
"2": {
|
69
|
+
"name": "variable.ts"
|
70
|
+
}
|
71
|
+
},
|
72
|
+
"end": "$|(?=[;=\\}\\{])|(?<=\\})",
|
73
|
+
"patterns": [
|
74
|
+
{
|
75
|
+
"include": "#type-annotation"
|
76
|
+
}
|
77
|
+
]
|
78
|
+
},
|
79
|
+
"control-statement": {
|
80
|
+
"name": "keyword.control.ts",
|
81
|
+
"match": "\\b(break|catch|continue|declare|do|else|finally|for|if|return|switch|throw|try|while)\\b"
|
82
|
+
},
|
83
|
+
"switch-case": {
|
84
|
+
"name": "case.expr.ts",
|
85
|
+
"begin": "\\b(case|default)\\b",
|
86
|
+
"beginCaptures": {
|
87
|
+
"1": {
|
88
|
+
"name": "keyword.control.ts"
|
89
|
+
}
|
90
|
+
},
|
91
|
+
"end": ":",
|
92
|
+
"patterns": [
|
93
|
+
{
|
94
|
+
"include": "#expression"
|
95
|
+
}
|
96
|
+
]
|
97
|
+
},
|
98
|
+
"declaration": {
|
99
|
+
"name": "meta.declaration.ts",
|
100
|
+
"patterns": [
|
101
|
+
{
|
102
|
+
"include": "#function-declaration"
|
103
|
+
},
|
104
|
+
{
|
105
|
+
"include": "#object-declaration"
|
106
|
+
},
|
107
|
+
{
|
108
|
+
"include": "#type-declaration"
|
109
|
+
},
|
110
|
+
{
|
111
|
+
"include": "#enum-declaration"
|
112
|
+
}
|
113
|
+
]
|
114
|
+
},
|
115
|
+
"type-declaration": {
|
116
|
+
"name": "meta.type.declaration.ts",
|
117
|
+
"begin": "\\b(type)\\b\\s+([a-zA-Z_$][\\w$]*)\\s*=\\s*",
|
118
|
+
"beginCaptures": {
|
119
|
+
"1": {
|
120
|
+
"name": "keyword.other.ts"
|
121
|
+
},
|
122
|
+
"2": {
|
123
|
+
"name": "storage.type.ts"
|
124
|
+
}
|
125
|
+
},
|
126
|
+
"end": "$|(?=[,);>]|var|type|function|class|interface)",
|
127
|
+
"patterns": [
|
128
|
+
{
|
129
|
+
"include": "#type"
|
130
|
+
}
|
131
|
+
]
|
132
|
+
},
|
133
|
+
"enum-declaration": {
|
134
|
+
"name": "meta.enum.declaration.ts",
|
135
|
+
"match": "(?:\\b(const)\\s+)?\\b(enum)\\s+([a-zA-Z_$][\\w$]*)",
|
136
|
+
"captures": {
|
137
|
+
"1": {
|
138
|
+
"name": "storage.modifier.ts"
|
139
|
+
},
|
140
|
+
"2": {
|
141
|
+
"name": "storage.type.ts"
|
142
|
+
},
|
143
|
+
"3": {
|
144
|
+
"name": "entity.name.class.ts"
|
145
|
+
}
|
146
|
+
}
|
147
|
+
},
|
148
|
+
"object-declaration": {
|
149
|
+
"name": "meta.declaration.object.ts",
|
150
|
+
"begin": "\\b(?:(export)\\s+)?\\b(class|interface)\\b(?:\\s+([a-zA-Z_$][\\w$]*))",
|
151
|
+
"beginCaptures": {
|
152
|
+
"1": {
|
153
|
+
"name": "storage.modifier.ts"
|
154
|
+
},
|
155
|
+
"2": {
|
156
|
+
"name": "storage.type.ts"
|
157
|
+
},
|
158
|
+
"3": {
|
159
|
+
"name": "entity.name.class.ts"
|
160
|
+
}
|
161
|
+
},
|
162
|
+
"end": "$|(?=\\})",
|
163
|
+
"endCaptures": {
|
164
|
+
"1": {
|
165
|
+
"name": "brace.curly.ts"
|
166
|
+
}
|
167
|
+
},
|
168
|
+
"patterns": [
|
169
|
+
{
|
170
|
+
"include": "#type-parameters"
|
171
|
+
},
|
172
|
+
{
|
173
|
+
"include": "#object-heritage"
|
174
|
+
},
|
175
|
+
{
|
176
|
+
"include": "#object-body"
|
177
|
+
},
|
178
|
+
{
|
179
|
+
"include": "#comment"
|
180
|
+
}
|
181
|
+
]
|
182
|
+
},
|
183
|
+
"object-heritage": {
|
184
|
+
"name": "meta.object.heritage.ts",
|
185
|
+
"match": "(?:\\b(extends|implements)\\b|,)(?:\\s+([a-zA-Z_$][.\\w$]*))",
|
186
|
+
"captures": {
|
187
|
+
"1": {
|
188
|
+
"name": "storage.modifier.ts"
|
189
|
+
},
|
190
|
+
"2": {
|
191
|
+
"name": "storage.type.ts"
|
192
|
+
}
|
193
|
+
}
|
194
|
+
},
|
195
|
+
"object-body": {
|
196
|
+
"name": "meta.object.body.ts",
|
197
|
+
"begin": "\\{",
|
198
|
+
"end": "$|(?=\\})",
|
199
|
+
"patterns": [
|
200
|
+
{
|
201
|
+
"include": "#comment"
|
202
|
+
},
|
203
|
+
{
|
204
|
+
"include": "#field-declaration"
|
205
|
+
},
|
206
|
+
{
|
207
|
+
"include": "#method-declaration"
|
208
|
+
},
|
209
|
+
{
|
210
|
+
"include": "#indexer-declaration"
|
211
|
+
},
|
212
|
+
{
|
213
|
+
"include": "#type-annotation"
|
214
|
+
},
|
215
|
+
{
|
216
|
+
"include": "#variable-initializer"
|
217
|
+
},
|
218
|
+
{
|
219
|
+
"include": "#access-modifier"
|
220
|
+
},
|
221
|
+
{
|
222
|
+
"include": "#static-modifier"
|
223
|
+
},
|
224
|
+
{
|
225
|
+
"include": "#property-accessor"
|
226
|
+
}
|
227
|
+
]
|
228
|
+
},
|
229
|
+
"object-type": {
|
230
|
+
"name": "meta.object.type.ts",
|
231
|
+
"begin": "\\{",
|
232
|
+
"end": "$|\\}",
|
233
|
+
"patterns": [
|
234
|
+
{
|
235
|
+
"include": "#comment"
|
236
|
+
},
|
237
|
+
{
|
238
|
+
"include": "#field-declaration"
|
239
|
+
},
|
240
|
+
{
|
241
|
+
"include": "#method-declaration-no-body"
|
242
|
+
},
|
243
|
+
{
|
244
|
+
"include": "#indexer-declaration"
|
245
|
+
},
|
246
|
+
{
|
247
|
+
"include": "#type-annotation"
|
248
|
+
}
|
249
|
+
]
|
250
|
+
},
|
251
|
+
"field-declaration": {
|
252
|
+
"name": "meta.field.declaration.ts",
|
253
|
+
"match": "\\b([a-zA-Z_$][\\w$]*)\\s*(\\?\\s*)?(?=(=|:))",
|
254
|
+
"captures": {
|
255
|
+
"1": {
|
256
|
+
"name": "variable.ts"
|
257
|
+
},
|
258
|
+
"2": {
|
259
|
+
"name": "keyword.operator.ts"
|
260
|
+
}
|
261
|
+
}
|
262
|
+
},
|
263
|
+
"method-declaration": {
|
264
|
+
"name": "meta.method.declaration.ts",
|
265
|
+
"begin": "\\b(?:(get|set)\\s+)?\\[?([a-zA-Z_$][\\.\\w$]*)\\s*\\]?\\s*(\\??)\\s*(?=\\()",
|
266
|
+
"beginCaptures": {
|
267
|
+
"1": {
|
268
|
+
"name": "storage.type.property.ts"
|
269
|
+
},
|
270
|
+
"2": {
|
271
|
+
"name": "entity.name.function.ts"
|
272
|
+
},
|
273
|
+
"3": {
|
274
|
+
"name": "keyword.operator.ts"
|
275
|
+
}
|
276
|
+
},
|
277
|
+
"end": "$|\\}|[;,]",
|
278
|
+
"patterns": [
|
279
|
+
{
|
280
|
+
"include": "#comment"
|
281
|
+
},
|
282
|
+
{
|
283
|
+
"include": "#function-parameters"
|
284
|
+
},
|
285
|
+
{
|
286
|
+
"include": "#type-annotation"
|
287
|
+
},
|
288
|
+
{
|
289
|
+
"include": "#decl-block"
|
290
|
+
}
|
291
|
+
]
|
292
|
+
},
|
293
|
+
"method-declaration-no-body": {
|
294
|
+
"name": "meta.method.declaration.ts",
|
295
|
+
"begin": "\\b(?:(get|set)\\s+)?\\[?([a-zA-Z_$][\\.\\w$]*)\\s*\\]?\\s*(\\??)\\s*(?=\\()",
|
296
|
+
"beginCaptures": {
|
297
|
+
"1": {
|
298
|
+
"name": "storage.type.property.ts"
|
299
|
+
},
|
300
|
+
"2": {
|
301
|
+
"name": "entity.name.function.ts"
|
302
|
+
},
|
303
|
+
"3": {
|
304
|
+
"name": "keyword.operator.ts"
|
305
|
+
}
|
306
|
+
},
|
307
|
+
"end": "$|(?=\\})|[;,]",
|
308
|
+
"patterns": [
|
309
|
+
{
|
310
|
+
"include": "#comment"
|
311
|
+
},
|
312
|
+
{
|
313
|
+
"include": "#function-parameters"
|
314
|
+
},
|
315
|
+
{
|
316
|
+
"include": "#type-annotation"
|
317
|
+
},
|
318
|
+
{
|
319
|
+
"include": "#decl-block"
|
320
|
+
}
|
321
|
+
]
|
322
|
+
},
|
323
|
+
"indexer-declaration": {
|
324
|
+
"name": "meta.indexer.declaration.ts",
|
325
|
+
"begin": "\\[",
|
326
|
+
"end": "\\]\\s*(\\?\\s*)?|$",
|
327
|
+
"endCaptures": {
|
328
|
+
"1": {
|
329
|
+
"name": "keyword.operator.ts"
|
330
|
+
}
|
331
|
+
},
|
332
|
+
"patterns": [
|
333
|
+
{
|
334
|
+
"include": "#type-annotation"
|
335
|
+
},
|
336
|
+
{
|
337
|
+
"include": "#indexer-parameter"
|
338
|
+
},
|
339
|
+
{
|
340
|
+
"include": "#expression"
|
341
|
+
}
|
342
|
+
]
|
343
|
+
},
|
344
|
+
"indexer-parameter": {
|
345
|
+
"name": "meta.indexer.parameter.ts",
|
346
|
+
"match": "([a-zA-Z_$][\\w$]*)(?=\\:)",
|
347
|
+
"captures": {
|
348
|
+
"1": {
|
349
|
+
"name": "variable.parameter.ts"
|
350
|
+
}
|
351
|
+
}
|
352
|
+
},
|
353
|
+
"function-declaration": {
|
354
|
+
"name": "meta.function.ts",
|
355
|
+
"begin": "\\b(function)\\b(?:\\s+([a-zA-Z_$][\\w$]*))?\\s*",
|
356
|
+
"beginCaptures": {
|
357
|
+
"1": {
|
358
|
+
"name": "storage.type.function.ts"
|
359
|
+
},
|
360
|
+
"2": {
|
361
|
+
"name": "entity.name.function.ts"
|
362
|
+
}
|
363
|
+
},
|
364
|
+
"end": "$|(?=\\}|;)",
|
365
|
+
"patterns": [
|
366
|
+
{
|
367
|
+
"include": "#comment"
|
368
|
+
},
|
369
|
+
{
|
370
|
+
"include": "#type-parameters"
|
371
|
+
},
|
372
|
+
{
|
373
|
+
"include": "#function-parameters"
|
374
|
+
},
|
375
|
+
{
|
376
|
+
"include": "#return-type"
|
377
|
+
},
|
378
|
+
{
|
379
|
+
"include": "#decl-block"
|
380
|
+
}
|
381
|
+
]
|
382
|
+
},
|
383
|
+
"block": {
|
384
|
+
"name": "meta.block.ts",
|
385
|
+
"begin": "\\{",
|
386
|
+
"end": "$|\\}",
|
387
|
+
"patterns": [
|
388
|
+
{
|
389
|
+
"include": "#expression"
|
390
|
+
},
|
391
|
+
{
|
392
|
+
"include": "#object-member"
|
393
|
+
}
|
394
|
+
]
|
395
|
+
},
|
396
|
+
"decl-block": {
|
397
|
+
"name": "meta.decl.block.ts",
|
398
|
+
"begin": "\\{",
|
399
|
+
"end": "$|(?=\\})",
|
400
|
+
"patterns": [
|
401
|
+
{
|
402
|
+
"include": "#expression"
|
403
|
+
}
|
404
|
+
]
|
405
|
+
},
|
406
|
+
"function-parameters": {
|
407
|
+
"name": "meta.function-parameters.ts",
|
408
|
+
"begin": "\\(",
|
409
|
+
"end": "$|\\)",
|
410
|
+
"patterns": [
|
411
|
+
{
|
412
|
+
"include": "#comment"
|
413
|
+
},
|
414
|
+
{
|
415
|
+
"include": "#parameter-name"
|
416
|
+
},
|
417
|
+
{
|
418
|
+
"include": "#type-annotation"
|
419
|
+
},
|
420
|
+
{
|
421
|
+
"include": "#variable-initializer"
|
422
|
+
}
|
423
|
+
]
|
424
|
+
},
|
425
|
+
"function-type-parameters": {
|
426
|
+
"name": "meta.function.type.ts",
|
427
|
+
"begin": "\\(",
|
428
|
+
"end": "$|\\)",
|
429
|
+
"patterns": [
|
430
|
+
{
|
431
|
+
"include": "#comment"
|
432
|
+
},
|
433
|
+
{
|
434
|
+
"include": "#parameter-name"
|
435
|
+
},
|
436
|
+
{
|
437
|
+
"include": "#type-annotation"
|
438
|
+
},
|
439
|
+
{
|
440
|
+
"include": "#variable-initializer"
|
441
|
+
}
|
442
|
+
]
|
443
|
+
},
|
444
|
+
"parameter-name": {
|
445
|
+
"name": "parameter.name.ts",
|
446
|
+
"match": "(?:\\s*\\b(public|private)\\b\\s+)?(\\.\\.\\.)?\\s*([a-zA-Z_$][\\w$]*)\\s*(\\??)",
|
447
|
+
"captures": {
|
448
|
+
"1": {
|
449
|
+
"name": "storage.modifier.ts"
|
450
|
+
},
|
451
|
+
"2": {
|
452
|
+
"name": "keyword.operator.ts"
|
453
|
+
},
|
454
|
+
"3": {
|
455
|
+
"name": "variable.parameter.ts"
|
456
|
+
},
|
457
|
+
"4": {
|
458
|
+
"name": "keyword.operator.ts"
|
459
|
+
}
|
460
|
+
}
|
461
|
+
},
|
462
|
+
"return-type": {
|
463
|
+
"name": "meta.return.type.ts",
|
464
|
+
"begin": "(?<=\\)):",
|
465
|
+
"end": "$|(?=\\{|;|//)",
|
466
|
+
"patterns": [
|
467
|
+
{
|
468
|
+
"include": "#type"
|
469
|
+
}
|
470
|
+
]
|
471
|
+
},
|
472
|
+
"type-annotation": {
|
473
|
+
"name": "meta.type.annotation.ts",
|
474
|
+
"begin": ":",
|
475
|
+
"end": "(?=[,);}\\[\\]])|(?==[^>])|(?<=[a-z]|>)\\s*(?=\\{|$|//)",
|
476
|
+
"patterns": [
|
477
|
+
{
|
478
|
+
"include": "#type"
|
479
|
+
},
|
480
|
+
{
|
481
|
+
"include": "#comment"
|
482
|
+
}
|
483
|
+
]
|
484
|
+
},
|
485
|
+
"type": {
|
486
|
+
"name": "meta.type.ts",
|
487
|
+
"patterns": [
|
488
|
+
{
|
489
|
+
"include": "#type-name"
|
490
|
+
},
|
491
|
+
{
|
492
|
+
"include": "#type-parameters"
|
493
|
+
},
|
494
|
+
{
|
495
|
+
"include": "#type-union"
|
496
|
+
},
|
497
|
+
{
|
498
|
+
"include": "#object-type"
|
499
|
+
},
|
500
|
+
{
|
501
|
+
"include": "#function-type-parameters"
|
502
|
+
},
|
503
|
+
{
|
504
|
+
"include": "#function-type-return-type"
|
505
|
+
}
|
506
|
+
]
|
507
|
+
},
|
508
|
+
"function-type-return-type": {
|
509
|
+
"name": "meta.function.type.return.ts",
|
510
|
+
"begin": "=>",
|
511
|
+
"end": "$|(?=[,\\){]|//)",
|
512
|
+
"patterns": [
|
513
|
+
{
|
514
|
+
"include": "#type"
|
515
|
+
}
|
516
|
+
]
|
517
|
+
},
|
518
|
+
"type-union": {
|
519
|
+
"name": "meta.type.union.ts",
|
520
|
+
"begin": "(\\|)",
|
521
|
+
"beginCaptures": {
|
522
|
+
"1": {
|
523
|
+
"name": "keyword.operator.ts"
|
524
|
+
}
|
525
|
+
},
|
526
|
+
"end": "$|([a-zA-Z_$][.\\w$]*)",
|
527
|
+
"endCaptures": {
|
528
|
+
"1": {
|
529
|
+
"name": "storage.type.ts"
|
530
|
+
}
|
531
|
+
},
|
532
|
+
"patterns": [
|
533
|
+
{
|
534
|
+
"include": "#comment"
|
535
|
+
}
|
536
|
+
]
|
537
|
+
},
|
538
|
+
"type-name": {
|
539
|
+
"name": "storage.type.ts",
|
540
|
+
"match": "[a-zA-Z_$][.\\w$]*"
|
541
|
+
},
|
542
|
+
"type-parameters": {
|
543
|
+
"name": "meta.type.parameters.ts",
|
544
|
+
"begin": "<",
|
545
|
+
"end": "$|(?=var|type|function|class|interface)|>",
|
546
|
+
"patterns": [
|
547
|
+
{
|
548
|
+
"name": "keyword.other.ts",
|
549
|
+
"match": "\\b(extends)\\b"
|
550
|
+
},
|
551
|
+
{
|
552
|
+
"include": "#comment"
|
553
|
+
},
|
554
|
+
{
|
555
|
+
"include": "#type"
|
556
|
+
}
|
557
|
+
]
|
558
|
+
},
|
559
|
+
"variable-initializer": {
|
560
|
+
"begin": "(=)",
|
561
|
+
"beginCaptures": {
|
562
|
+
"1": {
|
563
|
+
"name": "keyword.operator.ts"
|
564
|
+
}
|
565
|
+
},
|
566
|
+
"end": "$|(?=[,);=])",
|
567
|
+
"patterns": [
|
568
|
+
{
|
569
|
+
"include": "#expression"
|
570
|
+
}
|
571
|
+
]
|
572
|
+
},
|
573
|
+
"expression": {
|
574
|
+
"name": "meta.expression.ts",
|
575
|
+
"patterns": [
|
576
|
+
{
|
577
|
+
"include": "#string"
|
578
|
+
},
|
579
|
+
{
|
580
|
+
"include": "#regex"
|
581
|
+
},
|
582
|
+
{
|
583
|
+
"include": "#template"
|
584
|
+
},
|
585
|
+
{
|
586
|
+
"include": "#comment"
|
587
|
+
},
|
588
|
+
{
|
589
|
+
"include": "#literal"
|
590
|
+
},
|
591
|
+
{
|
592
|
+
"include": "#paren-expression"
|
593
|
+
},
|
594
|
+
{
|
595
|
+
"include": "#var-expr"
|
596
|
+
},
|
597
|
+
{
|
598
|
+
"include": "#declaration"
|
599
|
+
},
|
600
|
+
{
|
601
|
+
"include": "#cast"
|
602
|
+
},
|
603
|
+
{
|
604
|
+
"include": "#new-expr"
|
605
|
+
},
|
606
|
+
{
|
607
|
+
"include": "#block"
|
608
|
+
},
|
609
|
+
{
|
610
|
+
"include": "#expression-operator"
|
611
|
+
},
|
612
|
+
{
|
613
|
+
"include": "#relational-operator"
|
614
|
+
},
|
615
|
+
{
|
616
|
+
"include": "#arithmetic-operator"
|
617
|
+
},
|
618
|
+
{
|
619
|
+
"include": "#logic-operator"
|
620
|
+
},
|
621
|
+
{
|
622
|
+
"include": "#assignment-operator"
|
623
|
+
},
|
624
|
+
{
|
625
|
+
"include": "#storage-keyword"
|
626
|
+
},
|
627
|
+
{
|
628
|
+
"include": "#control-statement"
|
629
|
+
},
|
630
|
+
{
|
631
|
+
"include": "#switch-case"
|
632
|
+
},
|
633
|
+
{
|
634
|
+
"include": "#for-in-simple"
|
635
|
+
}
|
636
|
+
]
|
637
|
+
},
|
638
|
+
"for-in-simple": {
|
639
|
+
"name": "forin.expr.ts",
|
640
|
+
"match": "(?<=\\()\\s*\\b(var|let)\\s+([a-zA-Z_$][\\w$]*)\\s+(in)\\b",
|
641
|
+
"captures": {
|
642
|
+
"1": {
|
643
|
+
"name": "storage.type.ts"
|
644
|
+
},
|
645
|
+
"3": {
|
646
|
+
"name": "keyword.operator.ts"
|
647
|
+
}
|
648
|
+
}
|
649
|
+
},
|
650
|
+
"cast": {
|
651
|
+
"name": "cast.expr.ts",
|
652
|
+
"match": "<\\s*([a-zA-Z_$][.\\w$]*)\\s*(?:<([a-zA-Z_$][.\\w$]*)>)?\\s*(\\[\\])*\\s*>",
|
653
|
+
"captures": {
|
654
|
+
"1": {
|
655
|
+
"name": "storage.type.ts"
|
656
|
+
},
|
657
|
+
"2": {
|
658
|
+
"name": "storage.type.ts"
|
659
|
+
}
|
660
|
+
}
|
661
|
+
},
|
662
|
+
"new-expr": {
|
663
|
+
"name": "new.expr.ts",
|
664
|
+
"match": "\\b(new)\\b\\s*([a-zA-Z_$][.\\w$]*)",
|
665
|
+
"captures": {
|
666
|
+
"1": {
|
667
|
+
"name": "keyword.operator.ts"
|
668
|
+
},
|
669
|
+
"2": {
|
670
|
+
"name": "storage.type.ts"
|
671
|
+
}
|
672
|
+
}
|
673
|
+
},
|
674
|
+
"object-member": {
|
675
|
+
"name": "meta.object.member.ts",
|
676
|
+
"begin": "[a-zA-Z_$][\\w$]*\\s*:",
|
677
|
+
"end": "$|(?=,|\\})",
|
678
|
+
"patterns": [
|
679
|
+
{
|
680
|
+
"include": "#expression"
|
681
|
+
}
|
682
|
+
]
|
683
|
+
},
|
684
|
+
"expression-operator": {
|
685
|
+
"name": "keyword.operator.ts",
|
686
|
+
"match": "=>|\\b(delete|export|import|in|instanceof|module|new|typeof|void)\\b"
|
687
|
+
},
|
688
|
+
"arithmetic-operator": {
|
689
|
+
"name": "keyword.operator.ts",
|
690
|
+
"match": "\\*|/|\\-\\-|\\-|\\+\\+|\\+|%"
|
691
|
+
},
|
692
|
+
"relational-operator": {
|
693
|
+
"name": "keyword.operator.ts",
|
694
|
+
"match": "===|==|=|!=|!==|<=|>=|<>|<|>"
|
695
|
+
},
|
696
|
+
"assignment-operator": {
|
697
|
+
"name": "keyword.operator.ts",
|
698
|
+
"match": "<<=|>>=|>>>=|\\*=|(?<!\\()/=|%=|\\+=|\\-=|&=|\\^="
|
699
|
+
},
|
700
|
+
"logic-operator": {
|
701
|
+
"name": "keyword.operator.ts",
|
702
|
+
"match": "\\!|&|~|\\||&&|\\|\\|"
|
703
|
+
},
|
704
|
+
"storage-keyword": {
|
705
|
+
"name": "storage.type.ts",
|
706
|
+
"match": "\\b(number|boolean|string)\\b"
|
707
|
+
},
|
708
|
+
"paren-expression": {
|
709
|
+
"begin": "\\(",
|
710
|
+
"beginCaptures": {
|
711
|
+
"0": {
|
712
|
+
"name": "brace.paren.ts"
|
713
|
+
}
|
714
|
+
},
|
715
|
+
"end": "$|\\)",
|
716
|
+
"endCaptures": {
|
717
|
+
"0": {
|
718
|
+
"name": "brace.paren.ts"
|
719
|
+
}
|
720
|
+
},
|
721
|
+
"patterns": [
|
722
|
+
{
|
723
|
+
"include": "#expression"
|
724
|
+
}
|
725
|
+
]
|
726
|
+
},
|
727
|
+
"qstring-double": {
|
728
|
+
"name": "string.double.ts",
|
729
|
+
"begin": "\"",
|
730
|
+
"end": "\"|(?=$)",
|
731
|
+
"patterns": [
|
732
|
+
{
|
733
|
+
"include": "#string-character-escape"
|
734
|
+
}
|
735
|
+
]
|
736
|
+
},
|
737
|
+
"qstring-single": {
|
738
|
+
"name": "string.single.ts",
|
739
|
+
"begin": "'",
|
740
|
+
"end": "'|(?=$)",
|
741
|
+
"patterns": [
|
742
|
+
{
|
743
|
+
"include": "#string-character-escape"
|
744
|
+
}
|
745
|
+
]
|
746
|
+
},
|
747
|
+
"regex": {
|
748
|
+
"name": "string.regex.ts",
|
749
|
+
"begin": "(?<=[=(:,\\[]|^|return|&&|\\|\\||!)\\s*(/)(?![/*+{}?])",
|
750
|
+
"end": "$|(/)[igm]*",
|
751
|
+
"patterns": [
|
752
|
+
{
|
753
|
+
"name": "constant.character.escape.ts",
|
754
|
+
"match": "\\\\."
|
755
|
+
},
|
756
|
+
{
|
757
|
+
"name": "constant.character.class.ts",
|
758
|
+
"match": "\\[(\\\\\\]|[^\\]])*\\]"
|
759
|
+
}
|
760
|
+
]
|
761
|
+
},
|
762
|
+
"string": {
|
763
|
+
"name": "string.ts",
|
764
|
+
"patterns": [
|
765
|
+
{
|
766
|
+
"include": "#qstring-single"
|
767
|
+
},
|
768
|
+
{
|
769
|
+
"include": "#qstring-double"
|
770
|
+
}
|
771
|
+
]
|
772
|
+
},
|
773
|
+
"template": {
|
774
|
+
"name": "meta.template.ts",
|
775
|
+
"begin": "`",
|
776
|
+
"beginCaptures": {
|
777
|
+
"0": {
|
778
|
+
"name": "string.template.ts"
|
779
|
+
}
|
780
|
+
},
|
781
|
+
"end": "$|`",
|
782
|
+
"endCaptures": {
|
783
|
+
"0": {
|
784
|
+
"name": "string.template.ts"
|
785
|
+
}
|
786
|
+
},
|
787
|
+
"patterns": [
|
788
|
+
{
|
789
|
+
"include": "#template-substitution-element"
|
790
|
+
},
|
791
|
+
{
|
792
|
+
"include": "#template-string-contents"
|
793
|
+
}
|
794
|
+
]
|
795
|
+
},
|
796
|
+
"template-string-contents": {
|
797
|
+
"name": "string.template.ts",
|
798
|
+
"begin": ".*?",
|
799
|
+
"end": "$|(?=(\\$\\{|`))",
|
800
|
+
"patterns": [
|
801
|
+
{
|
802
|
+
"include": "#string-character-escape"
|
803
|
+
}
|
804
|
+
]
|
805
|
+
},
|
806
|
+
"string-character-escape": {
|
807
|
+
"name": "constant.character.escape",
|
808
|
+
"match": "\\\\(x\\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
|
809
|
+
},
|
810
|
+
"template-substitution-element": {
|
811
|
+
"name": "template.element.ts",
|
812
|
+
"begin": "\\$\\{",
|
813
|
+
"beginCaptures": {
|
814
|
+
"0": {
|
815
|
+
"name": "keyword.operator.ts"
|
816
|
+
}
|
817
|
+
},
|
818
|
+
"end": "$|\\}",
|
819
|
+
"endCaptures": {
|
820
|
+
"0": {
|
821
|
+
"name": "keyword.operator.ts"
|
822
|
+
}
|
823
|
+
},
|
824
|
+
"patterns": [
|
825
|
+
{
|
826
|
+
"include": "#expression"
|
827
|
+
}
|
828
|
+
]
|
829
|
+
},
|
830
|
+
"comment": {
|
831
|
+
"name": "comment.ts",
|
832
|
+
"patterns": [
|
833
|
+
{
|
834
|
+
"include": "#comment-block-doc"
|
835
|
+
},
|
836
|
+
{
|
837
|
+
"include": "#comment-block"
|
838
|
+
},
|
839
|
+
{
|
840
|
+
"include": "#comment-line"
|
841
|
+
}
|
842
|
+
]
|
843
|
+
},
|
844
|
+
"comment-block-doc": {
|
845
|
+
"name": "comment.block.documentation.ts",
|
846
|
+
"begin": "/\\*\\*(?!/)",
|
847
|
+
"end": "$|\\*/"
|
848
|
+
},
|
849
|
+
"comment-block": {
|
850
|
+
"name": "comment.block.ts",
|
851
|
+
"begin": "/\\*",
|
852
|
+
"end": "$|\\*/"
|
853
|
+
},
|
854
|
+
"comment-line": {
|
855
|
+
"name": "comment.line.ts",
|
856
|
+
"match": "(//).*$\\n?"
|
857
|
+
},
|
858
|
+
"literal": {
|
859
|
+
"name": "literal.ts",
|
860
|
+
"patterns": [
|
861
|
+
{
|
862
|
+
"include": "#numeric-literal"
|
863
|
+
},
|
864
|
+
{
|
865
|
+
"include": "#boolean-literal"
|
866
|
+
},
|
867
|
+
{
|
868
|
+
"include": "#null-literal"
|
869
|
+
},
|
870
|
+
{
|
871
|
+
"include": "#undefined-literal"
|
872
|
+
},
|
873
|
+
{
|
874
|
+
"include": "#array-literal"
|
875
|
+
}
|
876
|
+
]
|
877
|
+
},
|
878
|
+
"array-literal": {
|
879
|
+
"name": "meta.array.literal.ts",
|
880
|
+
"begin": "\\[",
|
881
|
+
"beginCaptures": {
|
882
|
+
"0": {
|
883
|
+
"name": "brace.square.ts"
|
884
|
+
}
|
885
|
+
},
|
886
|
+
"end": "$|\\]",
|
887
|
+
"endCaptures": {
|
888
|
+
"0": {
|
889
|
+
"name": "brace.square.ts"
|
890
|
+
}
|
891
|
+
},
|
892
|
+
"patterns": [
|
893
|
+
{
|
894
|
+
"include": "#expression"
|
895
|
+
}
|
896
|
+
]
|
897
|
+
},
|
898
|
+
"numeric-literal": {
|
899
|
+
"name": "constant.numeric.ts",
|
900
|
+
"match": "\\b((0(x|X)[0-9a-fA-F]+)|([0-9]+(\\.[0-9]+)?))\\b"
|
901
|
+
},
|
902
|
+
"boolean-literal": {
|
903
|
+
"name": "constant.language.boolean.ts",
|
904
|
+
"match": "\\b(false|true)\\b"
|
905
|
+
},
|
906
|
+
"null-literal": {
|
907
|
+
"name": "constant.language.null.ts",
|
908
|
+
"match": "\\b(null)\\b"
|
909
|
+
},
|
910
|
+
"undefined-literal": {
|
911
|
+
"name": "constant.language.ts",
|
912
|
+
"match": "\\b(undefined)\\b"
|
913
|
+
},
|
914
|
+
"access-modifier": {
|
915
|
+
"name": "storage.modifier.ts",
|
916
|
+
"match": "\\b(public|protected|private)\\b"
|
917
|
+
},
|
918
|
+
"static-modifier": {
|
919
|
+
"name": "keyword.other.ts",
|
920
|
+
"match": "\\b(static)\\b"
|
921
|
+
},
|
922
|
+
"property-accessor": {
|
923
|
+
"name": "storage.type.property.ts",
|
924
|
+
"match": "\\b(get|set)\\b"
|
925
|
+
}
|
926
|
+
}
|
927
|
+
}
|