github-linguist 4.8.15 → 4.8.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/hint.haskell.json +206 -58
- data/grammars/hint.message.haskell.json +206 -58
- data/grammars/hint.type.haskell.json +206 -58
- data/grammars/source.actionscript.3.json +20 -22
- data/grammars/source.bsl.json +41 -9
- data/grammars/source.c++.json +2 -2
- data/grammars/source.clojure.json +3 -2
- data/grammars/source.coffee.json +32 -50
- data/grammars/source.crystal.json +21 -9
- data/grammars/source.cs.json +6 -0
- data/grammars/source.css.less.json +11 -11
- data/grammars/source.elixir.json +3 -3
- data/grammars/source.emacs.lisp.json +105 -11
- data/grammars/source.gfm.json +147 -0
- data/grammars/source.haskell.json +202 -147
- data/grammars/source.js.embedded.html.json +10 -0
- data/grammars/source.js.json +73 -26
- data/grammars/source.lean.json +8 -4
- data/grammars/source.litcoffee.json +1 -0
- data/grammars/source.mql5.json +214 -0
- data/grammars/source.objc.json +1 -1
- data/grammars/source.pic.json +67 -22
- data/grammars/source.python.json +6 -6
- data/grammars/source.sdbl.json +1 -1
- data/grammars/source.shell.json +1 -1
- data/grammars/source.sqf.json +5 -1
- data/grammars/source.swift.json +2564 -707
- data/grammars/source.ts.json +2581 -702
- data/grammars/source.tsx.json +2779 -841
- data/grammars/source.yaml.json +2 -2
- data/grammars/text.html.asdoc.json +0 -2
- data/grammars/text.html.handlebars.json +1 -1
- data/grammars/text.restructuredtext.json +37 -8
- data/grammars/text.roff.json +9 -1
- data/grammars/text.shell-session.json +1 -1
- data/grammars/text.tex.latex.haskell.json +207 -152
- data/grammars/text.xml.flex-config.json +0 -2
- data/lib/linguist/heuristics.rb +2 -2
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +85 -32
- data/lib/linguist/samples.json +2046 -114
- data/lib/linguist/vendor.yml +6 -0
- data/lib/linguist/version.rb +1 -1
- metadata +7 -5
data/grammars/source.ts.json
CHANGED
@@ -1,202 +1,303 @@
|
|
1
1
|
{
|
2
|
+
"name": "TypeScript",
|
3
|
+
"scopeName": "source.ts",
|
2
4
|
"fileTypes": [
|
3
5
|
"ts"
|
4
6
|
],
|
5
|
-
"
|
7
|
+
"uuid": "ef98eb90-bf9b-11e4-bb52-0800200c9a66",
|
6
8
|
"patterns": [
|
7
9
|
{
|
8
|
-
"include": "#
|
10
|
+
"include": "#statements"
|
9
11
|
}
|
10
12
|
],
|
11
13
|
"repository": {
|
12
|
-
"
|
13
|
-
"match": "\\b(public|protected|private)\\b",
|
14
|
-
"name": "storage.modifier.ts"
|
15
|
-
},
|
16
|
-
"arithmetic-operator": {
|
17
|
-
"match": "\\*|/|\\-\\-|\\-|\\+\\+|\\+|%",
|
18
|
-
"name": "keyword.operator.arithmetic.ts"
|
19
|
-
},
|
20
|
-
"array-literal": {
|
21
|
-
"begin": "\\[",
|
22
|
-
"beginCaptures": {
|
23
|
-
"0": {
|
24
|
-
"name": "meta.brace.square.ts"
|
25
|
-
}
|
26
|
-
},
|
27
|
-
"end": "\\]",
|
28
|
-
"endCaptures": {
|
29
|
-
"0": {
|
30
|
-
"name": "meta.brace.square.ts"
|
31
|
-
}
|
32
|
-
},
|
33
|
-
"name": "meta.array.literal.ts",
|
14
|
+
"statements": {
|
34
15
|
"patterns": [
|
16
|
+
{
|
17
|
+
"include": "#string"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"include": "#regex"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"include": "#template"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"include": "#comment"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"include": "#literal"
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"include": "#declaration"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"include": "#switch-statement"
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"include": "#for-loop"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"include": "#after-operator-block"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"include": "#decl-block"
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"include": "#control-statement"
|
48
|
+
},
|
35
49
|
{
|
36
50
|
"include": "#expression"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"include": "#punctuation-semicolon"
|
37
54
|
}
|
38
55
|
]
|
39
56
|
},
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
43
|
-
},
|
44
|
-
"await-modifier": {
|
45
|
-
"match": "\\bawait\\b",
|
46
|
-
"name": "storage.modifier.ts"
|
47
|
-
},
|
48
|
-
"block": {
|
49
|
-
"begin": "\\{",
|
57
|
+
"var-expr": {
|
58
|
+
"name": "meta.var.expr.ts",
|
59
|
+
"begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(var|let|const(?!\\s+enum\\b))\\b(?!\\$)",
|
50
60
|
"beginCaptures": {
|
51
|
-
"
|
52
|
-
"name": "
|
53
|
-
}
|
54
|
-
|
55
|
-
|
56
|
-
"endCaptures": {
|
57
|
-
"0": {
|
58
|
-
"name": "meta.brace.curly.ts"
|
61
|
+
"1": {
|
62
|
+
"name": "keyword.control.export.ts"
|
63
|
+
},
|
64
|
+
"2": {
|
65
|
+
"name": "storage.type.ts"
|
59
66
|
}
|
60
67
|
},
|
61
|
-
"
|
68
|
+
"end": "(?=$|;|}|(\\s+(of|in)\\s+))",
|
62
69
|
"patterns": [
|
63
70
|
{
|
64
|
-
"include": "#
|
71
|
+
"include": "#destructuring-variable"
|
65
72
|
},
|
66
73
|
{
|
67
|
-
"include": "#
|
74
|
+
"include": "#var-single-variable"
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"include": "#variable-initializer"
|
78
|
+
},
|
79
|
+
{
|
80
|
+
"include": "#comment"
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"include": "#punctuation-comma"
|
68
84
|
}
|
69
85
|
]
|
70
86
|
},
|
71
|
-
"
|
72
|
-
"
|
73
|
-
"
|
74
|
-
},
|
75
|
-
"case-clause": {
|
76
|
-
"begin": "(?<!\\.)\\b(case|default(?=:))\\b",
|
87
|
+
"var-single-variable": {
|
88
|
+
"name": "meta.var-single-variable.expr.ts",
|
89
|
+
"begin": "([_$[:alpha:]][_$[:alnum:]]*)",
|
77
90
|
"beginCaptures": {
|
78
91
|
"1": {
|
79
|
-
"name": "
|
92
|
+
"name": "meta.definition.variable.ts variable.other.readwrite.ts"
|
80
93
|
}
|
81
94
|
},
|
82
|
-
"end": "
|
83
|
-
"name": "case-clause.expr.ts",
|
95
|
+
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
84
96
|
"patterns": [
|
85
97
|
{
|
86
|
-
"include": "#
|
98
|
+
"include": "#type-annotation"
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"include": "#string"
|
102
|
+
},
|
103
|
+
{
|
104
|
+
"include": "#comment"
|
87
105
|
}
|
88
106
|
]
|
89
107
|
},
|
90
|
-
"
|
91
|
-
"begin": "(?:(?<=return|throw|yield|await|[=(,:>]))\\s*(<)(?!<?\\=)",
|
92
|
-
"beginCaptures": {
|
93
|
-
"1": {
|
94
|
-
"name": "meta.brace.angle.ts"
|
95
|
-
}
|
96
|
-
},
|
97
|
-
"end": ">",
|
98
|
-
"endCaptures": {
|
99
|
-
"0": {
|
100
|
-
"name": "meta.brace.angle.ts"
|
101
|
-
}
|
102
|
-
},
|
103
|
-
"name": "cast.expr.ts",
|
108
|
+
"destructuring-variable": {
|
104
109
|
"patterns": [
|
105
110
|
{
|
106
|
-
"
|
111
|
+
"name": "meta.object-binding-pattern-variable.ts",
|
112
|
+
"begin": "(?<!=|:|of|in)\\s*(?=\\{)",
|
113
|
+
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
114
|
+
"patterns": [
|
115
|
+
{
|
116
|
+
"include": "#object-binding-pattern"
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"include": "#type-annotation"
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"include": "#comment"
|
123
|
+
}
|
124
|
+
]
|
125
|
+
},
|
126
|
+
{
|
127
|
+
"name": "meta.array-binding-pattern-variable.ts",
|
128
|
+
"begin": "(?<!=|:|of|in)\\s*(?=\\[)",
|
129
|
+
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
130
|
+
"patterns": [
|
131
|
+
{
|
132
|
+
"include": "#array-binding-pattern"
|
133
|
+
},
|
134
|
+
{
|
135
|
+
"include": "#type-annotation"
|
136
|
+
},
|
137
|
+
{
|
138
|
+
"include": "#comment"
|
139
|
+
}
|
140
|
+
]
|
107
141
|
}
|
108
142
|
]
|
109
143
|
},
|
110
|
-
"
|
111
|
-
"name": "comment.ts",
|
144
|
+
"object-binding-element": {
|
112
145
|
"patterns": [
|
113
146
|
{
|
114
|
-
"include": "#comment
|
147
|
+
"include": "#comment"
|
148
|
+
},
|
149
|
+
{
|
150
|
+
"begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
|
151
|
+
"beginCaptures": {
|
152
|
+
"1": {
|
153
|
+
"name": "variable.object.property.ts"
|
154
|
+
},
|
155
|
+
"2": {
|
156
|
+
"name": "punctuation.destructuring.ts"
|
157
|
+
}
|
158
|
+
},
|
159
|
+
"end": "(?=,|\\})",
|
160
|
+
"patterns": [
|
161
|
+
{
|
162
|
+
"include": "#object-binding-pattern"
|
163
|
+
},
|
164
|
+
{
|
165
|
+
"include": "#array-binding-pattern"
|
166
|
+
},
|
167
|
+
{
|
168
|
+
"name": "meta.definition.variable.ts variable.other.readwrite.ts",
|
169
|
+
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
|
170
|
+
},
|
171
|
+
{
|
172
|
+
"include": "#variable-initializer"
|
173
|
+
}
|
174
|
+
]
|
115
175
|
},
|
116
176
|
{
|
117
|
-
"include": "#
|
177
|
+
"include": "#object-binding-pattern"
|
118
178
|
},
|
119
179
|
{
|
120
|
-
"include": "#
|
180
|
+
"include": "#destructuring-variable-rest"
|
181
|
+
},
|
182
|
+
{
|
183
|
+
"include": "#variable-initializer"
|
184
|
+
},
|
185
|
+
{
|
186
|
+
"include": "#punctuation-comma"
|
121
187
|
}
|
122
188
|
]
|
123
189
|
},
|
124
|
-
"
|
125
|
-
"
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
190
|
+
"array-binding-element": {
|
191
|
+
"patterns": [
|
192
|
+
{
|
193
|
+
"include": "#comment"
|
194
|
+
},
|
195
|
+
{
|
196
|
+
"include": "#object-binding-pattern"
|
197
|
+
},
|
198
|
+
{
|
199
|
+
"include": "#array-binding-pattern"
|
200
|
+
},
|
201
|
+
{
|
202
|
+
"include": "#destructuring-variable-rest"
|
203
|
+
},
|
204
|
+
{
|
205
|
+
"include": "#variable-initializer"
|
206
|
+
},
|
207
|
+
{
|
208
|
+
"include": "#punctuation-comma"
|
209
|
+
}
|
210
|
+
]
|
137
211
|
},
|
138
|
-
"
|
139
|
-
"match": "(
|
140
|
-
"
|
212
|
+
"destructuring-variable-rest": {
|
213
|
+
"match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
|
214
|
+
"captures": {
|
215
|
+
"1": {
|
216
|
+
"name": "keyword.operator.rest.ts"
|
217
|
+
},
|
218
|
+
"2": {
|
219
|
+
"name": "meta.definition.variable.ts variable.other.readwrite.ts"
|
220
|
+
}
|
221
|
+
}
|
141
222
|
},
|
142
|
-
"
|
143
|
-
"begin": "\\{",
|
223
|
+
"object-binding-pattern": {
|
224
|
+
"begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
|
144
225
|
"beginCaptures": {
|
145
|
-
"
|
146
|
-
"name": "
|
226
|
+
"1": {
|
227
|
+
"name": "keyword.operator.rest.ts"
|
228
|
+
},
|
229
|
+
"2": {
|
230
|
+
"name": "punctuation.definition.binding-pattern.object.ts"
|
147
231
|
}
|
148
232
|
},
|
149
233
|
"end": "\\}",
|
150
234
|
"endCaptures": {
|
151
235
|
"0": {
|
152
|
-
"name": "
|
236
|
+
"name": "punctuation.definition.binding-pattern.object.ts"
|
153
237
|
}
|
154
238
|
},
|
155
|
-
"name": "meta.decl.block.ts",
|
156
239
|
"patterns": [
|
157
240
|
{
|
158
|
-
"include": "#
|
241
|
+
"include": "#object-binding-element"
|
159
242
|
}
|
160
243
|
]
|
161
244
|
},
|
162
|
-
"
|
163
|
-
"
|
164
|
-
"
|
165
|
-
{
|
166
|
-
"
|
245
|
+
"array-binding-pattern": {
|
246
|
+
"begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
|
247
|
+
"beginCaptures": {
|
248
|
+
"1": {
|
249
|
+
"name": "keyword.operator.rest.ts"
|
167
250
|
},
|
251
|
+
"2": {
|
252
|
+
"name": "punctuation.definition.binding-pattern.array.ts"
|
253
|
+
}
|
254
|
+
},
|
255
|
+
"end": "\\]",
|
256
|
+
"endCaptures": {
|
257
|
+
"0": {
|
258
|
+
"name": "punctuation.definition.binding-pattern.array.ts"
|
259
|
+
}
|
260
|
+
},
|
261
|
+
"patterns": [
|
168
262
|
{
|
169
|
-
"include": "#
|
170
|
-
}
|
263
|
+
"include": "#array-binding-element"
|
264
|
+
}
|
265
|
+
]
|
266
|
+
},
|
267
|
+
"ternary-expression": {
|
268
|
+
"begin": "(?=\\?)",
|
269
|
+
"end": "(?=$|[;,})\\]])",
|
270
|
+
"patterns": [
|
171
271
|
{
|
172
|
-
"include": "#
|
272
|
+
"include": "#ternary-operator"
|
173
273
|
},
|
174
274
|
{
|
175
|
-
"include": "#
|
275
|
+
"include": "#expression"
|
176
276
|
}
|
177
277
|
]
|
178
278
|
},
|
179
|
-
"
|
180
|
-
"
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
279
|
+
"ternary-operator": {
|
280
|
+
"begin": "(\\?)",
|
281
|
+
"beginCaptures": {
|
282
|
+
"0": {
|
283
|
+
"name": "keyword.operator.ternary.ts"
|
284
|
+
}
|
285
|
+
},
|
286
|
+
"end": "(:)",
|
287
|
+
"endCaptures": {
|
288
|
+
"0": {
|
289
|
+
"name": "keyword.operator.ternary.ts"
|
189
290
|
}
|
190
291
|
},
|
191
|
-
"
|
192
|
-
|
292
|
+
"patterns": [
|
293
|
+
{
|
294
|
+
"include": "#expression"
|
295
|
+
}
|
296
|
+
]
|
193
297
|
},
|
194
298
|
"expression": {
|
195
299
|
"name": "meta.expression.ts",
|
196
300
|
"patterns": [
|
197
|
-
{
|
198
|
-
"include": "#for-in-simple"
|
199
|
-
},
|
200
301
|
{
|
201
302
|
"include": "#string"
|
202
303
|
},
|
@@ -213,442 +314,633 @@
|
|
213
314
|
"include": "#literal"
|
214
315
|
},
|
215
316
|
{
|
216
|
-
"include": "#
|
317
|
+
"include": "#function-declaration"
|
217
318
|
},
|
218
319
|
{
|
219
|
-
"include": "#
|
320
|
+
"include": "#class-or-interface-declaration"
|
220
321
|
},
|
221
322
|
{
|
222
|
-
"include": "#
|
323
|
+
"include": "#arrow-function"
|
223
324
|
},
|
224
325
|
{
|
225
326
|
"include": "#cast"
|
226
327
|
},
|
227
328
|
{
|
228
|
-
"include": "#
|
229
|
-
},
|
230
|
-
{
|
231
|
-
"include": "#switch-statement"
|
329
|
+
"include": "#ternary-expression"
|
232
330
|
},
|
233
331
|
{
|
234
|
-
"include": "#
|
332
|
+
"include": "#new-expr"
|
235
333
|
},
|
236
334
|
{
|
237
|
-
"include": "#
|
335
|
+
"include": "#object-literal"
|
238
336
|
},
|
239
337
|
{
|
240
|
-
"include": "#expression-
|
338
|
+
"include": "#expression-operators"
|
241
339
|
},
|
242
340
|
{
|
243
|
-
"include": "#
|
341
|
+
"include": "#support-objects"
|
244
342
|
},
|
245
343
|
{
|
246
|
-
"include": "#
|
344
|
+
"include": "#function-call"
|
247
345
|
},
|
248
346
|
{
|
249
|
-
"include": "#
|
347
|
+
"include": "#identifiers"
|
250
348
|
},
|
251
349
|
{
|
252
|
-
"include": "#
|
350
|
+
"include": "#paren-expression"
|
253
351
|
},
|
254
352
|
{
|
255
|
-
"include": "#
|
353
|
+
"include": "#punctuation-comma"
|
256
354
|
},
|
257
355
|
{
|
258
|
-
"include": "#
|
259
|
-
}
|
356
|
+
"include": "#punctuation-accessor"
|
357
|
+
}
|
358
|
+
]
|
359
|
+
},
|
360
|
+
"control-statement": {
|
361
|
+
"patterns": [
|
260
362
|
{
|
261
|
-
"
|
363
|
+
"name": "keyword.control.trycatch.ts",
|
364
|
+
"match": "(?<!\\.|\\$)\\b(catch|finally|throw|try)\\b(?!\\$)"
|
262
365
|
},
|
263
366
|
{
|
264
|
-
"
|
367
|
+
"name": "keyword.control.loop.ts",
|
368
|
+
"match": "(?<!\\.|\\$)\\b(break|continue|do|goto|while)\\b(?!\\$)"
|
265
369
|
},
|
266
370
|
{
|
267
|
-
"
|
371
|
+
"name": "keyword.control.flow.ts",
|
372
|
+
"match": "(?<!\\.|\\$)\\b(return)\\b(?!\\$)"
|
268
373
|
},
|
269
374
|
{
|
270
|
-
"
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
"name": "meta.expression.ts",
|
280
|
-
"patterns": [
|
281
|
-
{
|
282
|
-
"include": "#string"
|
375
|
+
"match": "(?<!\\.|\\$)\\b(yield)\\b(?!\\$)(?:\\s*(\\*))?",
|
376
|
+
"captures": {
|
377
|
+
"1": {
|
378
|
+
"name": "keyword.control.flow.ts"
|
379
|
+
},
|
380
|
+
"2": {
|
381
|
+
"name": "keyword.generator.asterisk.ts"
|
382
|
+
}
|
383
|
+
}
|
283
384
|
},
|
284
385
|
{
|
285
|
-
"
|
386
|
+
"name": "keyword.control.switch.ts",
|
387
|
+
"match": "(?<!\\.|\\$)\\b(case|default|switch)\\b(?!\\$)"
|
286
388
|
},
|
287
389
|
{
|
288
|
-
"
|
390
|
+
"name": "keyword.control.conditional.ts",
|
391
|
+
"match": "(?<!\\.|\\$)\\b(else|if)\\b(?!\\$)"
|
289
392
|
},
|
290
393
|
{
|
291
|
-
"
|
394
|
+
"name": "keyword.control.with.ts",
|
395
|
+
"match": "(?<!\\.|\\$)\\b(with)\\b(?!\\$)"
|
292
396
|
},
|
293
397
|
{
|
294
|
-
"
|
398
|
+
"name": "keyword.other.debugger.ts",
|
399
|
+
"match": "(?<!\\.|\\$)\\b(debugger)\\b(?!\\$)"
|
295
400
|
},
|
296
401
|
{
|
297
|
-
"
|
298
|
-
|
402
|
+
"name": "storage.modifier.ts",
|
403
|
+
"match": "(?<!\\.|\\$)\\b(declare)\\b(?!\\$)"
|
404
|
+
}
|
405
|
+
]
|
406
|
+
},
|
407
|
+
"declaration": {
|
408
|
+
"name": "meta.declaration.ts",
|
409
|
+
"patterns": [
|
299
410
|
{
|
300
|
-
"include": "#
|
411
|
+
"include": "#decorator"
|
301
412
|
},
|
302
413
|
{
|
303
|
-
"include": "#
|
414
|
+
"include": "#var-expr"
|
304
415
|
},
|
305
416
|
{
|
306
|
-
"include": "#
|
417
|
+
"include": "#function-declaration"
|
307
418
|
},
|
308
419
|
{
|
309
|
-
"include": "#
|
420
|
+
"include": "#class-or-interface-declaration"
|
310
421
|
},
|
311
422
|
{
|
312
|
-
"include": "#
|
423
|
+
"include": "#type-declaration"
|
313
424
|
},
|
314
425
|
{
|
315
|
-
"include": "#
|
426
|
+
"include": "#enum-declaration"
|
316
427
|
},
|
317
428
|
{
|
318
|
-
"include": "#
|
429
|
+
"include": "#namespace-declaration"
|
319
430
|
},
|
320
431
|
{
|
321
|
-
"include": "#
|
432
|
+
"include": "#import-equals-declaration"
|
322
433
|
},
|
323
434
|
{
|
324
|
-
"include": "#
|
435
|
+
"include": "#import-declaration"
|
325
436
|
},
|
326
437
|
{
|
327
|
-
"include": "#
|
438
|
+
"include": "#export-declaration"
|
328
439
|
}
|
329
440
|
]
|
330
441
|
},
|
331
|
-
"
|
332
|
-
"
|
442
|
+
"decorator": {
|
443
|
+
"name": "meta.decorator.ts",
|
444
|
+
"begin": "(?<!\\.|\\$)\\@",
|
333
445
|
"beginCaptures": {
|
334
|
-
"
|
335
|
-
"name": "
|
336
|
-
},
|
337
|
-
"2": {
|
338
|
-
"name": "keyword.others.ts"
|
446
|
+
"0": {
|
447
|
+
"name": "punctuation.decorator.ts"
|
339
448
|
}
|
340
449
|
},
|
341
|
-
"end": "(?=\\
|
342
|
-
"name": "meta.field.declaration.ts",
|
450
|
+
"end": "(?=\\s)",
|
343
451
|
"patterns": [
|
344
452
|
{
|
345
453
|
"include": "#expression"
|
346
454
|
}
|
347
455
|
]
|
348
456
|
},
|
349
|
-
"
|
350
|
-
"
|
457
|
+
"type-declaration": {
|
458
|
+
"name": "meta.type.declaration.ts",
|
459
|
+
"begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
|
460
|
+
"beginCaptures": {
|
351
461
|
"1": {
|
352
|
-
"name": "
|
462
|
+
"name": "keyword.control.export.ts"
|
463
|
+
},
|
464
|
+
"2": {
|
465
|
+
"name": "storage.type.type.ts"
|
353
466
|
},
|
354
467
|
"3": {
|
355
|
-
"name": "
|
468
|
+
"name": "entity.name.type.ts"
|
356
469
|
}
|
357
470
|
},
|
358
|
-
"
|
359
|
-
"name": "forin.expr.ts"
|
360
|
-
},
|
361
|
-
"function-call": {
|
362
|
-
"name": "functioncall.expr.ts",
|
471
|
+
"end": "(?=[};]|\\bvar\\b|\\blet\\b|\\bconst\\b|\\btype\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\bnamespace\\b|\\bmodule\\b|\\bimport\\b|\\benum\\b|\\bdeclare\\b|\\bexport\\b|\\babstract\\b|\\basync\\b)",
|
363
472
|
"patterns": [
|
364
473
|
{
|
365
|
-
"include": "#
|
474
|
+
"include": "#comment"
|
366
475
|
},
|
367
476
|
{
|
368
477
|
"include": "#type-parameters"
|
369
478
|
},
|
370
479
|
{
|
371
|
-
"include": "#
|
480
|
+
"include": "#type"
|
481
|
+
},
|
482
|
+
{
|
483
|
+
"match": "(=)\\s*",
|
484
|
+
"captures": {
|
485
|
+
"1": {
|
486
|
+
"name": "keyword.operator.assignment.ts"
|
487
|
+
}
|
488
|
+
}
|
372
489
|
}
|
373
490
|
]
|
374
491
|
},
|
375
|
-
"
|
376
|
-
"
|
492
|
+
"enum-declaration": {
|
493
|
+
"name": "meta.enum.declaration.ts",
|
494
|
+
"begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
|
377
495
|
"beginCaptures": {
|
378
496
|
"1": {
|
379
|
-
"name": "
|
497
|
+
"name": "keyword.control.export.ts"
|
380
498
|
},
|
381
499
|
"2": {
|
382
500
|
"name": "storage.modifier.ts"
|
383
501
|
},
|
384
502
|
"3": {
|
385
|
-
"name": "storage.type.
|
503
|
+
"name": "storage.type.enum.ts"
|
386
504
|
},
|
387
505
|
"4": {
|
388
|
-
"name": "entity.name.
|
506
|
+
"name": "entity.name.type.enum.ts"
|
389
507
|
}
|
390
508
|
},
|
391
|
-
"end": "(
|
392
|
-
"name": "meta.function.ts",
|
509
|
+
"end": "(?<=\\})",
|
393
510
|
"patterns": [
|
394
511
|
{
|
395
512
|
"include": "#comment"
|
396
513
|
},
|
397
514
|
{
|
398
|
-
"
|
515
|
+
"begin": "\\{",
|
516
|
+
"beginCaptures": {
|
517
|
+
"0": {
|
518
|
+
"name": "punctuation.definition.block.ts"
|
519
|
+
}
|
520
|
+
},
|
521
|
+
"end": "\\}",
|
522
|
+
"endCaptures": {
|
523
|
+
"0": {
|
524
|
+
"name": "punctuation.definition.block.ts"
|
525
|
+
}
|
526
|
+
},
|
527
|
+
"patterns": [
|
528
|
+
{
|
529
|
+
"include": "#comment"
|
530
|
+
},
|
531
|
+
{
|
532
|
+
"begin": "([_$[:alpha:]][_$[:alnum:]]*)",
|
533
|
+
"beginCaptures": {
|
534
|
+
"0": {
|
535
|
+
"name": "variable.other.enummember.ts"
|
536
|
+
}
|
537
|
+
},
|
538
|
+
"end": "(?=,|\\}|$)",
|
539
|
+
"patterns": [
|
540
|
+
{
|
541
|
+
"include": "#comment"
|
542
|
+
},
|
543
|
+
{
|
544
|
+
"include": "#variable-initializer"
|
545
|
+
}
|
546
|
+
]
|
547
|
+
},
|
548
|
+
{
|
549
|
+
"begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")))",
|
550
|
+
"end": "(?=,|\\}|$)",
|
551
|
+
"patterns": [
|
552
|
+
{
|
553
|
+
"include": "#string"
|
554
|
+
},
|
555
|
+
{
|
556
|
+
"include": "#comment"
|
557
|
+
},
|
558
|
+
{
|
559
|
+
"include": "#variable-initializer"
|
560
|
+
}
|
561
|
+
]
|
562
|
+
},
|
563
|
+
{
|
564
|
+
"include": "#punctuation-comma"
|
565
|
+
}
|
566
|
+
]
|
567
|
+
}
|
568
|
+
]
|
569
|
+
},
|
570
|
+
"namespace-declaration": {
|
571
|
+
"name": "meta.namespace.declaration.ts",
|
572
|
+
"begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(namespace|module)\\s+",
|
573
|
+
"beginCaptures": {
|
574
|
+
"1": {
|
575
|
+
"name": "keyword.control.export.ts"
|
399
576
|
},
|
577
|
+
"2": {
|
578
|
+
"name": "storage.type.namespace.ts"
|
579
|
+
}
|
580
|
+
},
|
581
|
+
"end": "(?=$|\\{)",
|
582
|
+
"patterns": [
|
400
583
|
{
|
401
|
-
"include": "#
|
584
|
+
"include": "#comment"
|
402
585
|
},
|
403
586
|
{
|
404
|
-
"include": "#
|
587
|
+
"include": "#string"
|
405
588
|
},
|
406
589
|
{
|
407
|
-
"
|
590
|
+
"name": "entity.name.type.module.ts",
|
591
|
+
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
|
408
592
|
},
|
409
593
|
{
|
410
|
-
"
|
594
|
+
"name": "punctuation.accessor.ts",
|
595
|
+
"match": "\\."
|
411
596
|
}
|
412
597
|
]
|
413
598
|
},
|
414
|
-
"
|
415
|
-
"
|
599
|
+
"import-equals-declaration": {
|
600
|
+
"patterns": [
|
601
|
+
{
|
602
|
+
"name": "meta.import-equals.external.ts",
|
603
|
+
"begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
|
604
|
+
"beginCaptures": {
|
605
|
+
"1": {
|
606
|
+
"name": "keyword.control.export.ts"
|
607
|
+
},
|
608
|
+
"2": {
|
609
|
+
"name": "keyword.control.import.ts"
|
610
|
+
},
|
611
|
+
"3": {
|
612
|
+
"name": "variable.other.readwrite.alias.ts"
|
613
|
+
},
|
614
|
+
"4": {
|
615
|
+
"name": "keyword.operator.assignment.ts"
|
616
|
+
},
|
617
|
+
"5": {
|
618
|
+
"name": "keyword.control.require.ts"
|
619
|
+
},
|
620
|
+
"6": {
|
621
|
+
"name": "meta.brace.round.ts"
|
622
|
+
}
|
623
|
+
},
|
624
|
+
"end": "\\)",
|
625
|
+
"endCaptures": {
|
626
|
+
"0": {
|
627
|
+
"name": "meta.brace.round.ts"
|
628
|
+
}
|
629
|
+
},
|
630
|
+
"patterns": [
|
631
|
+
{
|
632
|
+
"include": "#comment"
|
633
|
+
},
|
634
|
+
{
|
635
|
+
"include": "#string"
|
636
|
+
}
|
637
|
+
]
|
638
|
+
},
|
639
|
+
{
|
640
|
+
"name": "meta.import-equals.internal.ts",
|
641
|
+
"begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
|
642
|
+
"beginCaptures": {
|
643
|
+
"1": {
|
644
|
+
"name": "keyword.control.export.ts"
|
645
|
+
},
|
646
|
+
"2": {
|
647
|
+
"name": "keyword.control.import.ts"
|
648
|
+
},
|
649
|
+
"3": {
|
650
|
+
"name": "variable.other.readwrite.alias.ts"
|
651
|
+
},
|
652
|
+
"4": {
|
653
|
+
"name": "keyword.operator.assignment.ts"
|
654
|
+
}
|
655
|
+
},
|
656
|
+
"end": "(?=;|$)",
|
657
|
+
"patterns": [
|
658
|
+
{
|
659
|
+
"include": "#comment"
|
660
|
+
},
|
661
|
+
{
|
662
|
+
"match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
|
663
|
+
"captures": {
|
664
|
+
"1": {
|
665
|
+
"name": "entity.name.type.module.ts"
|
666
|
+
},
|
667
|
+
"2": {
|
668
|
+
"name": "punctuation.accessor.ts"
|
669
|
+
}
|
670
|
+
}
|
671
|
+
},
|
672
|
+
{
|
673
|
+
"name": "variable.other.readwrite.ts",
|
674
|
+
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
|
675
|
+
}
|
676
|
+
]
|
677
|
+
}
|
678
|
+
]
|
679
|
+
},
|
680
|
+
"import-declaration": {
|
681
|
+
"name": "meta.import.ts",
|
682
|
+
"begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)(?!(\\s*:)|(\\$))\\b",
|
683
|
+
"beginCaptures": {
|
416
684
|
"1": {
|
417
|
-
"name": "
|
685
|
+
"name": "keyword.control.export.ts"
|
418
686
|
},
|
419
687
|
"2": {
|
420
|
-
"name": "
|
421
|
-
},
|
422
|
-
"3": {
|
423
|
-
"name": "entity.name.function.ts"
|
688
|
+
"name": "keyword.control.import.ts"
|
424
689
|
}
|
425
690
|
},
|
426
|
-
"
|
427
|
-
"
|
428
|
-
|
429
|
-
|
430
|
-
"begin": "\\(",
|
431
|
-
"beginCaptures": {
|
432
|
-
"0": {
|
433
|
-
"name": "meta.brace.round.ts"
|
691
|
+
"end": "(?=;|$)",
|
692
|
+
"patterns": [
|
693
|
+
{
|
694
|
+
"include": "#import-export-declaration"
|
434
695
|
}
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
696
|
+
]
|
697
|
+
},
|
698
|
+
"export-declaration": {
|
699
|
+
"patterns": [
|
700
|
+
{
|
701
|
+
"match": "(?<!\\.|\\$)\\b(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
|
702
|
+
"captures": {
|
703
|
+
"1": {
|
704
|
+
"name": "keyword.control.export.ts"
|
705
|
+
},
|
706
|
+
"2": {
|
707
|
+
"name": "keyword.control.as.ts"
|
708
|
+
},
|
709
|
+
"3": {
|
710
|
+
"name": "storage.type.namespace.ts"
|
711
|
+
},
|
712
|
+
"4": {
|
713
|
+
"name": "entity.name.type.module.ts"
|
714
|
+
}
|
715
|
+
}
|
716
|
+
},
|
717
|
+
{
|
718
|
+
"name": "meta.export.default.ts",
|
719
|
+
"begin": "(?<!\\.|\\$)\\b(export)(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
|
720
|
+
"beginCaptures": {
|
721
|
+
"1": {
|
722
|
+
"name": "keyword.control.export.ts"
|
723
|
+
},
|
724
|
+
"2": {
|
725
|
+
"name": "keyword.operator.assignment.ts"
|
726
|
+
},
|
727
|
+
"3": {
|
728
|
+
"name": "keyword.control.default.ts"
|
729
|
+
}
|
730
|
+
},
|
731
|
+
"end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
|
732
|
+
"patterns": [
|
733
|
+
{
|
734
|
+
"include": "#expression"
|
735
|
+
}
|
736
|
+
]
|
737
|
+
},
|
738
|
+
{
|
739
|
+
"name": "meta.export.ts",
|
740
|
+
"begin": "(?<!\\.|\\$)\\b(export)(?!(\\s*:)|(\\$))\\b",
|
741
|
+
"beginCaptures": {
|
742
|
+
"0": {
|
743
|
+
"name": "keyword.control.export.ts"
|
744
|
+
}
|
745
|
+
},
|
746
|
+
"end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
|
747
|
+
"patterns": [
|
748
|
+
{
|
749
|
+
"include": "#import-export-declaration"
|
750
|
+
}
|
751
|
+
]
|
440
752
|
}
|
441
|
-
|
442
|
-
|
753
|
+
]
|
754
|
+
},
|
755
|
+
"import-export-declaration": {
|
443
756
|
"patterns": [
|
444
757
|
{
|
445
758
|
"include": "#comment"
|
446
759
|
},
|
447
760
|
{
|
448
|
-
"include": "#
|
761
|
+
"include": "#string"
|
449
762
|
},
|
450
763
|
{
|
451
|
-
"include": "#
|
764
|
+
"include": "#import-export-block"
|
452
765
|
},
|
453
766
|
{
|
454
|
-
"
|
767
|
+
"name": "keyword.control.from.ts",
|
768
|
+
"match": "\\bfrom\\b"
|
769
|
+
},
|
770
|
+
{
|
771
|
+
"include": "#import-export-clause"
|
455
772
|
}
|
456
773
|
]
|
457
774
|
},
|
458
|
-
"
|
459
|
-
"
|
460
|
-
"
|
461
|
-
},
|
462
|
-
"import-operator": {
|
463
|
-
"match": "\\b(import|from)\\b",
|
464
|
-
"name": "keyword.control.import.include.ts"
|
465
|
-
},
|
466
|
-
"indexer-declaration": {
|
467
|
-
"begin": "\\[",
|
775
|
+
"import-export-block": {
|
776
|
+
"name": "meta.block.ts",
|
777
|
+
"begin": "\\{",
|
468
778
|
"beginCaptures": {
|
469
779
|
"0": {
|
470
|
-
"name": "
|
780
|
+
"name": "punctuation.definition.block.ts"
|
471
781
|
}
|
472
782
|
},
|
473
|
-
"end": "
|
783
|
+
"end": "\\}",
|
474
784
|
"endCaptures": {
|
475
|
-
"
|
476
|
-
"name": "
|
477
|
-
},
|
478
|
-
"2": {
|
479
|
-
"name": "keyword.others.ts"
|
785
|
+
"0": {
|
786
|
+
"name": "punctuation.definition.block.ts"
|
480
787
|
}
|
481
788
|
},
|
482
|
-
"name": "meta.indexer.declaration.ts",
|
483
789
|
"patterns": [
|
484
790
|
{
|
485
|
-
"include": "#
|
486
|
-
},
|
487
|
-
{
|
488
|
-
"include": "#indexer-parameter"
|
489
|
-
},
|
490
|
-
{
|
491
|
-
"include": "#expression"
|
791
|
+
"include": "#import-export-clause"
|
492
792
|
}
|
493
793
|
]
|
494
794
|
},
|
495
|
-
"
|
496
|
-
"captures": {
|
497
|
-
"1": {
|
498
|
-
"name": "variable.parameter.ts"
|
499
|
-
}
|
500
|
-
},
|
501
|
-
"match": "([a-zA-Z_$][\\w$]*)(?=\\:)",
|
502
|
-
"name": "meta.indexer.parameter.ts"
|
503
|
-
},
|
504
|
-
"literal": {
|
505
|
-
"name": "literal.ts",
|
795
|
+
"import-export-clause": {
|
506
796
|
"patterns": [
|
507
797
|
{
|
508
|
-
"include": "#
|
798
|
+
"include": "#comment"
|
509
799
|
},
|
510
800
|
{
|
511
|
-
"
|
801
|
+
"comment": "(default|*|name) as alias",
|
802
|
+
"match": "(?x) (?: \\b(default)\\b | (\\*) | ([_$[:alpha:]][_$[:alnum:]]*)) \\s+ (as) \\s+ (?: (\\b default \\b | \\*) | ([_$[:alpha:]][_$[:alnum:]]*))",
|
803
|
+
"captures": {
|
804
|
+
"1": {
|
805
|
+
"name": "keyword.control.default.ts"
|
806
|
+
},
|
807
|
+
"2": {
|
808
|
+
"name": "constant.language.import-export-all.ts"
|
809
|
+
},
|
810
|
+
"3": {
|
811
|
+
"name": "variable.other.readwrite.ts"
|
812
|
+
},
|
813
|
+
"4": {
|
814
|
+
"name": "keyword.control.as.ts"
|
815
|
+
},
|
816
|
+
"5": {
|
817
|
+
"name": "invalid.illegal.ts"
|
818
|
+
},
|
819
|
+
"6": {
|
820
|
+
"name": "variable.other.readwrite.alias.ts"
|
821
|
+
}
|
822
|
+
}
|
512
823
|
},
|
513
824
|
{
|
514
|
-
"include": "#
|
825
|
+
"include": "#punctuation-comma"
|
515
826
|
},
|
516
827
|
{
|
517
|
-
"
|
828
|
+
"name": "constant.language.import-export-all.ts",
|
829
|
+
"match": "\\*"
|
518
830
|
},
|
519
831
|
{
|
520
|
-
"
|
832
|
+
"name": "keyword.control.default.ts",
|
833
|
+
"match": "\\b(default)\\b"
|
521
834
|
},
|
522
835
|
{
|
523
|
-
"
|
836
|
+
"name": "variable.other.readwrite.alias.ts",
|
837
|
+
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
|
524
838
|
}
|
525
839
|
]
|
526
840
|
},
|
527
|
-
"
|
528
|
-
"
|
529
|
-
"
|
530
|
-
},
|
531
|
-
"method-declaration": {
|
532
|
-
"begin": "\\b(?:(abstract)\\s+)?\\b(?:(public|private|protected)\\s+)?\\b(?:(async)\\s+)?(?:(get|set)\\s+)?(?:(new)|(?:\\b(constructor)\\b)|(?:([a-zA-Z_$][\\.\\w$]*)\\s*(\\??)))?\\s*(?=\\(|\\<)",
|
841
|
+
"class-or-interface-declaration": {
|
842
|
+
"name": "meta.class.ts",
|
843
|
+
"begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?:(class)|(interface))\\b",
|
533
844
|
"beginCaptures": {
|
534
845
|
"1": {
|
535
|
-
"name": "
|
846
|
+
"name": "keyword.control.export.ts"
|
536
847
|
},
|
537
848
|
"2": {
|
538
849
|
"name": "storage.modifier.ts"
|
539
850
|
},
|
540
851
|
"3": {
|
541
|
-
"name": "storage.
|
852
|
+
"name": "storage.type.class.ts"
|
542
853
|
},
|
543
854
|
"4": {
|
544
|
-
"name": "storage.type.
|
545
|
-
}
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
"
|
550
|
-
"name": "
|
551
|
-
},
|
552
|
-
"7": {
|
553
|
-
"name": "entity.name.function.ts"
|
554
|
-
},
|
555
|
-
"8": {
|
556
|
-
"name": "keyword.operator.ts"
|
855
|
+
"name": "storage.type.interface.ts"
|
856
|
+
}
|
857
|
+
},
|
858
|
+
"end": "(?<=\\})",
|
859
|
+
"endCaptures": {
|
860
|
+
"1": {
|
861
|
+
"name": "punctuation.definition.block.ts"
|
557
862
|
}
|
558
863
|
},
|
559
|
-
"end": "(?=\\}|;|,)|(?<=\\})",
|
560
|
-
"name": "meta.method.declaration.ts",
|
561
864
|
"patterns": [
|
562
865
|
{
|
563
866
|
"include": "#comment"
|
564
867
|
},
|
565
868
|
{
|
566
|
-
"include": "#
|
567
|
-
},
|
568
|
-
{
|
569
|
-
"include": "#function-type-parameters"
|
869
|
+
"include": "#class-or-interface-heritage"
|
570
870
|
},
|
571
871
|
{
|
572
|
-
"
|
872
|
+
"match": "[_$[:alpha:]][_$[:alnum:]]*",
|
873
|
+
"captures": {
|
874
|
+
"0": {
|
875
|
+
"name": "entity.name.type.class.ts"
|
876
|
+
}
|
877
|
+
}
|
573
878
|
},
|
574
879
|
{
|
575
|
-
"include": "#
|
880
|
+
"include": "#type-parameters"
|
576
881
|
},
|
577
882
|
{
|
578
|
-
"include": "#
|
883
|
+
"include": "#class-or-interface-body"
|
579
884
|
}
|
580
885
|
]
|
581
886
|
},
|
582
|
-
"
|
583
|
-
"
|
887
|
+
"class-or-interface-heritage": {
|
888
|
+
"begin": "(?<!\\.|\\$)(?:\\b(extends|implements)\\b)(?!\\$)",
|
889
|
+
"beginCaptures": {
|
584
890
|
"1": {
|
585
891
|
"name": "storage.modifier.ts"
|
586
|
-
},
|
587
|
-
"2": {
|
588
|
-
"name": "storage.modifier.ts"
|
589
|
-
},
|
590
|
-
"3": {
|
591
|
-
"name": "storage.modifier.ts"
|
592
|
-
},
|
593
|
-
"4": {
|
594
|
-
"name": "storage.type.property.ts"
|
595
|
-
},
|
596
|
-
"5": {
|
597
|
-
"name": "keyword.operator.ts"
|
598
|
-
},
|
599
|
-
"6": {
|
600
|
-
"name": "storage.type.ts"
|
601
|
-
},
|
602
|
-
"7": {
|
603
|
-
"name": "entity.name.function.ts"
|
604
|
-
},
|
605
|
-
"8": {
|
606
|
-
"name": "keyword.operator.ts"
|
607
892
|
}
|
608
893
|
},
|
609
|
-
"
|
610
|
-
"
|
611
|
-
},
|
612
|
-
"new-expr": {
|
613
|
-
"begin": "\\b(new)\\b",
|
614
|
-
"beginCaptures": {
|
894
|
+
"end": "(?=\\{)",
|
895
|
+
"endCaptures": {
|
615
896
|
"1": {
|
616
|
-
"name": "
|
897
|
+
"name": "punctuation.definition.block.ts"
|
617
898
|
}
|
618
899
|
},
|
619
|
-
"end": "(?=[(;]|$)",
|
620
|
-
"name": "new.expr.ts",
|
621
900
|
"patterns": [
|
622
901
|
{
|
623
|
-
"include": "#
|
902
|
+
"include": "#comment"
|
624
903
|
},
|
625
904
|
{
|
626
|
-
"include": "#
|
905
|
+
"include": "#class-or-interface-heritage"
|
906
|
+
},
|
907
|
+
{
|
908
|
+
"include": "#type-parameters"
|
909
|
+
},
|
910
|
+
{
|
911
|
+
"match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
|
912
|
+
"captures": {
|
913
|
+
"1": {
|
914
|
+
"name": "entity.name.type.module.ts"
|
915
|
+
},
|
916
|
+
"2": {
|
917
|
+
"name": "punctuation.accessor.ts"
|
918
|
+
}
|
919
|
+
}
|
920
|
+
},
|
921
|
+
{
|
922
|
+
"match": "([_$[:alpha:]][_$[:alnum:]]*)",
|
923
|
+
"captures": {
|
924
|
+
"1": {
|
925
|
+
"name": "entity.other.inherited-class.ts"
|
926
|
+
}
|
927
|
+
}
|
627
928
|
}
|
628
929
|
]
|
629
930
|
},
|
630
|
-
"
|
631
|
-
"match": "\\b(null)\\b",
|
632
|
-
"name": "constant.language.null.ts"
|
633
|
-
},
|
634
|
-
"numeric-literal": {
|
635
|
-
"match": "\\b(?<=[^$])((0(x|X)[0-9a-fA-F]+)|(0(o|O)[0-7]+)|(0(b|B)(0|1)+)|(([0-9]+(\\.[0-9]+)?))([eE]([+-]?)[0-9]+(\\.[0-9]+)?)?)\\b",
|
636
|
-
"name": "constant.numeric.ts"
|
637
|
-
},
|
638
|
-
"object-body": {
|
931
|
+
"class-or-interface-body": {
|
639
932
|
"begin": "\\{",
|
640
933
|
"beginCaptures": {
|
641
934
|
"0": {
|
642
|
-
"name": "
|
935
|
+
"name": "punctuation.definition.block.ts"
|
643
936
|
}
|
644
937
|
},
|
645
938
|
"end": "\\}",
|
646
939
|
"endCaptures": {
|
647
940
|
"0": {
|
648
|
-
"name": "
|
941
|
+
"name": "punctuation.definition.block.ts"
|
649
942
|
}
|
650
943
|
},
|
651
|
-
"name": "meta.object.body.ts",
|
652
944
|
"patterns": [
|
653
945
|
{
|
654
946
|
"include": "#string"
|
@@ -657,7 +949,7 @@
|
|
657
949
|
"include": "#comment"
|
658
950
|
},
|
659
951
|
{
|
660
|
-
"include": "#
|
952
|
+
"include": "#decorator"
|
661
953
|
},
|
662
954
|
{
|
663
955
|
"include": "#method-declaration"
|
@@ -665,6 +957,9 @@
|
|
665
957
|
{
|
666
958
|
"include": "#indexer-declaration"
|
667
959
|
},
|
960
|
+
{
|
961
|
+
"include": "#field-declaration"
|
962
|
+
},
|
668
963
|
{
|
669
964
|
"include": "#type-annotation"
|
670
965
|
},
|
@@ -675,137 +970,967 @@
|
|
675
970
|
"include": "#access-modifier"
|
676
971
|
},
|
677
972
|
{
|
678
|
-
"include": "#
|
973
|
+
"include": "#property-accessor"
|
679
974
|
},
|
680
975
|
{
|
681
|
-
"include": "#
|
976
|
+
"include": "#expression"
|
977
|
+
},
|
978
|
+
{
|
979
|
+
"include": "#punctuation-comma"
|
980
|
+
},
|
981
|
+
{
|
982
|
+
"include": "#punctuation-semicolon"
|
682
983
|
}
|
683
984
|
]
|
684
985
|
},
|
685
|
-
"object
|
686
|
-
"
|
986
|
+
"type-object": {
|
987
|
+
"name": "meta.object.type.ts",
|
988
|
+
"begin": "\\{",
|
687
989
|
"beginCaptures": {
|
688
|
-
"
|
689
|
-
"name": "
|
690
|
-
},
|
691
|
-
"2": {
|
692
|
-
"name": "storage.modifier.ts"
|
693
|
-
},
|
694
|
-
"3": {
|
695
|
-
"name": "storage.type.ts"
|
990
|
+
"0": {
|
991
|
+
"name": "punctuation.definition.block.ts"
|
696
992
|
}
|
697
993
|
},
|
698
|
-
"end": "
|
994
|
+
"end": "\\}",
|
699
995
|
"endCaptures": {
|
700
|
-
"
|
701
|
-
"name": "
|
996
|
+
"0": {
|
997
|
+
"name": "punctuation.definition.block.ts"
|
702
998
|
}
|
703
999
|
},
|
704
|
-
"
|
1000
|
+
"patterns": [
|
1001
|
+
{
|
1002
|
+
"include": "#type-object-members"
|
1003
|
+
}
|
1004
|
+
]
|
1005
|
+
},
|
1006
|
+
"type-object-members": {
|
705
1007
|
"patterns": [
|
706
1008
|
{
|
707
1009
|
"include": "#comment"
|
708
1010
|
},
|
709
1011
|
{
|
710
|
-
"include": "#
|
1012
|
+
"include": "#method-declaration"
|
711
1013
|
},
|
712
1014
|
{
|
713
|
-
"include": "#
|
1015
|
+
"include": "#indexer-declaration"
|
714
1016
|
},
|
715
1017
|
{
|
716
|
-
"include": "#
|
1018
|
+
"include": "#field-declaration"
|
717
1019
|
},
|
718
1020
|
{
|
719
|
-
"include": "#
|
720
|
-
}
|
721
|
-
]
|
722
|
-
},
|
723
|
-
"object-heritage": {
|
724
|
-
"begin": "(?:\\b(extends|implements)\\b)",
|
725
|
-
"beginCaptures": {
|
726
|
-
"1": {
|
727
|
-
"name": "keyword.other.ts"
|
728
|
-
}
|
729
|
-
},
|
730
|
-
"end": "(?=\\{)",
|
731
|
-
"endCaptures": {
|
732
|
-
"1": {
|
733
|
-
"name": "brace.curly.ts"
|
734
|
-
}
|
735
|
-
},
|
736
|
-
"name": "meta.object.heritage.ts",
|
737
|
-
"patterns": [
|
738
|
-
{
|
739
|
-
"include": "#comment"
|
1021
|
+
"include": "#type-annotation"
|
740
1022
|
},
|
741
1023
|
{
|
742
|
-
"
|
1024
|
+
"begin": "\\.\\.\\.",
|
1025
|
+
"beginCaptures": {
|
1026
|
+
"0": {
|
1027
|
+
"name": "keyword.operator.spread.ts"
|
1028
|
+
}
|
1029
|
+
},
|
1030
|
+
"end": "(?=\\}|;|,|$)|(?<=\\})",
|
1031
|
+
"patterns": [
|
1032
|
+
{
|
1033
|
+
"include": "#type"
|
1034
|
+
}
|
1035
|
+
]
|
743
1036
|
},
|
744
1037
|
{
|
745
|
-
"include": "#
|
1038
|
+
"include": "#punctuation-comma"
|
746
1039
|
},
|
747
1040
|
{
|
748
|
-
"include": "#
|
1041
|
+
"include": "#punctuation-semicolon"
|
749
1042
|
}
|
750
1043
|
]
|
751
1044
|
},
|
752
|
-
"
|
753
|
-
"
|
1045
|
+
"field-declaration": {
|
1046
|
+
"name": "meta.field.declaration.ts",
|
1047
|
+
"begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\?\\s*)?(=|:))",
|
1048
|
+
"beginCaptures": {
|
754
1049
|
"1": {
|
755
|
-
"name": "
|
1050
|
+
"name": "storage.modifier.ts"
|
756
1051
|
}
|
757
1052
|
},
|
758
|
-
"
|
759
|
-
"name": "meta.object.heritage.parent.ts"
|
760
|
-
},
|
761
|
-
"object-member": {
|
762
|
-
"begin": "[a-zA-Z_$][\\w$]*\\s*:",
|
763
|
-
"end": "(?=,|\\})",
|
764
|
-
"name": "meta.object.member.ts",
|
1053
|
+
"end": "(?=\\}|;|,|$)|(?<=\\})",
|
765
1054
|
"patterns": [
|
766
1055
|
{
|
767
|
-
"include": "#
|
1056
|
+
"include": "#variable-initializer"
|
1057
|
+
},
|
1058
|
+
{
|
1059
|
+
"begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\?\\s*)?(=|:))",
|
1060
|
+
"end": "(?=[};,=]|$)|(?<=\\})",
|
1061
|
+
"patterns": [
|
1062
|
+
{
|
1063
|
+
"include": "#type-annotation"
|
1064
|
+
},
|
1065
|
+
{
|
1066
|
+
"include": "#string"
|
1067
|
+
},
|
1068
|
+
{
|
1069
|
+
"include": "#array-literal"
|
1070
|
+
},
|
1071
|
+
{
|
1072
|
+
"include": "#comment"
|
1073
|
+
},
|
1074
|
+
{
|
1075
|
+
"name": "meta.definition.property.ts variable.object.property.ts",
|
1076
|
+
"match": "[_$[:alpha:]][_$[:alnum:]]*"
|
1077
|
+
},
|
1078
|
+
{
|
1079
|
+
"name": "keyword.operator.optional.ts",
|
1080
|
+
"match": "\\?"
|
1081
|
+
}
|
1082
|
+
]
|
768
1083
|
}
|
769
1084
|
]
|
770
1085
|
},
|
771
|
-
"
|
772
|
-
"
|
773
|
-
|
774
|
-
|
775
|
-
}
|
776
|
-
},
|
777
|
-
"match": "[a-zA-Z_$][\\w$]*",
|
778
|
-
"name": "meta.object.name.ts"
|
779
|
-
},
|
780
|
-
"parameter-name": {
|
781
|
-
"captures": {
|
1086
|
+
"method-declaration": {
|
1087
|
+
"name": "meta.method.declaration.ts",
|
1088
|
+
"begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\??))?\\s*[\\(\\<]))",
|
1089
|
+
"beginCaptures": {
|
782
1090
|
"1": {
|
783
1091
|
"name": "storage.modifier.ts"
|
784
1092
|
},
|
785
1093
|
"2": {
|
786
|
-
"name": "
|
1094
|
+
"name": "storage.modifier.ts"
|
1095
|
+
},
|
1096
|
+
"3": {
|
1097
|
+
"name": "storage.modifier.async.ts"
|
1098
|
+
},
|
1099
|
+
"4": {
|
1100
|
+
"name": "storage.type.property.ts"
|
1101
|
+
},
|
1102
|
+
"5": {
|
1103
|
+
"name": "keyword.operator.new.ts"
|
1104
|
+
},
|
1105
|
+
"6": {
|
1106
|
+
"name": "storage.type.ts"
|
1107
|
+
},
|
1108
|
+
"7": {
|
1109
|
+
"name": "keyword.generator.asterisk.ts"
|
1110
|
+
}
|
1111
|
+
},
|
1112
|
+
"end": "(?=\\}|;|,)|(?<=\\})",
|
1113
|
+
"patterns": [
|
1114
|
+
{
|
1115
|
+
"include": "#method-declaration-name"
|
1116
|
+
},
|
1117
|
+
{
|
1118
|
+
"include": "#comment"
|
1119
|
+
},
|
1120
|
+
{
|
1121
|
+
"include": "#type-parameters"
|
1122
|
+
},
|
1123
|
+
{
|
1124
|
+
"include": "#function-parameters"
|
1125
|
+
},
|
1126
|
+
{
|
1127
|
+
"include": "#return-type"
|
1128
|
+
},
|
1129
|
+
{
|
1130
|
+
"include": "#method-overload-declaration"
|
1131
|
+
},
|
1132
|
+
{
|
1133
|
+
"include": "#decl-block"
|
1134
|
+
}
|
1135
|
+
]
|
1136
|
+
},
|
1137
|
+
"method-overload-declaration": {
|
1138
|
+
"begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\??))?\\s*[\\(\\<]))",
|
1139
|
+
"beginCaptures": {
|
1140
|
+
"1": {
|
1141
|
+
"name": "storage.modifier.ts"
|
1142
|
+
},
|
1143
|
+
"2": {
|
1144
|
+
"name": "storage.modifier.ts"
|
1145
|
+
},
|
1146
|
+
"3": {
|
1147
|
+
"name": "storage.modifier.async.ts"
|
1148
|
+
},
|
1149
|
+
"4": {
|
1150
|
+
"name": "storage.type.property.ts"
|
1151
|
+
},
|
1152
|
+
"5": {
|
1153
|
+
"name": "keyword.operator.new.ts"
|
1154
|
+
},
|
1155
|
+
"6": {
|
1156
|
+
"name": "storage.type.ts"
|
1157
|
+
},
|
1158
|
+
"7": {
|
1159
|
+
"name": "keyword.generator.asterisk.ts"
|
1160
|
+
}
|
1161
|
+
},
|
1162
|
+
"end": "(?=\\(|\\<)",
|
1163
|
+
"patterns": [
|
1164
|
+
{
|
1165
|
+
"include": "#method-declaration-name"
|
1166
|
+
}
|
1167
|
+
]
|
1168
|
+
},
|
1169
|
+
"method-declaration-name": {
|
1170
|
+
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\??)\\s*[\\(\\<])",
|
1171
|
+
"end": "(?=\\(|\\<)",
|
1172
|
+
"patterns": [
|
1173
|
+
{
|
1174
|
+
"include": "#string"
|
1175
|
+
},
|
1176
|
+
{
|
1177
|
+
"include": "#array-literal"
|
1178
|
+
},
|
1179
|
+
{
|
1180
|
+
"name": "meta.definition.method.ts entity.name.function.ts",
|
1181
|
+
"match": "[_$[:alpha:]][_$[:alnum:]]*"
|
1182
|
+
},
|
1183
|
+
{
|
1184
|
+
"name": "keyword.operator.optional.ts",
|
1185
|
+
"match": "\\?"
|
1186
|
+
}
|
1187
|
+
]
|
1188
|
+
},
|
1189
|
+
"indexer-declaration": {
|
1190
|
+
"name": "meta.indexer.declaration.ts",
|
1191
|
+
"begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
|
1192
|
+
"beginCaptures": {
|
1193
|
+
"1": {
|
1194
|
+
"name": "storage.modifier.ts"
|
1195
|
+
},
|
1196
|
+
"2": {
|
1197
|
+
"name": "meta.brace.square.ts"
|
1198
|
+
},
|
1199
|
+
"3": {
|
1200
|
+
"name": "variable.parameter.ts"
|
1201
|
+
}
|
1202
|
+
},
|
1203
|
+
"end": "(\\])\\s*(\\?\\s*)?|$",
|
1204
|
+
"endCaptures": {
|
1205
|
+
"1": {
|
1206
|
+
"name": "meta.brace.square.ts"
|
1207
|
+
},
|
1208
|
+
"2": {
|
1209
|
+
"name": "keyword.operator.optional.ts"
|
1210
|
+
}
|
1211
|
+
},
|
1212
|
+
"patterns": [
|
1213
|
+
{
|
1214
|
+
"include": "#type-annotation"
|
1215
|
+
}
|
1216
|
+
]
|
1217
|
+
},
|
1218
|
+
"function-declaration": {
|
1219
|
+
"name": "meta.function.ts",
|
1220
|
+
"begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
|
1221
|
+
"beginCaptures": {
|
1222
|
+
"1": {
|
1223
|
+
"name": "keyword.control.export.ts"
|
1224
|
+
},
|
1225
|
+
"2": {
|
1226
|
+
"name": "storage.modifier.async.ts"
|
1227
|
+
},
|
1228
|
+
"3": {
|
1229
|
+
"name": "storage.type.function.ts"
|
1230
|
+
},
|
1231
|
+
"4": {
|
1232
|
+
"name": "keyword.generator.asterisk.ts"
|
1233
|
+
},
|
1234
|
+
"5": {
|
1235
|
+
"name": "meta.definition.function.ts entity.name.function.ts"
|
1236
|
+
}
|
1237
|
+
},
|
1238
|
+
"end": "(?=;|\\})|(?<=\\})",
|
1239
|
+
"patterns": [
|
1240
|
+
{
|
1241
|
+
"include": "#comment"
|
1242
|
+
},
|
1243
|
+
{
|
1244
|
+
"include": "#type-parameters"
|
1245
|
+
},
|
1246
|
+
{
|
1247
|
+
"include": "#function-parameters"
|
1248
|
+
},
|
1249
|
+
{
|
1250
|
+
"include": "#return-type"
|
1251
|
+
},
|
1252
|
+
{
|
1253
|
+
"include": "#function-overload-declaration"
|
1254
|
+
},
|
1255
|
+
{
|
1256
|
+
"include": "#decl-block"
|
1257
|
+
}
|
1258
|
+
]
|
1259
|
+
},
|
1260
|
+
"function-overload-declaration": {
|
1261
|
+
"name": "meta.function.overload.ts",
|
1262
|
+
"match": "(?<!\\.|\\$)\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
|
1263
|
+
"captures": {
|
1264
|
+
"1": {
|
1265
|
+
"name": "keyword.control.export.ts"
|
1266
|
+
},
|
1267
|
+
"2": {
|
1268
|
+
"name": "storage.modifier.async.ts"
|
1269
|
+
},
|
1270
|
+
"3": {
|
1271
|
+
"name": "storage.type.function.ts"
|
1272
|
+
},
|
1273
|
+
"4": {
|
1274
|
+
"name": "keyword.generator.asterisk.ts"
|
1275
|
+
},
|
1276
|
+
"5": {
|
1277
|
+
"name": "meta.definition.function.ts entity.name.function.ts"
|
1278
|
+
}
|
1279
|
+
}
|
1280
|
+
},
|
1281
|
+
"object-literal": {
|
1282
|
+
"name": "meta.objectliteral.ts",
|
1283
|
+
"begin": "\\{",
|
1284
|
+
"beginCaptures": {
|
1285
|
+
"0": {
|
1286
|
+
"name": "punctuation.definition.block.ts"
|
1287
|
+
}
|
1288
|
+
},
|
1289
|
+
"end": "\\}",
|
1290
|
+
"endCaptures": {
|
1291
|
+
"0": {
|
1292
|
+
"name": "punctuation.definition.block.ts"
|
1293
|
+
}
|
1294
|
+
},
|
1295
|
+
"patterns": [
|
1296
|
+
{
|
1297
|
+
"include": "#object-member"
|
1298
|
+
}
|
1299
|
+
]
|
1300
|
+
},
|
1301
|
+
"decl-block": {
|
1302
|
+
"name": "meta.block.ts",
|
1303
|
+
"begin": "\\{",
|
1304
|
+
"beginCaptures": {
|
1305
|
+
"0": {
|
1306
|
+
"name": "punctuation.definition.block.ts"
|
1307
|
+
}
|
1308
|
+
},
|
1309
|
+
"end": "\\}",
|
1310
|
+
"endCaptures": {
|
1311
|
+
"0": {
|
1312
|
+
"name": "punctuation.definition.block.ts"
|
1313
|
+
}
|
1314
|
+
},
|
1315
|
+
"patterns": [
|
1316
|
+
{
|
1317
|
+
"include": "#statements"
|
1318
|
+
}
|
1319
|
+
]
|
1320
|
+
},
|
1321
|
+
"after-operator-block": {
|
1322
|
+
"name": "meta.objectliteral.ts",
|
1323
|
+
"begin": "(?<=[=(,\\[?+!]|await|return|yield|throw|in|of|typeof|&&|\\|\\||\\*)\\s*(\\{)",
|
1324
|
+
"beginCaptures": {
|
1325
|
+
"1": {
|
1326
|
+
"name": "punctuation.definition.block.ts"
|
1327
|
+
}
|
1328
|
+
},
|
1329
|
+
"end": "\\}",
|
1330
|
+
"endCaptures": {
|
1331
|
+
"0": {
|
1332
|
+
"name": "punctuation.definition.block.ts"
|
1333
|
+
}
|
1334
|
+
},
|
1335
|
+
"patterns": [
|
1336
|
+
{
|
1337
|
+
"include": "#object-member"
|
1338
|
+
}
|
1339
|
+
]
|
1340
|
+
},
|
1341
|
+
"parameter-name": {
|
1342
|
+
"match": "(?:\\s*\\b(readonly)\\s+)?(?:\\s*\\b(public|private|protected)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)",
|
1343
|
+
"captures": {
|
1344
|
+
"1": {
|
1345
|
+
"name": "storage.modifier.ts"
|
1346
|
+
},
|
1347
|
+
"2": {
|
1348
|
+
"name": "storage.modifier.ts"
|
1349
|
+
},
|
1350
|
+
"3": {
|
1351
|
+
"name": "keyword.operator.rest.ts"
|
1352
|
+
},
|
1353
|
+
"4": {
|
1354
|
+
"name": "variable.parameter.ts"
|
1355
|
+
},
|
1356
|
+
"5": {
|
1357
|
+
"name": "keyword.operator.optional.ts"
|
1358
|
+
}
|
1359
|
+
}
|
1360
|
+
},
|
1361
|
+
"destructuring-parameter": {
|
1362
|
+
"patterns": [
|
1363
|
+
{
|
1364
|
+
"name": "meta.parameter.object-binding-pattern.ts",
|
1365
|
+
"begin": "(?<!=|:)\\s*(\\{)",
|
1366
|
+
"beginCaptures": {
|
1367
|
+
"1": {
|
1368
|
+
"name": "punctuation.definition.binding-pattern.object.ts"
|
1369
|
+
}
|
1370
|
+
},
|
1371
|
+
"end": "\\}",
|
1372
|
+
"endCaptures": {
|
1373
|
+
"0": {
|
1374
|
+
"name": "punctuation.definition.binding-pattern.object.ts"
|
1375
|
+
}
|
1376
|
+
},
|
1377
|
+
"patterns": [
|
1378
|
+
{
|
1379
|
+
"include": "#parameter-object-binding-element"
|
1380
|
+
}
|
1381
|
+
]
|
1382
|
+
},
|
1383
|
+
{
|
1384
|
+
"name": "meta.paramter.array-binding-pattern.ts",
|
1385
|
+
"begin": "(?<!=|:)\\s*(\\[)",
|
1386
|
+
"beginCaptures": {
|
1387
|
+
"1": {
|
1388
|
+
"name": "punctuation.definition.binding-pattern.array.ts"
|
1389
|
+
}
|
1390
|
+
},
|
1391
|
+
"end": "\\]",
|
1392
|
+
"endCaptures": {
|
1393
|
+
"0": {
|
1394
|
+
"name": "punctuation.definition.binding-pattern.array.ts"
|
1395
|
+
}
|
1396
|
+
},
|
1397
|
+
"patterns": [
|
1398
|
+
{
|
1399
|
+
"include": "#parameter-array-binding-element"
|
1400
|
+
}
|
1401
|
+
]
|
1402
|
+
}
|
1403
|
+
]
|
1404
|
+
},
|
1405
|
+
"parameter-object-binding-element": {
|
1406
|
+
"patterns": [
|
1407
|
+
{
|
1408
|
+
"include": "#comment"
|
1409
|
+
},
|
1410
|
+
{
|
1411
|
+
"begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
|
1412
|
+
"beginCaptures": {
|
1413
|
+
"1": {
|
1414
|
+
"name": "variable.object.property.ts"
|
1415
|
+
},
|
1416
|
+
"2": {
|
1417
|
+
"name": "punctuation.destructuring.ts"
|
1418
|
+
}
|
1419
|
+
},
|
1420
|
+
"end": "(?=,|\\})",
|
1421
|
+
"patterns": [
|
1422
|
+
{
|
1423
|
+
"include": "#parameter-object-binding-pattern"
|
1424
|
+
},
|
1425
|
+
{
|
1426
|
+
"include": "#parameter-array-binding-pattern"
|
1427
|
+
},
|
1428
|
+
{
|
1429
|
+
"name": "variable.parameter.ts",
|
1430
|
+
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
|
1431
|
+
},
|
1432
|
+
{
|
1433
|
+
"include": "#variable-initializer"
|
1434
|
+
}
|
1435
|
+
]
|
1436
|
+
},
|
1437
|
+
{
|
1438
|
+
"include": "#parameter-object-binding-pattern"
|
1439
|
+
},
|
1440
|
+
{
|
1441
|
+
"include": "#destructuring-parameter-rest"
|
1442
|
+
},
|
1443
|
+
{
|
1444
|
+
"include": "#variable-initializer"
|
1445
|
+
},
|
1446
|
+
{
|
1447
|
+
"include": "#punctuation-comma"
|
1448
|
+
}
|
1449
|
+
]
|
1450
|
+
},
|
1451
|
+
"parameter-array-binding-element": {
|
1452
|
+
"patterns": [
|
1453
|
+
{
|
1454
|
+
"include": "#comment"
|
1455
|
+
},
|
1456
|
+
{
|
1457
|
+
"include": "#parameter-object-binding-pattern"
|
1458
|
+
},
|
1459
|
+
{
|
1460
|
+
"include": "#parameter-array-binding-pattern"
|
1461
|
+
},
|
1462
|
+
{
|
1463
|
+
"include": "#destructuring-parameter-rest"
|
1464
|
+
},
|
1465
|
+
{
|
1466
|
+
"include": "#variable-initializer"
|
1467
|
+
},
|
1468
|
+
{
|
1469
|
+
"include": "#punctuation-comma"
|
1470
|
+
}
|
1471
|
+
]
|
1472
|
+
},
|
1473
|
+
"destructuring-parameter-rest": {
|
1474
|
+
"match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
|
1475
|
+
"captures": {
|
1476
|
+
"1": {
|
1477
|
+
"name": "keyword.operator.rest.ts"
|
1478
|
+
},
|
1479
|
+
"2": {
|
1480
|
+
"name": "variable.parameter.ts"
|
1481
|
+
}
|
1482
|
+
}
|
1483
|
+
},
|
1484
|
+
"parameter-object-binding-pattern": {
|
1485
|
+
"begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
|
1486
|
+
"beginCaptures": {
|
1487
|
+
"1": {
|
1488
|
+
"name": "keyword.operator.rest.ts"
|
1489
|
+
},
|
1490
|
+
"2": {
|
1491
|
+
"name": "punctuation.definition.binding-pattern.object.ts"
|
1492
|
+
}
|
1493
|
+
},
|
1494
|
+
"end": "\\}",
|
1495
|
+
"endCaptures": {
|
1496
|
+
"0": {
|
1497
|
+
"name": "punctuation.definition.binding-pattern.object.ts"
|
1498
|
+
}
|
1499
|
+
},
|
1500
|
+
"patterns": [
|
1501
|
+
{
|
1502
|
+
"include": "#parameter-object-binding-element"
|
1503
|
+
}
|
1504
|
+
]
|
1505
|
+
},
|
1506
|
+
"parameter-array-binding-pattern": {
|
1507
|
+
"begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
|
1508
|
+
"beginCaptures": {
|
1509
|
+
"1": {
|
1510
|
+
"name": "keyword.operator.rest.ts"
|
1511
|
+
},
|
1512
|
+
"2": {
|
1513
|
+
"name": "punctuation.definition.binding-pattern.array.ts"
|
1514
|
+
}
|
1515
|
+
},
|
1516
|
+
"end": "\\]",
|
1517
|
+
"endCaptures": {
|
1518
|
+
"0": {
|
1519
|
+
"name": "punctuation.definition.binding-pattern.array.ts"
|
1520
|
+
}
|
1521
|
+
},
|
1522
|
+
"patterns": [
|
1523
|
+
{
|
1524
|
+
"include": "#parameter-array-binding-element"
|
1525
|
+
}
|
1526
|
+
]
|
1527
|
+
},
|
1528
|
+
"return-type": {
|
1529
|
+
"name": "meta.return.type.ts",
|
1530
|
+
"begin": "(?<=\\))\\s*(:)",
|
1531
|
+
"beginCaptures": {
|
1532
|
+
"1": {
|
1533
|
+
"name": "keyword.operator.type.annotation.ts"
|
1534
|
+
}
|
1535
|
+
},
|
1536
|
+
"end": "(?<!:)((?=$)|(?=\\{|;|//|\\}))",
|
1537
|
+
"patterns": [
|
1538
|
+
{
|
1539
|
+
"include": "#comment"
|
1540
|
+
},
|
1541
|
+
{
|
1542
|
+
"name": "meta.object.type.ts",
|
1543
|
+
"begin": "(?<=:)\\s*(\\{)",
|
1544
|
+
"beginCaptures": {
|
1545
|
+
"1": {
|
1546
|
+
"name": "punctuation.definition.block.ts"
|
1547
|
+
}
|
1548
|
+
},
|
1549
|
+
"end": "\\}",
|
1550
|
+
"endCaptures": {
|
1551
|
+
"0": {
|
1552
|
+
"name": "punctuation.definition.block.ts"
|
1553
|
+
}
|
1554
|
+
},
|
1555
|
+
"patterns": [
|
1556
|
+
{
|
1557
|
+
"include": "#type-object-members"
|
1558
|
+
}
|
1559
|
+
]
|
1560
|
+
},
|
1561
|
+
{
|
1562
|
+
"include": "#type-predicate-operator"
|
1563
|
+
},
|
1564
|
+
{
|
1565
|
+
"include": "#type"
|
1566
|
+
}
|
1567
|
+
]
|
1568
|
+
},
|
1569
|
+
"type-predicate-operator": {
|
1570
|
+
"name": "keyword.operator.expression.is.ts",
|
1571
|
+
"match": "(?<!\\.|\\$)\\bis\\b(?!\\$)"
|
1572
|
+
},
|
1573
|
+
"type-annotation": {
|
1574
|
+
"name": "meta.type.annotation.ts",
|
1575
|
+
"begin": ":",
|
1576
|
+
"beginCaptures": {
|
1577
|
+
"0": {
|
1578
|
+
"name": "keyword.operator.type.annotation.ts"
|
1579
|
+
}
|
1580
|
+
},
|
1581
|
+
"end": "(?=$|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
|
1582
|
+
"patterns": [
|
1583
|
+
{
|
1584
|
+
"include": "#comment"
|
1585
|
+
},
|
1586
|
+
{
|
1587
|
+
"include": "#type"
|
1588
|
+
}
|
1589
|
+
]
|
1590
|
+
},
|
1591
|
+
"type": {
|
1592
|
+
"name": "meta.type.ts",
|
1593
|
+
"patterns": [
|
1594
|
+
{
|
1595
|
+
"include": "#comment"
|
1596
|
+
},
|
1597
|
+
{
|
1598
|
+
"include": "#string"
|
1599
|
+
},
|
1600
|
+
{
|
1601
|
+
"include": "#numeric-literal"
|
1602
|
+
},
|
1603
|
+
{
|
1604
|
+
"include": "#type-primitive"
|
1605
|
+
},
|
1606
|
+
{
|
1607
|
+
"include": "#type-builtin-literals"
|
1608
|
+
},
|
1609
|
+
{
|
1610
|
+
"include": "#type-parameters"
|
1611
|
+
},
|
1612
|
+
{
|
1613
|
+
"include": "#type-tuple"
|
1614
|
+
},
|
1615
|
+
{
|
1616
|
+
"include": "#type-object"
|
1617
|
+
},
|
1618
|
+
{
|
1619
|
+
"include": "#type-operators"
|
1620
|
+
},
|
1621
|
+
{
|
1622
|
+
"include": "#type-fn-type-parameters"
|
1623
|
+
},
|
1624
|
+
{
|
1625
|
+
"include": "#type-paren-or-function-parameters"
|
1626
|
+
},
|
1627
|
+
{
|
1628
|
+
"include": "#type-function-return-type"
|
1629
|
+
},
|
1630
|
+
{
|
1631
|
+
"include": "#type-name"
|
1632
|
+
}
|
1633
|
+
]
|
1634
|
+
},
|
1635
|
+
"function-parameters": {
|
1636
|
+
"name": "meta.parameters.ts",
|
1637
|
+
"begin": "\\(",
|
1638
|
+
"beginCaptures": {
|
1639
|
+
"0": {
|
1640
|
+
"name": "punctuation.definition.parameters.begin.ts"
|
1641
|
+
}
|
1642
|
+
},
|
1643
|
+
"end": "\\)",
|
1644
|
+
"endCaptures": {
|
1645
|
+
"0": {
|
1646
|
+
"name": "punctuation.definition.parameters.end.ts"
|
1647
|
+
}
|
1648
|
+
},
|
1649
|
+
"patterns": [
|
1650
|
+
{
|
1651
|
+
"include": "#comment"
|
1652
|
+
},
|
1653
|
+
{
|
1654
|
+
"include": "#decorator"
|
1655
|
+
},
|
1656
|
+
{
|
1657
|
+
"include": "#destructuring-parameter"
|
1658
|
+
},
|
1659
|
+
{
|
1660
|
+
"include": "#parameter-name"
|
1661
|
+
},
|
1662
|
+
{
|
1663
|
+
"include": "#type-annotation"
|
1664
|
+
},
|
1665
|
+
{
|
1666
|
+
"include": "#variable-initializer"
|
1667
|
+
},
|
1668
|
+
{
|
1669
|
+
"name": "punctuation.separator.parameter.ts",
|
1670
|
+
"match": ","
|
1671
|
+
}
|
1672
|
+
]
|
1673
|
+
},
|
1674
|
+
"type-primitive": {
|
1675
|
+
"name": "support.type.primitive.ts",
|
1676
|
+
"match": "(?<!\\.|\\$)\\b(string|number|boolean|symbol|any|void|never)\\b(?!\\$)"
|
1677
|
+
},
|
1678
|
+
"type-builtin-literals": {
|
1679
|
+
"name": "support.type.builtin.ts",
|
1680
|
+
"match": "(?<!\\.|\\$)\\b(this|true|false|undefined|null)\\b(?!\\$)"
|
1681
|
+
},
|
1682
|
+
"type-paren-or-function-parameters": {
|
1683
|
+
"name": "meta.type.paren.cover.ts",
|
1684
|
+
"begin": "\\s*(\\()",
|
1685
|
+
"beginCaptures": {
|
1686
|
+
"1": {
|
1687
|
+
"name": "meta.brace.round.ts"
|
1688
|
+
}
|
1689
|
+
},
|
1690
|
+
"end": "\\)",
|
1691
|
+
"endCaptures": {
|
1692
|
+
"0": {
|
1693
|
+
"name": "meta.brace.round.ts"
|
1694
|
+
}
|
1695
|
+
},
|
1696
|
+
"patterns": [
|
1697
|
+
{
|
1698
|
+
"include": "#type"
|
1699
|
+
},
|
1700
|
+
{
|
1701
|
+
"include": "#function-parameters"
|
1702
|
+
}
|
1703
|
+
]
|
1704
|
+
},
|
1705
|
+
"type-fn-type-parameters": {
|
1706
|
+
"patterns": [
|
1707
|
+
{
|
1708
|
+
"name": "meta.type.constructor.ts",
|
1709
|
+
"match": "(?<!\\.|\\$)\\b(new)\\b(?=\\s*\\<)",
|
1710
|
+
"captures": {
|
1711
|
+
"1": {
|
1712
|
+
"name": "keyword.control.new.ts"
|
1713
|
+
}
|
1714
|
+
}
|
1715
|
+
},
|
1716
|
+
{
|
1717
|
+
"name": "meta.type.constructor.ts",
|
1718
|
+
"begin": "(?<!\\.|\\$)\\b(new)\\b\\s*(?=\\()",
|
1719
|
+
"beginCaptures": {
|
1720
|
+
"1": {
|
1721
|
+
"name": "keyword.control.new.ts"
|
1722
|
+
}
|
1723
|
+
},
|
1724
|
+
"end": "(?<=\\))",
|
1725
|
+
"patterns": [
|
1726
|
+
{
|
1727
|
+
"include": "#function-parameters"
|
1728
|
+
}
|
1729
|
+
]
|
1730
|
+
},
|
1731
|
+
{
|
1732
|
+
"name": "meta.type.function.ts",
|
1733
|
+
"begin": "(?<=\\>)\\s*(?=\\()",
|
1734
|
+
"end": "(?<=\\))",
|
1735
|
+
"patterns": [
|
1736
|
+
{
|
1737
|
+
"include": "#function-parameters"
|
1738
|
+
}
|
1739
|
+
]
|
1740
|
+
},
|
1741
|
+
{
|
1742
|
+
"name": "meta.type.function.ts",
|
1743
|
+
"begin": "(?x)( \\s* (?= [(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ) ) )",
|
1744
|
+
"end": "(?<=\\))",
|
1745
|
+
"patterns": [
|
1746
|
+
{
|
1747
|
+
"include": "#function-parameters"
|
1748
|
+
}
|
1749
|
+
]
|
1750
|
+
}
|
1751
|
+
]
|
1752
|
+
},
|
1753
|
+
"type-operators": {
|
1754
|
+
"patterns": [
|
1755
|
+
{
|
1756
|
+
"include": "#typeof-operator"
|
1757
|
+
},
|
1758
|
+
{
|
1759
|
+
"name": "keyword.operator.type.ts",
|
1760
|
+
"match": "[&|]"
|
1761
|
+
}
|
1762
|
+
]
|
1763
|
+
},
|
1764
|
+
"type-function-return-type": {
|
1765
|
+
"name": "meta.type.function.return.ts",
|
1766
|
+
"begin": "=>",
|
1767
|
+
"beginCaptures": {
|
1768
|
+
"0": {
|
1769
|
+
"name": "storage.type.function.arrow.ts"
|
1770
|
+
}
|
1771
|
+
},
|
1772
|
+
"end": "(?<!=>)(?=[,\\]\\)\\{\\}=;>]|//|$)",
|
1773
|
+
"patterns": [
|
1774
|
+
{
|
1775
|
+
"include": "#comment"
|
1776
|
+
},
|
1777
|
+
{
|
1778
|
+
"name": "meta.object.type.ts",
|
1779
|
+
"begin": "(?<==>)\\s*(\\{)",
|
1780
|
+
"beginCaptures": {
|
1781
|
+
"1": {
|
1782
|
+
"name": "punctuation.definition.block.ts"
|
1783
|
+
}
|
1784
|
+
},
|
1785
|
+
"end": "\\}",
|
1786
|
+
"endCaptures": {
|
1787
|
+
"0": {
|
1788
|
+
"name": "punctuation.definition.block.ts"
|
1789
|
+
}
|
1790
|
+
},
|
1791
|
+
"patterns": [
|
1792
|
+
{
|
1793
|
+
"include": "#type-object-members"
|
1794
|
+
}
|
1795
|
+
]
|
1796
|
+
},
|
1797
|
+
{
|
1798
|
+
"include": "#type-predicate-operator"
|
787
1799
|
},
|
788
|
-
|
789
|
-
"
|
1800
|
+
{
|
1801
|
+
"include": "#type"
|
1802
|
+
}
|
1803
|
+
]
|
1804
|
+
},
|
1805
|
+
"type-tuple": {
|
1806
|
+
"name": "meta.type.tuple.ts",
|
1807
|
+
"begin": "\\[",
|
1808
|
+
"beginCaptures": {
|
1809
|
+
"0": {
|
1810
|
+
"name": "meta.brace.square.ts"
|
1811
|
+
}
|
1812
|
+
},
|
1813
|
+
"end": "\\]",
|
1814
|
+
"endCaptures": {
|
1815
|
+
"0": {
|
1816
|
+
"name": "meta.brace.square.ts"
|
1817
|
+
}
|
1818
|
+
},
|
1819
|
+
"patterns": [
|
1820
|
+
{
|
1821
|
+
"include": "#type"
|
790
1822
|
},
|
791
|
-
|
792
|
-
"
|
1823
|
+
{
|
1824
|
+
"include": "#punctuation-comma"
|
1825
|
+
}
|
1826
|
+
]
|
1827
|
+
},
|
1828
|
+
"type-name": {
|
1829
|
+
"patterns": [
|
1830
|
+
{
|
1831
|
+
"match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
|
1832
|
+
"captures": {
|
1833
|
+
"1": {
|
1834
|
+
"name": "entity.name.type.module.ts"
|
1835
|
+
},
|
1836
|
+
"2": {
|
1837
|
+
"name": "punctuation.accessor.ts"
|
1838
|
+
}
|
1839
|
+
}
|
1840
|
+
},
|
1841
|
+
{
|
1842
|
+
"name": "entity.name.type.ts",
|
1843
|
+
"match": "[_$[:alpha:]][_$[:alnum:]]*"
|
1844
|
+
}
|
1845
|
+
]
|
1846
|
+
},
|
1847
|
+
"type-parameters": {
|
1848
|
+
"name": "meta.type.parameters.ts",
|
1849
|
+
"begin": "(<)",
|
1850
|
+
"beginCaptures": {
|
1851
|
+
"1": {
|
1852
|
+
"name": "punctuation.definition.typeparameters.begin.ts"
|
1853
|
+
}
|
1854
|
+
},
|
1855
|
+
"end": "(?=$)|(>)",
|
1856
|
+
"endCaptures": {
|
1857
|
+
"1": {
|
1858
|
+
"name": "punctuation.definition.typeparameters.end.ts"
|
793
1859
|
}
|
794
1860
|
},
|
795
|
-
"
|
796
|
-
|
1861
|
+
"patterns": [
|
1862
|
+
{
|
1863
|
+
"include": "#comment"
|
1864
|
+
},
|
1865
|
+
{
|
1866
|
+
"name": "storage.modifier.ts",
|
1867
|
+
"match": "(?<!\\.|\\$)\\b(extends)\\b(?!\\$)"
|
1868
|
+
},
|
1869
|
+
{
|
1870
|
+
"include": "#type"
|
1871
|
+
},
|
1872
|
+
{
|
1873
|
+
"include": "#punctuation-comma"
|
1874
|
+
}
|
1875
|
+
]
|
797
1876
|
},
|
798
|
-
"
|
799
|
-
"begin": "
|
1877
|
+
"variable-initializer": {
|
1878
|
+
"begin": "(?<!=|!)(=)(?!=)",
|
1879
|
+
"beginCaptures": {
|
1880
|
+
"1": {
|
1881
|
+
"name": "keyword.operator.assignment.ts"
|
1882
|
+
}
|
1883
|
+
},
|
1884
|
+
"end": "(?=$|[,);}\\]])",
|
1885
|
+
"patterns": [
|
1886
|
+
{
|
1887
|
+
"include": "#expression"
|
1888
|
+
}
|
1889
|
+
]
|
1890
|
+
},
|
1891
|
+
"for-loop": {
|
1892
|
+
"begin": "(?<!\\.|\\$)\\b(for)\\s*(\\()",
|
800
1893
|
"beginCaptures": {
|
1894
|
+
"1": {
|
1895
|
+
"name": "keyword.control.loop.ts"
|
1896
|
+
},
|
1897
|
+
"2": {
|
1898
|
+
"name": "meta.brace.round.ts"
|
1899
|
+
}
|
1900
|
+
},
|
1901
|
+
"end": "\\)",
|
1902
|
+
"endCaptures": {
|
801
1903
|
"0": {
|
802
|
-
"name": "meta.brace.
|
1904
|
+
"name": "meta.brace.round.ts"
|
1905
|
+
}
|
1906
|
+
},
|
1907
|
+
"patterns": [
|
1908
|
+
{
|
1909
|
+
"include": "#var-expr"
|
1910
|
+
},
|
1911
|
+
{
|
1912
|
+
"include": "#expression"
|
1913
|
+
},
|
1914
|
+
{
|
1915
|
+
"include": "#punctuation-semicolon"
|
1916
|
+
}
|
1917
|
+
]
|
1918
|
+
},
|
1919
|
+
"switch-expression": {
|
1920
|
+
"name": "switch-expression.expr.ts",
|
1921
|
+
"begin": "(?<!\\.|\\$)\\b(switch)\\s*(\\()",
|
1922
|
+
"beginCaptures": {
|
1923
|
+
"1": {
|
1924
|
+
"name": "keyword.control.switch.ts"
|
1925
|
+
},
|
1926
|
+
"2": {
|
1927
|
+
"name": "meta.brace.round.ts"
|
803
1928
|
}
|
804
1929
|
},
|
805
1930
|
"end": "\\)",
|
806
1931
|
"endCaptures": {
|
807
1932
|
"0": {
|
808
|
-
"name": "meta.brace.
|
1933
|
+
"name": "meta.brace.round.ts"
|
809
1934
|
}
|
810
1935
|
},
|
811
1936
|
"patterns": [
|
@@ -814,392 +1939,1033 @@
|
|
814
1939
|
}
|
815
1940
|
]
|
816
1941
|
},
|
817
|
-
"
|
818
|
-
"
|
819
|
-
"
|
1942
|
+
"switch-block": {
|
1943
|
+
"name": "switch-block.expr.ts",
|
1944
|
+
"begin": "{",
|
1945
|
+
"beginCaptures": {
|
1946
|
+
"0": {
|
1947
|
+
"name": "punctuation.definition.block.ts"
|
1948
|
+
}
|
1949
|
+
},
|
1950
|
+
"end": "(?=\\})",
|
1951
|
+
"patterns": [
|
1952
|
+
{
|
1953
|
+
"include": "#case-clause"
|
1954
|
+
},
|
1955
|
+
{
|
1956
|
+
"include": "#statements"
|
1957
|
+
}
|
1958
|
+
]
|
820
1959
|
},
|
821
|
-
"
|
822
|
-
"
|
823
|
-
"
|
824
|
-
"
|
1960
|
+
"case-clause": {
|
1961
|
+
"name": "case-clause.expr.ts",
|
1962
|
+
"begin": "(?<!\\.|\\$)\\b(case|default(?=:))\\b(?!\\$)",
|
1963
|
+
"beginCaptures": {
|
1964
|
+
"1": {
|
1965
|
+
"name": "keyword.control.switch.ts"
|
1966
|
+
}
|
1967
|
+
},
|
1968
|
+
"end": ":",
|
1969
|
+
"endCaptures": {
|
1970
|
+
"0": {
|
1971
|
+
"name": "punctuation.definition.section.case-statement.ts"
|
1972
|
+
}
|
1973
|
+
},
|
825
1974
|
"patterns": [
|
826
1975
|
{
|
827
|
-
"include": "#
|
1976
|
+
"include": "#expression"
|
828
1977
|
}
|
829
1978
|
]
|
830
1979
|
},
|
831
|
-
"
|
832
|
-
"
|
833
|
-
"
|
834
|
-
"
|
1980
|
+
"switch-statement": {
|
1981
|
+
"name": "switch-statement.expr.ts",
|
1982
|
+
"begin": "(?<!\\.|\\$)(?=\\bswitch\\s*\\()",
|
1983
|
+
"end": "}",
|
1984
|
+
"endCaptures": {
|
1985
|
+
"0": {
|
1986
|
+
"name": "punctuation.definition.block.ts"
|
1987
|
+
}
|
1988
|
+
},
|
835
1989
|
"patterns": [
|
836
1990
|
{
|
837
|
-
"include": "#
|
1991
|
+
"include": "#switch-expression"
|
1992
|
+
},
|
1993
|
+
{
|
1994
|
+
"include": "#switch-block"
|
838
1995
|
}
|
839
1996
|
]
|
840
1997
|
},
|
841
|
-
"
|
842
|
-
"
|
843
|
-
|
844
|
-
|
1998
|
+
"support-objects": {
|
1999
|
+
"patterns": [
|
2000
|
+
{
|
2001
|
+
"name": "variable.language.arguments.ts",
|
2002
|
+
"match": "(?<!\\.|\\$)\\b(arguments)\\b(?!\\$)"
|
2003
|
+
},
|
2004
|
+
{
|
2005
|
+
"name": "support.class.builtin.ts",
|
2006
|
+
"match": "(?x)(?<!\\.|\\$)\\b(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Promise|Proxy |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\\b(?!\\$)"
|
2007
|
+
},
|
2008
|
+
{
|
2009
|
+
"name": "support.class.error.ts",
|
2010
|
+
"match": "(?<!\\.|\\$)\\b((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\\b(?!\\$)"
|
2011
|
+
},
|
2012
|
+
{
|
2013
|
+
"name": "support.function.ts",
|
2014
|
+
"match": "(?x)(?<!\\.|\\$)\\b(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval| isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\\s*\\()"
|
2015
|
+
},
|
2016
|
+
{
|
2017
|
+
"match": "(?x)(?<!\\.|\\$)\\b(Math)(?:\\s*(\\.)\\s*(?:\n (abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|\n expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random|\n round|sign|sin|sinh|sqrt|tan|tanh|trunc)\n |\n (E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\\b(?!\\$)",
|
2018
|
+
"captures": {
|
2019
|
+
"1": {
|
2020
|
+
"name": "support.constant.math.ts"
|
2021
|
+
},
|
2022
|
+
"2": {
|
2023
|
+
"name": "punctuation.accessor.ts"
|
2024
|
+
},
|
2025
|
+
"3": {
|
2026
|
+
"name": "support.function.math.ts"
|
2027
|
+
},
|
2028
|
+
"4": {
|
2029
|
+
"name": "support.constant.property.math.ts"
|
2030
|
+
}
|
2031
|
+
}
|
2032
|
+
},
|
2033
|
+
{
|
2034
|
+
"match": "(?x)(?<!\\.|\\$)\\b(console)(?:\\s*(\\.)\\s*(\n assert|clear|count|debug|dir|error|group|groupCollapsed|groupEnd|info|log\n |profile|profileEnd|table|time|timeEnd|timeStamp|trace|warn))?\\b(?!\\$)",
|
2035
|
+
"captures": {
|
2036
|
+
"1": {
|
2037
|
+
"name": "support.class.console.ts"
|
2038
|
+
},
|
2039
|
+
"2": {
|
2040
|
+
"name": "punctuation.accessor.ts"
|
2041
|
+
},
|
2042
|
+
"3": {
|
2043
|
+
"name": "support.function.console.ts"
|
2044
|
+
}
|
2045
|
+
}
|
2046
|
+
},
|
2047
|
+
{
|
2048
|
+
"match": "(?<!\\.|\\$)\\b(JSON)(?:\\s*(\\.)\\s*(parse|stringify))?\\b(?!\\$)",
|
2049
|
+
"captures": {
|
2050
|
+
"1": {
|
2051
|
+
"name": "support.constant.json.ts"
|
2052
|
+
},
|
2053
|
+
"2": {
|
2054
|
+
"name": "punctuation.accessor.ts"
|
2055
|
+
},
|
2056
|
+
"3": {
|
2057
|
+
"name": "support.function.json.ts"
|
2058
|
+
}
|
2059
|
+
}
|
2060
|
+
},
|
2061
|
+
{
|
2062
|
+
"match": "(?x) (\\.) \\s* (?:\n (constructor|length|prototype|__proto__) \n |\n (EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY))\\b(?!\\$)",
|
2063
|
+
"captures": {
|
2064
|
+
"1": {
|
2065
|
+
"name": "punctuation.accessor.ts"
|
2066
|
+
},
|
2067
|
+
"2": {
|
2068
|
+
"name": "support.variable.property.ts"
|
2069
|
+
},
|
2070
|
+
"3": {
|
2071
|
+
"name": "support.constant.ts"
|
2072
|
+
}
|
2073
|
+
}
|
2074
|
+
},
|
2075
|
+
{
|
2076
|
+
"match": "(?x) (?<!\\.|\\$) \\b (?:\n (document|event|navigator|performance|screen|window) \n |\n (AnalyserNode|ArrayBufferView|Attr|AudioBuffer|AudioBufferSourceNode|AudioContext|AudioDestinationNode|AudioListener\n |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule\n |CSSCounterStyleRule|CSSGroupingRule|CSSMatrix|CSSMediaRule|CSSPageRule|CSSPrimitiveValue|CSSRule|CSSRuleList|CSSStyleDeclaration\n |CSSStyleRule|CSSStyleSheet|CSSSupportsRule|CSSValue|CSSValueList|CanvasGradient|CanvasImageSource|CanvasPattern\n |CanvasRenderingContext2D|ChannelMergerNode|ChannelSplitterNode|CharacterData|ChromeWorker|CloseEvent|Comment|CompositionEvent\n |Console|ConvolverNode|Coordinates|Credential|CredentialsContainer|Crypto|CryptoKey|CustomEvent|DOMError|DOMException\n |DOMHighResTimeStamp|DOMImplementation|DOMString|DOMStringList|DOMStringMap|DOMTimeStamp|DOMTokenList|DataTransfer\n |DataTransferItem|DataTransferItemList|DedicatedWorkerGlobalScope|DelayNode|DeviceProximityEvent|DirectoryEntry\n |DirectoryEntrySync|DirectoryReader|DirectoryReaderSync|Document|DocumentFragment|DocumentTouch|DocumentType|DragEvent\n |DynamicsCompressorNode|Element|Entry|EntrySync|ErrorEvent|Event|EventListener|EventSource|EventTarget|FederatedCredential\n |FetchEvent|File|FileEntry|FileEntrySync|FileException|FileList|FileReader|FileReaderSync|FileSystem|FileSystemSync\n |FontFace|FormData|GainNode|Gamepad|GamepadButton|GamepadEvent|Geolocation|GlobalEventHandlers|HTMLAnchorElement\n |HTMLAreaElement|HTMLAudioElement|HTMLBRElement|HTMLBaseElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement\n |HTMLCollection|HTMLContentElement|HTMLDListElement|HTMLDataElement|HTMLDataListElement|HTMLDialogElement|HTMLDivElement\n |HTMLDocument|HTMLElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFormControlsCollection|HTMLFormElement\n |HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement\n |HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMediaElement\n |HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement\n |HTMLOptionsCollection|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement\n |HTMLQuoteElement|HTMLScriptElement|HTMLSelectElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement\n |HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement\n |HTMLTableRowElement|HTMLTableSectionElement|HTMLTextAreaElement|HTMLTimeElement|HTMLTitleElement|HTMLTrackElement\n |HTMLUListElement|HTMLUnknownElement|HTMLVideoElement|HashChangeEvent|History|IDBCursor|IDBCursorWithValue|IDBDatabase\n |IDBEnvironment|IDBFactory|IDBIndex|IDBKeyRange|IDBMutableFile|IDBObjectStore|IDBOpenDBRequest|IDBRequest|IDBTransaction\n |IDBVersionChangeEvent|IIRFilterNode|IdentityManager|ImageBitmap|ImageBitmapFactories|ImageData|Index|InputDeviceCapabilities\n |InputEvent|InstallEvent|InstallTrigger|KeyboardEvent|LinkStyle|LocalFileSystem|LocalFileSystemSync|Location|MIDIAccess\n |MIDIConnectionEvent|MIDIInput|MIDIInputMap|MIDIOutputMap|MediaElementAudioSourceNode|MediaError|MediaKeyMessageEvent\n |MediaKeySession|MediaKeyStatusMap|MediaKeySystemAccess|MediaKeySystemConfiguration|MediaKeys|MediaRecorder|MediaStream\n |MediaStreamAudioDestinationNode|MediaStreamAudioSourceNode|MessageChannel|MessageEvent|MessagePort|MouseEvent\n |MutationObserver|MutationRecord|NamedNodeMap|Navigator|NavigatorConcurrentHardware|NavigatorGeolocation|NavigatorID\n |NavigatorLanguage|NavigatorOnLine|Node|NodeFilter|NodeIterator|NodeList|NonDocumentTypeChildNode|Notification\n |OfflineAudioCompletionEvent|OfflineAudioContext|OscillatorNode|PageTransitionEvent|PannerNode|ParentNode|PasswordCredential\n |Path2D|PaymentAddress|PaymentRequest|PaymentResponse|Performance|PerformanceEntry|PerformanceFrameTiming|PerformanceMark\n |PerformanceMeasure|PerformanceNavigation|PerformanceNavigationTiming|PerformanceObserver|PerformanceObserverEntryList\n |PerformanceResourceTiming|PerformanceTiming|PeriodicSyncEvent|PeriodicWave|Plugin|Point|PointerEvent|PopStateEvent\n |PortCollection|Position|PositionError|PositionOptions|PresentationConnectionClosedEvent|PresentationConnectionList\n |PresentationReceiver|ProcessingInstruction|ProgressEvent|PromiseRejectionEvent|PushEvent|PushRegistrationManager\n |RTCCertificate|RTCConfiguration|RTCPeerConnection|RTCSessionDescriptionCallback|RTCStatsReport|RadioNodeList|RandomSource\n |Range|ReadableByteStream|RenderingContext|SVGAElement|SVGAngle|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement\n |SVGAnimateTransformElement|SVGAnimatedAngle|SVGAnimatedBoolean|SVGAnimatedEnumeration|SVGAnimatedInteger|SVGAnimatedLength\n |SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedPoints|SVGAnimatedPreserveAspectRatio\n |SVGAnimatedRect|SVGAnimatedString|SVGAnimatedTransformList|SVGAnimationElement|SVGCircleElement|SVGClipPathElement\n |SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGEvent|SVGFilterElement|SVGFontElement\n |SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement\n |SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGradientElement|SVGHKernElement|SVGImageElement|SVGLength\n |SVGLengthList|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMaskElement|SVGMatrix|SVGMissingGlyphElement\n |SVGNumber|SVGNumberList|SVGPathElement|SVGPatternElement|SVGPoint|SVGPolygonElement|SVGPolylineElement|SVGPreserveAspectRatio\n |SVGRadialGradientElement|SVGRect|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStringList\n |SVGStylable|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTests|SVGTextElement\n |SVGTextPositioningElement|SVGTitleElement|SVGTransform|SVGTransformList|SVGTransformable|SVGUseElement|SVGVKernElement\n |SVGViewElement|ServiceWorker|ServiceWorkerContainer|ServiceWorkerGlobalScope|ServiceWorkerRegistration|ServiceWorkerState\n |ShadowRoot|SharedWorker|SharedWorkerGlobalScope|SourceBufferList|StereoPannerNode|Storage|StorageEvent|StyleSheet\n |StyleSheetList|SubtleCrypto|SyncEvent|Text|TextMetrics|TimeEvent|TimeRanges|Touch|TouchEvent|TouchList|Transferable\n |TreeWalker|UIEvent|USVString|VRDisplayCapabilities|ValidityState|WaveShaperNode|WebGL|WebGLActiveInfo|WebGLBuffer\n |WebGLContextEvent|WebGLFramebuffer|WebGLProgram|WebGLRenderbuffer|WebGLRenderingContext|WebGLShader|WebGLShaderPrecisionFormat\n |WebGLTexture|WebGLTimerQueryEXT|WebGLTransformFeedback|WebGLUniformLocation|WebGLVertexArrayObject|WebGLVertexArrayObjectOES\n |WebSocket|WebSockets|WebVTT|WheelEvent|Window|WindowBase64|WindowEventHandlers|WindowTimers|Worker|WorkerGlobalScope\n |WorkerLocation|WorkerNavigator|XMLHttpRequest|XMLHttpRequestEventTarget|XMLSerializer|XPathExpression|XPathResult\n |XSLTProcessor))\\b(?!\\$)",
|
2077
|
+
"captures": {
|
2078
|
+
"1": {
|
2079
|
+
"name": "support.variable.dom.ts"
|
2080
|
+
},
|
2081
|
+
"2": {
|
2082
|
+
"name": "support.class.dom.ts"
|
2083
|
+
}
|
2084
|
+
}
|
2085
|
+
},
|
2086
|
+
{
|
2087
|
+
"match": "(?x) (\\.) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
2088
|
+
"captures": {
|
2089
|
+
"1": {
|
2090
|
+
"name": "punctuation.accessor.ts"
|
2091
|
+
},
|
2092
|
+
"2": {
|
2093
|
+
"name": "support.constant.dom.ts"
|
2094
|
+
},
|
2095
|
+
"3": {
|
2096
|
+
"name": "support.variable.property.dom.ts"
|
2097
|
+
}
|
2098
|
+
}
|
2099
|
+
},
|
2100
|
+
{
|
2101
|
+
"name": "support.class.node.ts",
|
2102
|
+
"match": "(?x)(?<!\\.|\\$)\\b(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream\n |Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\\b(?!\\$)"
|
2103
|
+
},
|
2104
|
+
{
|
2105
|
+
"name": "support.module.node.ts",
|
2106
|
+
"match": "(?x)(?<!\\.|\\$)\\b(assert|buffer|child_process|cluster|constants|crypto|dgram|dns|domain|events|fs|http|https|net\n |os|path|punycode|querystring|readline|repl|stream|string_decoder|timers|tls|tty|url|util|vm|zlib)\\b(?!\\$)"
|
2107
|
+
},
|
2108
|
+
{
|
2109
|
+
"match": "(?x)(?<!\\.|\\$)\\b(process)(?:(\\.)(?:\n (arch|argv|config|connected|env|execArgv|execPath|exitCode|mainModule|pid|platform|release|stderr|stdin|stdout|title|version|versions)\n |\n (abort|chdir|cwd|disconnect|exit|[sg]ete?[gu]id|send|[sg]etgroups|initgroups|kill|memoryUsage|nextTick|umask|uptime|hrtime)\n))?\\b(?!\\$)",
|
2110
|
+
"captures": {
|
2111
|
+
"1": {
|
2112
|
+
"name": "support.variable.object.process.ts"
|
2113
|
+
},
|
2114
|
+
"2": {
|
2115
|
+
"name": "punctuation.accessor.ts"
|
2116
|
+
},
|
2117
|
+
"3": {
|
2118
|
+
"name": "support.variable.property.process.ts"
|
2119
|
+
},
|
2120
|
+
"4": {
|
2121
|
+
"name": "support.function.process.ts"
|
2122
|
+
}
|
2123
|
+
}
|
2124
|
+
},
|
2125
|
+
{
|
2126
|
+
"match": "(?<!\\.|\\$)\\b(?:(exports)|(module)(?:(\\.)(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)",
|
2127
|
+
"captures": {
|
2128
|
+
"1": {
|
2129
|
+
"name": "support.type.object.module.ts"
|
2130
|
+
},
|
2131
|
+
"2": {
|
2132
|
+
"name": "support.type.object.module.ts"
|
2133
|
+
},
|
2134
|
+
"3": {
|
2135
|
+
"name": "punctuation.accessor.ts"
|
2136
|
+
},
|
2137
|
+
"4": {
|
2138
|
+
"name": "support.type.object.module.ts"
|
2139
|
+
}
|
2140
|
+
}
|
2141
|
+
},
|
2142
|
+
{
|
2143
|
+
"name": "support.variable.object.node.ts",
|
2144
|
+
"match": "(?<!\\.|\\$)\\b(global|GLOBAL|root|__dirname|__filename)\\b(?!\\$)"
|
2145
|
+
},
|
2146
|
+
{
|
2147
|
+
"match": "(?x) (\\.) \\s* \n(?:\n (on(?:Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset|\n Readystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove|\n Before(?:cut|deactivate|unload|update|paste|print|editfocus|activate)|\n Blur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help|\n Change|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate|\n Datasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover|\n Dragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error|\n Errorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort)\n ) |\n (shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\n scrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|\n sup|sub|substr|substring|splice|split|send|set(?:Milliseconds|Seconds|Minutes|Hours|\n Month|Year|FullYear|Date|UTC(?:Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|\n Time|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|\n savePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|\n contextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|\n createEventObject|to(?:GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|\n test|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|\n untaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|\n print|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|\n fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|\n forward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|\n abort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|\n releaseCapture|releaseEvents|go|get(?:Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|\n Time|Date|TimezoneOffset|UTC(?:Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|\n Attention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|\n moveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back\n ) |\n (acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append|\n appendChild|appendData|before|blur|canPlayType|captureStream|\n caretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click|\n cloneContents|cloneNode|cloneRange|close|closest|collapse|\n compareBoundaryPoints|compareDocumentPosition|comparePoint|contains|\n convertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute|\n createAttributeNS|createCaption|createCDATASection|createComment|\n createContextualFragment|createDocument|createDocumentFragment|\n createDocumentType|createElement|createElementNS|createEntityReference|\n createEvent|createExpression|createHTMLDocument|createNodeIterator|\n createNSResolver|createProcessingInstruction|createRange|createShadowRoot|\n createTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete|\n deleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot|\n deleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint|\n enableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen|\n exitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get|\n getAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode|\n getAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads|\n getClientRects|getContext|getDestinationInsertionPoints|getElementById|\n getElementsByClassName|getElementsByName|getElementsByTagName|\n getElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate|\n getVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes|\n hasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement|\n insertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData|\n insertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode|\n isPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI|\n lookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild|\n moveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open|\n parentNode|pause|play|postMessage|prepend|preventDefault|previousNode|\n previousSibling|probablySupportsContext|queryCommandEnabled|\n queryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue|\n querySelector|querySelectorAll|registerContentHandler|registerElement|\n registerProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute|\n removeAttributeNode|removeAttributeNS|removeChild|removeEventListener|\n removeItem|replace|replaceChild|replaceData|replaceWith|reportValidity|\n requestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView|\n scrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute|\n setAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture|\n setCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem|\n setRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore|\n slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation|\n submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob|\n toDataURL|toggle|toString|values|write|writeln\n )\n)(?=\\s*\\()",
|
2148
|
+
"captures": {
|
2149
|
+
"1": {
|
2150
|
+
"name": "punctuation.accessor.ts"
|
2151
|
+
},
|
2152
|
+
"2": {
|
2153
|
+
"name": "support.function.event-handler.ts"
|
2154
|
+
},
|
2155
|
+
"3": {
|
2156
|
+
"name": "support.function.ts"
|
2157
|
+
},
|
2158
|
+
"4": {
|
2159
|
+
"name": "support.function.dom.ts"
|
2160
|
+
}
|
2161
|
+
}
|
2162
|
+
}
|
2163
|
+
]
|
2164
|
+
},
|
2165
|
+
"function-call": {
|
2166
|
+
"begin": "(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
2167
|
+
"beginCaptures": {
|
2168
|
+
"1": {
|
2169
|
+
"name": "punctuation.accessor.ts"
|
2170
|
+
},
|
2171
|
+
"2": {
|
2172
|
+
"name": "entity.name.function.ts"
|
2173
|
+
}
|
2174
|
+
},
|
2175
|
+
"end": "(?<=\\))",
|
845
2176
|
"patterns": [
|
846
2177
|
{
|
847
|
-
"
|
848
|
-
|
2178
|
+
"include": "#comment"
|
2179
|
+
},
|
2180
|
+
{
|
2181
|
+
"name": "meta.type.parameters.ts",
|
2182
|
+
"begin": "\\<",
|
2183
|
+
"beginCaptures": {
|
2184
|
+
"0": {
|
2185
|
+
"name": "punctuation.definition.typeparameters.begin.ts"
|
2186
|
+
}
|
2187
|
+
},
|
2188
|
+
"end": "\\>",
|
2189
|
+
"endCaptures": {
|
2190
|
+
"0": {
|
2191
|
+
"name": "punctuation.definition.typeparameters.end.ts"
|
2192
|
+
}
|
2193
|
+
},
|
2194
|
+
"patterns": [
|
2195
|
+
{
|
2196
|
+
"include": "#type"
|
2197
|
+
},
|
2198
|
+
{
|
2199
|
+
"include": "#punctuation-comma"
|
2200
|
+
}
|
2201
|
+
]
|
849
2202
|
},
|
850
2203
|
{
|
851
|
-
"
|
852
|
-
"name": "constant.character.class.ts"
|
2204
|
+
"include": "#paren-expression"
|
853
2205
|
}
|
854
2206
|
]
|
855
2207
|
},
|
856
|
-
"
|
857
|
-
"
|
858
|
-
|
2208
|
+
"identifiers": {
|
2209
|
+
"patterns": [
|
2210
|
+
{
|
2211
|
+
"name": "support.class.ts",
|
2212
|
+
"match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\.\\s*prototype\\b(?!\\$))"
|
2213
|
+
},
|
2214
|
+
{
|
2215
|
+
"match": "(?x)(\\.)\\s*(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
|
2216
|
+
"captures": {
|
2217
|
+
"1": {
|
2218
|
+
"name": "punctuation.accessor.ts"
|
2219
|
+
},
|
2220
|
+
"2": {
|
2221
|
+
"name": "constant.other.object.property.ts"
|
2222
|
+
},
|
2223
|
+
"3": {
|
2224
|
+
"name": "variable.other.object.property.ts"
|
2225
|
+
}
|
2226
|
+
}
|
2227
|
+
},
|
2228
|
+
{
|
2229
|
+
"match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*( (async\\s+)|(function\\s+)| ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)| ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)))",
|
2230
|
+
"captures": {
|
2231
|
+
"1": {
|
2232
|
+
"name": "punctuation.accessor.ts"
|
2233
|
+
},
|
2234
|
+
"2": {
|
2235
|
+
"name": "entity.name.function.ts"
|
2236
|
+
}
|
2237
|
+
}
|
2238
|
+
},
|
2239
|
+
{
|
2240
|
+
"match": "(\\.)\\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
|
2241
|
+
"captures": {
|
2242
|
+
"1": {
|
2243
|
+
"name": "punctuation.accessor.ts"
|
2244
|
+
},
|
2245
|
+
"2": {
|
2246
|
+
"name": "constant.other.property.ts"
|
2247
|
+
}
|
2248
|
+
}
|
2249
|
+
},
|
2250
|
+
{
|
2251
|
+
"match": "(\\.)\\s*([_$[:alpha:]][_$[:alnum:]]*)",
|
2252
|
+
"captures": {
|
2253
|
+
"1": {
|
2254
|
+
"name": "punctuation.accessor.ts"
|
2255
|
+
},
|
2256
|
+
"2": {
|
2257
|
+
"name": "variable.other.property.ts"
|
2258
|
+
}
|
2259
|
+
}
|
2260
|
+
},
|
2261
|
+
{
|
2262
|
+
"match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
|
2263
|
+
"captures": {
|
2264
|
+
"1": {
|
2265
|
+
"name": "constant.other.object.ts"
|
2266
|
+
},
|
2267
|
+
"2": {
|
2268
|
+
"name": "variable.other.object.ts"
|
2269
|
+
}
|
2270
|
+
}
|
2271
|
+
},
|
2272
|
+
{
|
2273
|
+
"name": "constant.other.ts",
|
2274
|
+
"match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
|
2275
|
+
},
|
2276
|
+
{
|
2277
|
+
"name": "variable.other.readwrite.ts",
|
2278
|
+
"match": "[_$[:alpha:]][_$[:alnum:]]*"
|
2279
|
+
}
|
2280
|
+
]
|
859
2281
|
},
|
860
|
-
"
|
861
|
-
"
|
862
|
-
"
|
863
|
-
"
|
2282
|
+
"cast": {
|
2283
|
+
"name": "cast.expr.ts",
|
2284
|
+
"begin": "(?:(?<=return|throw|yield|await|default|[=(,:>*]))\\s*(<)(?!<?\\=)",
|
2285
|
+
"beginCaptures": {
|
2286
|
+
"1": {
|
2287
|
+
"name": "meta.brace.angle.ts"
|
2288
|
+
}
|
2289
|
+
},
|
2290
|
+
"end": ">",
|
2291
|
+
"endCaptures": {
|
2292
|
+
"0": {
|
2293
|
+
"name": "meta.brace.angle.ts"
|
2294
|
+
}
|
2295
|
+
},
|
864
2296
|
"patterns": [
|
865
2297
|
{
|
866
2298
|
"include": "#type"
|
867
2299
|
}
|
868
2300
|
]
|
869
2301
|
},
|
870
|
-
"
|
871
|
-
"
|
872
|
-
"
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
2302
|
+
"new-expr": {
|
2303
|
+
"name": "new.expr.ts",
|
2304
|
+
"begin": "(?<!\\.|\\$)\\b(new)\\b(?!\\$)",
|
2305
|
+
"beginCaptures": {
|
2306
|
+
"1": {
|
2307
|
+
"name": "keyword.operator.new.ts"
|
2308
|
+
}
|
2309
|
+
},
|
2310
|
+
"end": "(?<=\\))|(?=[;),]|$|((?<!\\.|\\$)\\bnew\\b(?!\\$)))",
|
2311
|
+
"patterns": [
|
2312
|
+
{
|
2313
|
+
"include": "#paren-expression"
|
2314
|
+
},
|
2315
|
+
{
|
2316
|
+
"include": "#type"
|
2317
|
+
}
|
2318
|
+
]
|
877
2319
|
},
|
878
|
-
"
|
879
|
-
"name": "string.ts",
|
2320
|
+
"object-member": {
|
880
2321
|
"patterns": [
|
881
2322
|
{
|
882
|
-
"include": "#
|
2323
|
+
"include": "#comment"
|
883
2324
|
},
|
884
2325
|
{
|
885
|
-
"include": "#
|
2326
|
+
"include": "#method-declaration"
|
2327
|
+
},
|
2328
|
+
{
|
2329
|
+
"name": "meta.object.member.ts",
|
2330
|
+
"begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[[^\\]]*\\]))\\s*:)",
|
2331
|
+
"end": "(?=,|\\})",
|
2332
|
+
"patterns": [
|
2333
|
+
{
|
2334
|
+
"name": "meta.object-literal.key.ts",
|
2335
|
+
"begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[[^\\]]*\\]))\\s*:)",
|
2336
|
+
"end": ":",
|
2337
|
+
"endCaptures": {
|
2338
|
+
"0": {
|
2339
|
+
"name": "punctuation.separator.key-value.ts"
|
2340
|
+
}
|
2341
|
+
},
|
2342
|
+
"patterns": [
|
2343
|
+
{
|
2344
|
+
"include": "#string"
|
2345
|
+
},
|
2346
|
+
{
|
2347
|
+
"include": "#array-literal"
|
2348
|
+
}
|
2349
|
+
]
|
2350
|
+
},
|
2351
|
+
{
|
2352
|
+
"include": "#expression"
|
2353
|
+
}
|
2354
|
+
]
|
2355
|
+
},
|
2356
|
+
{
|
2357
|
+
"name": "meta.object.member.ts",
|
2358
|
+
"begin": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*( (async\\s+)|(function\\s+)| ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)| ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))))",
|
2359
|
+
"beginCaptures": {
|
2360
|
+
"0": {
|
2361
|
+
"name": "meta.object-literal.key.ts"
|
2362
|
+
},
|
2363
|
+
"1": {
|
2364
|
+
"name": "entity.name.function.ts"
|
2365
|
+
},
|
2366
|
+
"2": {
|
2367
|
+
"name": "punctuation.separator.key-value.ts"
|
2368
|
+
}
|
2369
|
+
},
|
2370
|
+
"end": "(?=,|\\})",
|
2371
|
+
"patterns": [
|
2372
|
+
{
|
2373
|
+
"include": "#expression"
|
2374
|
+
}
|
2375
|
+
]
|
2376
|
+
},
|
2377
|
+
{
|
2378
|
+
"name": "meta.object.member.ts",
|
2379
|
+
"begin": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
|
2380
|
+
"beginCaptures": {
|
2381
|
+
"0": {
|
2382
|
+
"name": "meta.object-literal.key.ts"
|
2383
|
+
},
|
2384
|
+
"1": {
|
2385
|
+
"name": "punctuation.separator.key-value.ts"
|
2386
|
+
}
|
2387
|
+
},
|
2388
|
+
"end": "(?=,|\\})",
|
2389
|
+
"patterns": [
|
2390
|
+
{
|
2391
|
+
"include": "#expression"
|
2392
|
+
}
|
2393
|
+
]
|
2394
|
+
},
|
2395
|
+
{
|
2396
|
+
"name": "meta.object.member.ts",
|
2397
|
+
"begin": "\\.\\.\\.",
|
2398
|
+
"beginCaptures": {
|
2399
|
+
"0": {
|
2400
|
+
"name": "keyword.operator.spread.ts"
|
2401
|
+
}
|
2402
|
+
},
|
2403
|
+
"end": "(?=,|\\})",
|
2404
|
+
"patterns": [
|
2405
|
+
{
|
2406
|
+
"include": "#expression"
|
2407
|
+
}
|
2408
|
+
]
|
2409
|
+
},
|
2410
|
+
{
|
2411
|
+
"name": "meta.object.member.ts",
|
2412
|
+
"match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$)",
|
2413
|
+
"captures": {
|
2414
|
+
"1": {
|
2415
|
+
"name": "variable.other.readwrite.ts"
|
2416
|
+
}
|
2417
|
+
}
|
2418
|
+
},
|
2419
|
+
{
|
2420
|
+
"include": "#punctuation-comma"
|
886
2421
|
}
|
887
2422
|
]
|
888
2423
|
},
|
889
|
-
"
|
890
|
-
"
|
891
|
-
|
2424
|
+
"expression-operators": {
|
2425
|
+
"patterns": [
|
2426
|
+
{
|
2427
|
+
"name": "keyword.control.flow.ts",
|
2428
|
+
"match": "(?<!\\.|\\$)\\b(await)\\b(?!\\$)"
|
2429
|
+
},
|
2430
|
+
{
|
2431
|
+
"name": "keyword.operator.expression.delete.ts",
|
2432
|
+
"match": "(?<!\\.|\\$)\\bdelete\\b(?!\\$)"
|
2433
|
+
},
|
2434
|
+
{
|
2435
|
+
"name": "keyword.operator.expression.in.ts",
|
2436
|
+
"match": "(?<!\\.|\\$)\\bin\\b(?!\\$)"
|
2437
|
+
},
|
2438
|
+
{
|
2439
|
+
"name": "keyword.operator.expression.of.ts",
|
2440
|
+
"match": "(?<!\\.|\\$)\\bof\\b(?!\\$)"
|
2441
|
+
},
|
2442
|
+
{
|
2443
|
+
"name": "keyword.operator.expression.instanceof.ts",
|
2444
|
+
"match": "(?<!\\.|\\$)\\binstanceof\\b(?!\\$)"
|
2445
|
+
},
|
2446
|
+
{
|
2447
|
+
"name": "keyword.operator.new.ts",
|
2448
|
+
"match": "(?<!\\.|\\$)\\bnew\\b(?!\\$)"
|
2449
|
+
},
|
2450
|
+
{
|
2451
|
+
"include": "#typeof-operator"
|
2452
|
+
},
|
2453
|
+
{
|
2454
|
+
"name": "keyword.operator.expression.void.ts",
|
2455
|
+
"match": "(?<!\\.|\\$)\\bvoid\\b(?!\\$)"
|
2456
|
+
},
|
2457
|
+
{
|
2458
|
+
"begin": "(?<!\\.|\\$)\\bas\\b(?!\\$)",
|
2459
|
+
"beginCaptures": {
|
2460
|
+
"0": {
|
2461
|
+
"name": "keyword.control.as.ts"
|
2462
|
+
}
|
2463
|
+
},
|
2464
|
+
"end": "(?=$|[;,:})\\]])",
|
2465
|
+
"patterns": [
|
2466
|
+
{
|
2467
|
+
"include": "#type"
|
2468
|
+
}
|
2469
|
+
]
|
2470
|
+
},
|
2471
|
+
{
|
2472
|
+
"name": "keyword.operator.spread.ts",
|
2473
|
+
"match": "\\.\\.\\."
|
2474
|
+
},
|
2475
|
+
{
|
2476
|
+
"name": "keyword.operator.assignment.compound.ts",
|
2477
|
+
"match": "\\*=|(?<!\\()/=|%=|\\+=|\\-="
|
2478
|
+
},
|
2479
|
+
{
|
2480
|
+
"name": "keyword.operator.assignment.compound.bitwise.ts",
|
2481
|
+
"match": "\\&=|\\^=|<<=|>>=|>>>=|\\|="
|
2482
|
+
},
|
2483
|
+
{
|
2484
|
+
"name": "keyword.operator.bitwise.shift.ts",
|
2485
|
+
"match": "<<|>>>|>>"
|
2486
|
+
},
|
2487
|
+
{
|
2488
|
+
"name": "keyword.operator.comparison.ts",
|
2489
|
+
"match": "===|!==|==|!="
|
2490
|
+
},
|
2491
|
+
{
|
2492
|
+
"name": "keyword.operator.relational.ts",
|
2493
|
+
"match": "<=|>=|<>|<|>"
|
2494
|
+
},
|
2495
|
+
{
|
2496
|
+
"name": "keyword.operator.logical.ts",
|
2497
|
+
"match": "\\!|&&|\\|\\|"
|
2498
|
+
},
|
2499
|
+
{
|
2500
|
+
"name": "keyword.operator.bitwise.ts",
|
2501
|
+
"match": "\\&|~|\\^|\\|"
|
2502
|
+
},
|
2503
|
+
{
|
2504
|
+
"name": "keyword.operator.assignment.ts",
|
2505
|
+
"match": "\\="
|
2506
|
+
},
|
2507
|
+
{
|
2508
|
+
"name": "keyword.operator.decrement.ts",
|
2509
|
+
"match": "--"
|
2510
|
+
},
|
2511
|
+
{
|
2512
|
+
"name": "keyword.operator.increment.ts",
|
2513
|
+
"match": "\\+\\+"
|
2514
|
+
},
|
2515
|
+
{
|
2516
|
+
"name": "keyword.operator.arithmetic.ts",
|
2517
|
+
"match": "%|\\*|/|-|\\+"
|
2518
|
+
}
|
2519
|
+
]
|
892
2520
|
},
|
893
|
-
"
|
894
|
-
"
|
895
|
-
"
|
896
|
-
|
2521
|
+
"typeof-operator": {
|
2522
|
+
"name": "keyword.operator.expression.typeof.ts",
|
2523
|
+
"match": "(?<!\\.|\\$)\\btypeof\\b(?!\\$)"
|
2524
|
+
},
|
2525
|
+
"arrow-function": {
|
897
2526
|
"patterns": [
|
898
2527
|
{
|
899
|
-
"
|
2528
|
+
"name": "meta.arrow.ts",
|
2529
|
+
"match": "(?<!\\.|\\$)(\\basync)(?=\\s*[<(])",
|
2530
|
+
"captures": {
|
2531
|
+
"1": {
|
2532
|
+
"name": "storage.modifier.async.ts"
|
2533
|
+
}
|
2534
|
+
}
|
2535
|
+
},
|
2536
|
+
{
|
2537
|
+
"name": "meta.arrow.ts",
|
2538
|
+
"match": "(?:(?<!\\.|\\$)(\\basync)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)",
|
2539
|
+
"captures": {
|
2540
|
+
"1": {
|
2541
|
+
"name": "storage.modifier.async.ts"
|
2542
|
+
},
|
2543
|
+
"2": {
|
2544
|
+
"name": "variable.parameter.ts"
|
2545
|
+
}
|
2546
|
+
}
|
2547
|
+
},
|
2548
|
+
{
|
2549
|
+
"name": "meta.arrow.ts",
|
2550
|
+
"begin": "(?x)\\s*(?=(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)",
|
2551
|
+
"end": "(?==>)",
|
2552
|
+
"patterns": [
|
2553
|
+
{
|
2554
|
+
"include": "#comment"
|
2555
|
+
},
|
2556
|
+
{
|
2557
|
+
"include": "#type-parameters"
|
2558
|
+
},
|
2559
|
+
{
|
2560
|
+
"include": "#function-parameters"
|
2561
|
+
},
|
2562
|
+
{
|
2563
|
+
"include": "#arrow-return-type"
|
2564
|
+
}
|
2565
|
+
]
|
2566
|
+
},
|
2567
|
+
{
|
2568
|
+
"name": "meta.arrow.ts",
|
2569
|
+
"begin": "=>",
|
2570
|
+
"beginCaptures": {
|
2571
|
+
"0": {
|
2572
|
+
"name": "storage.type.function.arrow.ts"
|
2573
|
+
}
|
2574
|
+
},
|
2575
|
+
"end": "(?<=\\})|((?!\\{)(?=\\S))",
|
2576
|
+
"patterns": [
|
2577
|
+
{
|
2578
|
+
"include": "#decl-block"
|
2579
|
+
},
|
2580
|
+
{
|
2581
|
+
"include": "#expression"
|
2582
|
+
}
|
2583
|
+
]
|
900
2584
|
}
|
901
2585
|
]
|
902
2586
|
},
|
903
|
-
"
|
904
|
-
"
|
2587
|
+
"arrow-return-type": {
|
2588
|
+
"name": "meta.return.type.arrow.ts",
|
2589
|
+
"begin": "(?<=\\))\\s*(:)",
|
905
2590
|
"beginCaptures": {
|
906
2591
|
"1": {
|
907
|
-
"name": "keyword.
|
2592
|
+
"name": "keyword.operator.type.annotation.ts"
|
908
2593
|
}
|
909
2594
|
},
|
910
|
-
"end": "
|
911
|
-
"name": "switch-expression.expr.ts",
|
912
|
-
"patterns": [
|
913
|
-
{
|
914
|
-
"include": "#expression"
|
915
|
-
}
|
916
|
-
]
|
917
|
-
},
|
918
|
-
"switch-statement": {
|
919
|
-
"begin": "(?=\\bswitch\\b\\s*\\()",
|
920
|
-
"end": "}",
|
921
|
-
"name": "switch-statement.expr.ts",
|
2595
|
+
"end": "(?<!:)((?=$)|(?==>|;|//))",
|
922
2596
|
"patterns": [
|
923
2597
|
{
|
924
|
-
"include": "#
|
2598
|
+
"include": "#type-predicate-operator"
|
925
2599
|
},
|
926
2600
|
{
|
927
|
-
"include": "#
|
2601
|
+
"include": "#type"
|
928
2602
|
}
|
929
2603
|
]
|
930
2604
|
},
|
931
|
-
"
|
932
|
-
"
|
2605
|
+
"punctuation-comma": {
|
2606
|
+
"name": "punctuation.separator.comma.ts",
|
2607
|
+
"match": ","
|
2608
|
+
},
|
2609
|
+
"punctuation-semicolon": {
|
2610
|
+
"name": "punctuation.terminator.statement.ts",
|
2611
|
+
"match": ";"
|
2612
|
+
},
|
2613
|
+
"punctuation-accessor": {
|
2614
|
+
"name": "punctuation.accessor.ts",
|
2615
|
+
"match": "\\."
|
2616
|
+
},
|
2617
|
+
"paren-expression": {
|
2618
|
+
"begin": "\\(",
|
933
2619
|
"beginCaptures": {
|
934
2620
|
"0": {
|
935
|
-
"name": "
|
2621
|
+
"name": "meta.brace.round.ts"
|
936
2622
|
}
|
937
2623
|
},
|
938
|
-
"end": "
|
2624
|
+
"end": "\\)",
|
939
2625
|
"endCaptures": {
|
940
2626
|
"0": {
|
941
|
-
"name": "
|
2627
|
+
"name": "meta.brace.round.ts"
|
942
2628
|
}
|
943
2629
|
},
|
944
|
-
"name": "meta.template.ts",
|
945
2630
|
"patterns": [
|
946
2631
|
{
|
947
|
-
"include": "#
|
2632
|
+
"include": "#expression"
|
948
2633
|
},
|
949
2634
|
{
|
950
|
-
"include": "#
|
2635
|
+
"include": "#punctuation-comma"
|
951
2636
|
}
|
952
2637
|
]
|
953
2638
|
},
|
954
|
-
"
|
955
|
-
"
|
956
|
-
"
|
957
|
-
"
|
2639
|
+
"qstring-double": {
|
2640
|
+
"name": "string.quoted.double.ts",
|
2641
|
+
"begin": "\"",
|
2642
|
+
"beginCaptures": {
|
2643
|
+
"0": {
|
2644
|
+
"name": "punctuation.definition.string.begin.ts"
|
2645
|
+
}
|
2646
|
+
},
|
2647
|
+
"end": "(\")|((?:[^\\\\\\n])$)",
|
2648
|
+
"endCaptures": {
|
2649
|
+
"1": {
|
2650
|
+
"name": "punctuation.definition.string.end.ts"
|
2651
|
+
},
|
2652
|
+
"2": {
|
2653
|
+
"name": "invalid.illegal.newline.ts"
|
2654
|
+
}
|
2655
|
+
},
|
958
2656
|
"patterns": [
|
959
2657
|
{
|
960
2658
|
"include": "#string-character-escape"
|
961
2659
|
}
|
962
2660
|
]
|
963
2661
|
},
|
964
|
-
"
|
965
|
-
"
|
2662
|
+
"qstring-single": {
|
2663
|
+
"name": "string.quoted.single.ts",
|
2664
|
+
"begin": "'",
|
966
2665
|
"beginCaptures": {
|
967
2666
|
"0": {
|
968
|
-
"name": "
|
2667
|
+
"name": "punctuation.definition.string.begin.ts"
|
969
2668
|
}
|
970
2669
|
},
|
971
|
-
"end": "\\
|
2670
|
+
"end": "(\\')|((?:[^\\\\\\n])$)",
|
972
2671
|
"endCaptures": {
|
973
|
-
"
|
974
|
-
"name": "
|
2672
|
+
"1": {
|
2673
|
+
"name": "punctuation.definition.string.end.ts"
|
2674
|
+
},
|
2675
|
+
"2": {
|
2676
|
+
"name": "invalid.illegal.newline.ts"
|
975
2677
|
}
|
976
2678
|
},
|
977
|
-
"name": "template.element.ts",
|
978
2679
|
"patterns": [
|
979
2680
|
{
|
980
|
-
"include": "#
|
2681
|
+
"include": "#string-character-escape"
|
981
2682
|
}
|
982
2683
|
]
|
983
2684
|
},
|
984
|
-
"
|
985
|
-
"begin": "(?=\\?)",
|
986
|
-
"end": "(?=$|[;,])",
|
2685
|
+
"regex": {
|
987
2686
|
"patterns": [
|
988
2687
|
{
|
989
|
-
"
|
990
|
-
|
991
|
-
|
992
|
-
|
2688
|
+
"name": "string.regex.ts",
|
2689
|
+
"begin": "(?<=[=(:,\\[?+!]|return|case|=>|&&|\\|\\||\\*\\/)\\s*(/)(?![/*+?])(?=.*/)",
|
2690
|
+
"beginCaptures": {
|
2691
|
+
"1": {
|
2692
|
+
"name": "punctuation.definition.string.begin.ts"
|
2693
|
+
}
|
2694
|
+
},
|
2695
|
+
"end": "(/)([gimuy]*)",
|
2696
|
+
"endCaptures": {
|
2697
|
+
"1": {
|
2698
|
+
"name": "punctuation.definition.string.end.ts"
|
2699
|
+
},
|
2700
|
+
"2": {
|
2701
|
+
"name": "keyword.other.ts"
|
2702
|
+
}
|
2703
|
+
},
|
2704
|
+
"patterns": [
|
2705
|
+
{
|
2706
|
+
"include": "#regexp"
|
2707
|
+
}
|
2708
|
+
]
|
2709
|
+
},
|
2710
|
+
{
|
2711
|
+
"name": "string.regex.ts",
|
2712
|
+
"begin": "/(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
|
2713
|
+
"beginCaptures": {
|
2714
|
+
"0": {
|
2715
|
+
"name": "punctuation.definition.string.begin.ts"
|
2716
|
+
}
|
2717
|
+
},
|
2718
|
+
"end": "(/)([gimuy]*)",
|
2719
|
+
"endCaptures": {
|
2720
|
+
"1": {
|
2721
|
+
"name": "punctuation.definition.string.end.ts"
|
2722
|
+
},
|
2723
|
+
"2": {
|
2724
|
+
"name": "keyword.other.ts"
|
2725
|
+
}
|
2726
|
+
},
|
2727
|
+
"patterns": [
|
2728
|
+
{
|
2729
|
+
"include": "#regexp"
|
2730
|
+
}
|
2731
|
+
]
|
993
2732
|
}
|
994
2733
|
]
|
995
2734
|
},
|
996
|
-
"
|
997
|
-
"begin": "(\\?)",
|
998
|
-
"end": "(:)",
|
2735
|
+
"regexp": {
|
999
2736
|
"patterns": [
|
1000
2737
|
{
|
1001
|
-
"
|
2738
|
+
"name": "keyword.control.anchor.regexp",
|
2739
|
+
"match": "\\\\[bB]|\\^|\\$"
|
2740
|
+
},
|
2741
|
+
{
|
2742
|
+
"name": "keyword.other.back-reference.regexp",
|
2743
|
+
"match": "\\\\[1-9]\\d*"
|
2744
|
+
},
|
2745
|
+
{
|
2746
|
+
"name": "keyword.operator.quantifier.regexp",
|
2747
|
+
"match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
|
2748
|
+
},
|
2749
|
+
{
|
2750
|
+
"name": "keyword.operator.or.regexp",
|
2751
|
+
"match": "\\|"
|
2752
|
+
},
|
2753
|
+
{
|
2754
|
+
"name": "meta.group.assertion.regexp",
|
2755
|
+
"begin": "(\\()((\\?=)|(\\?!))",
|
2756
|
+
"beginCaptures": {
|
2757
|
+
"1": {
|
2758
|
+
"name": "punctuation.definition.group.regexp"
|
2759
|
+
},
|
2760
|
+
"2": {
|
2761
|
+
"name": "punctuation.definition.group.assertion.regexp"
|
2762
|
+
},
|
2763
|
+
"3": {
|
2764
|
+
"name": "meta.assertion.look-ahead.regexp"
|
2765
|
+
},
|
2766
|
+
"4": {
|
2767
|
+
"name": "meta.assertion.negative-look-ahead.regexp"
|
2768
|
+
}
|
2769
|
+
},
|
2770
|
+
"end": "(\\))",
|
2771
|
+
"endCaptures": {
|
2772
|
+
"1": {
|
2773
|
+
"name": "punctuation.definition.group.regexp"
|
2774
|
+
}
|
2775
|
+
},
|
2776
|
+
"patterns": [
|
2777
|
+
{
|
2778
|
+
"include": "#regexp"
|
2779
|
+
}
|
2780
|
+
]
|
2781
|
+
},
|
2782
|
+
{
|
2783
|
+
"name": "meta.group.regexp",
|
2784
|
+
"begin": "\\((\\?:)?",
|
2785
|
+
"beginCaptures": {
|
2786
|
+
"0": {
|
2787
|
+
"name": "punctuation.definition.group.regexp"
|
2788
|
+
},
|
2789
|
+
"1": {
|
2790
|
+
"name": "punctuation.definition.group.capture.regexp"
|
2791
|
+
}
|
2792
|
+
},
|
2793
|
+
"end": "\\)",
|
2794
|
+
"endCaptures": {
|
2795
|
+
"0": {
|
2796
|
+
"name": "punctuation.definition.group.regexp"
|
2797
|
+
}
|
2798
|
+
},
|
2799
|
+
"patterns": [
|
2800
|
+
{
|
2801
|
+
"include": "#regexp"
|
2802
|
+
}
|
2803
|
+
]
|
2804
|
+
},
|
2805
|
+
{
|
2806
|
+
"name": "constant.other.character-class.set.regexp",
|
2807
|
+
"begin": "(\\[)(\\^)?",
|
2808
|
+
"beginCaptures": {
|
2809
|
+
"1": {
|
2810
|
+
"name": "punctuation.definition.character-class.regexp"
|
2811
|
+
},
|
2812
|
+
"2": {
|
2813
|
+
"name": "keyword.operator.negation.regexp"
|
2814
|
+
}
|
2815
|
+
},
|
2816
|
+
"end": "(\\])",
|
2817
|
+
"endCaptures": {
|
2818
|
+
"1": {
|
2819
|
+
"name": "punctuation.definition.character-class.regexp"
|
2820
|
+
}
|
2821
|
+
},
|
2822
|
+
"patterns": [
|
2823
|
+
{
|
2824
|
+
"name": "constant.other.character-class.range.regexp",
|
2825
|
+
"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])|(\\\\.))",
|
2826
|
+
"captures": {
|
2827
|
+
"1": {
|
2828
|
+
"name": "constant.character.numeric.regexp"
|
2829
|
+
},
|
2830
|
+
"2": {
|
2831
|
+
"name": "constant.character.control.regexp"
|
2832
|
+
},
|
2833
|
+
"3": {
|
2834
|
+
"name": "constant.character.escape.backslash.regexp"
|
2835
|
+
},
|
2836
|
+
"4": {
|
2837
|
+
"name": "constant.character.numeric.regexp"
|
2838
|
+
},
|
2839
|
+
"5": {
|
2840
|
+
"name": "constant.character.control.regexp"
|
2841
|
+
},
|
2842
|
+
"6": {
|
2843
|
+
"name": "constant.character.escape.backslash.regexp"
|
2844
|
+
}
|
2845
|
+
}
|
2846
|
+
},
|
2847
|
+
{
|
2848
|
+
"include": "#regex-character-class"
|
2849
|
+
}
|
2850
|
+
]
|
2851
|
+
},
|
2852
|
+
{
|
2853
|
+
"include": "#regex-character-class"
|
1002
2854
|
}
|
1003
2855
|
]
|
1004
2856
|
},
|
1005
|
-
"
|
1006
|
-
"match": "\\b(this)\\b",
|
1007
|
-
"name": "constant.language.this.ts"
|
1008
|
-
},
|
1009
|
-
"type": {
|
1010
|
-
"name": "meta.type.ts",
|
2857
|
+
"regex-character-class": {
|
1011
2858
|
"patterns": [
|
1012
2859
|
{
|
1013
|
-
"
|
1014
|
-
|
1015
|
-
{
|
1016
|
-
"include": "#type-parameters"
|
1017
|
-
},
|
1018
|
-
{
|
1019
|
-
"include": "#type-tuple"
|
1020
|
-
},
|
1021
|
-
{
|
1022
|
-
"include": "#type-object"
|
2860
|
+
"name": "constant.other.character-class.regexp",
|
2861
|
+
"match": "\\\\[wWsSdDtrnvf]|\\."
|
1023
2862
|
},
|
1024
2863
|
{
|
1025
|
-
"
|
2864
|
+
"name": "constant.character.numeric.regexp",
|
2865
|
+
"match": "\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)"
|
1026
2866
|
},
|
1027
2867
|
{
|
1028
|
-
"
|
2868
|
+
"name": "constant.character.control.regexp",
|
2869
|
+
"match": "\\\\c[A-Z]"
|
1029
2870
|
},
|
1030
2871
|
{
|
1031
|
-
"
|
1032
|
-
|
1033
|
-
{
|
1034
|
-
"include": "#type-name"
|
2872
|
+
"name": "constant.character.escape.backslash.regexp",
|
2873
|
+
"match": "\\\\."
|
1035
2874
|
}
|
1036
2875
|
]
|
1037
2876
|
},
|
1038
|
-
"
|
1039
|
-
"
|
1040
|
-
"end": "(?=$|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[a-zA-Z_$])\\s*(?=\\{)",
|
1041
|
-
"name": "meta.type.annotation.ts",
|
2877
|
+
"string": {
|
2878
|
+
"name": "string.ts",
|
1042
2879
|
"patterns": [
|
1043
2880
|
{
|
1044
|
-
"include": "#
|
1045
|
-
},
|
1046
|
-
{
|
1047
|
-
"include": "#type"
|
1048
|
-
},
|
1049
|
-
{
|
1050
|
-
"include": "#string"
|
2881
|
+
"include": "#qstring-single"
|
1051
2882
|
},
|
1052
2883
|
{
|
1053
|
-
"include": "#
|
2884
|
+
"include": "#qstring-double"
|
1054
2885
|
}
|
1055
2886
|
]
|
1056
2887
|
},
|
1057
|
-
"
|
1058
|
-
"
|
2888
|
+
"template": {
|
2889
|
+
"name": "string.template.ts",
|
2890
|
+
"begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
|
1059
2891
|
"beginCaptures": {
|
1060
2892
|
"1": {
|
1061
|
-
"name": "
|
2893
|
+
"name": "entity.name.function.tagged-template.ts"
|
1062
2894
|
},
|
1063
2895
|
"2": {
|
1064
|
-
"name": "
|
2896
|
+
"name": "punctuation.definition.string.template.begin.ts"
|
1065
2897
|
}
|
1066
2898
|
},
|
1067
|
-
"end": "
|
1068
|
-
"
|
1069
|
-
"patterns": [
|
1070
|
-
{
|
1071
|
-
"include": "#type-parameters"
|
1072
|
-
},
|
1073
|
-
{
|
1074
|
-
"include": "#type"
|
1075
|
-
},
|
1076
|
-
{
|
1077
|
-
"match": "=\\s*",
|
1078
|
-
"name": "keyword.operator.comparison.ts"
|
1079
|
-
}
|
1080
|
-
]
|
1081
|
-
},
|
1082
|
-
"type-function-return-type": {
|
1083
|
-
"begin": "=>",
|
1084
|
-
"beginCaptures": {
|
2899
|
+
"end": "`",
|
2900
|
+
"endCaptures": {
|
1085
2901
|
"0": {
|
1086
|
-
"name": "
|
2902
|
+
"name": "punctuation.definition.string.template.end.ts"
|
1087
2903
|
}
|
1088
2904
|
},
|
1089
|
-
"end": "(?=\\s*[,\\)\\{=;>]|//|$)",
|
1090
|
-
"name": "meta.type.function.return.ts",
|
1091
2905
|
"patterns": [
|
1092
2906
|
{
|
1093
|
-
"include": "#
|
2907
|
+
"include": "#template-substitution-element"
|
2908
|
+
},
|
2909
|
+
{
|
2910
|
+
"include": "#string-character-escape"
|
1094
2911
|
}
|
1095
2912
|
]
|
1096
2913
|
},
|
1097
|
-
"
|
1098
|
-
"
|
1099
|
-
|
1100
|
-
"name": "entity.name.type.ts"
|
1101
|
-
}
|
1102
|
-
},
|
1103
|
-
"match": "[a-zA-Z_$][.\\w$]*",
|
1104
|
-
"name": "meta.type.name.ts"
|
2914
|
+
"string-character-escape": {
|
2915
|
+
"name": "constant.character.escape.ts",
|
2916
|
+
"match": "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
|
1105
2917
|
},
|
1106
|
-
"
|
1107
|
-
"
|
2918
|
+
"template-substitution-element": {
|
2919
|
+
"name": "meta.template.expression.ts",
|
2920
|
+
"begin": "\\$\\{",
|
1108
2921
|
"beginCaptures": {
|
1109
2922
|
"0": {
|
1110
|
-
"name": "
|
2923
|
+
"name": "punctuation.definition.template-expression.begin.ts"
|
1111
2924
|
}
|
1112
2925
|
},
|
1113
2926
|
"end": "\\}",
|
1114
2927
|
"endCaptures": {
|
1115
2928
|
"0": {
|
1116
|
-
"name": "
|
2929
|
+
"name": "punctuation.definition.template-expression.end.ts"
|
1117
2930
|
}
|
1118
2931
|
},
|
1119
|
-
"name": "meta.object.type.ts",
|
1120
2932
|
"patterns": [
|
1121
2933
|
{
|
1122
|
-
"include": "#
|
1123
|
-
}
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
2934
|
+
"include": "#expression"
|
2935
|
+
}
|
2936
|
+
]
|
2937
|
+
},
|
2938
|
+
"literal": {
|
2939
|
+
"name": "literal.ts",
|
2940
|
+
"patterns": [
|
1127
2941
|
{
|
1128
|
-
"include": "#
|
2942
|
+
"include": "#numeric-literal"
|
1129
2943
|
},
|
1130
2944
|
{
|
1131
|
-
"include": "#
|
2945
|
+
"include": "#boolean-literal"
|
1132
2946
|
},
|
1133
2947
|
{
|
1134
|
-
"include": "#
|
1135
|
-
}
|
1136
|
-
]
|
1137
|
-
},
|
1138
|
-
"type-operator": {
|
1139
|
-
"match": "[.|]",
|
1140
|
-
"name": "keyword.operator.type.ts"
|
1141
|
-
},
|
1142
|
-
"type-parameters": {
|
1143
|
-
"begin": "([a-zA-Z_$][\\w$]*)?(<)",
|
1144
|
-
"beginCaptures": {
|
1145
|
-
"1": {
|
1146
|
-
"name": "entity.name.type.ts"
|
2948
|
+
"include": "#null-literal"
|
1147
2949
|
},
|
1148
|
-
"2": {
|
1149
|
-
"name": "meta.brace.angle.ts"
|
1150
|
-
}
|
1151
|
-
},
|
1152
|
-
"end": "(?=$)|(>)",
|
1153
|
-
"endCaptures": {
|
1154
|
-
"2": {
|
1155
|
-
"name": "meta.brace.angle.ts"
|
1156
|
-
}
|
1157
|
-
},
|
1158
|
-
"name": "meta.type.parameters.ts",
|
1159
|
-
"patterns": [
|
1160
2950
|
{
|
1161
|
-
"
|
1162
|
-
"name": "keyword.other.ts"
|
2951
|
+
"include": "#undefined-literal"
|
1163
2952
|
},
|
1164
2953
|
{
|
1165
|
-
"include": "#
|
2954
|
+
"include": "#numericConstant-literal"
|
1166
2955
|
},
|
1167
2956
|
{
|
1168
|
-
"include": "#
|
1169
|
-
}
|
1170
|
-
]
|
1171
|
-
},
|
1172
|
-
"type-paren-or-function-type-parameters": {
|
1173
|
-
"begin": "(?:\\b(new)\\b)?\\s*\\(",
|
1174
|
-
"beginCaptures": {
|
1175
|
-
"1": {
|
1176
|
-
"name": "keyword.control.ts"
|
1177
|
-
}
|
1178
|
-
},
|
1179
|
-
"end": "\\)",
|
1180
|
-
"name": "meta.type.paren.cover.ts",
|
1181
|
-
"patterns": [
|
1182
|
-
{
|
1183
|
-
"include": "#comment"
|
2957
|
+
"include": "#array-literal"
|
1184
2958
|
},
|
1185
2959
|
{
|
1186
|
-
"include": "#
|
2960
|
+
"include": "#this-literal"
|
1187
2961
|
},
|
1188
2962
|
{
|
1189
|
-
"include": "#
|
2963
|
+
"include": "#super-literal"
|
1190
2964
|
}
|
1191
2965
|
]
|
1192
2966
|
},
|
1193
|
-
"
|
1194
|
-
"
|
1195
|
-
"1": {
|
1196
|
-
"name": "support.type.ts"
|
1197
|
-
}
|
1198
|
-
},
|
1199
|
-
"match": "\\b(string|number|boolean|symbol|any|void)\\b",
|
1200
|
-
"name": "meta.type.primitive.ts"
|
1201
|
-
},
|
1202
|
-
"type-tuple": {
|
2967
|
+
"array-literal": {
|
2968
|
+
"name": "meta.array.literal.ts",
|
1203
2969
|
"begin": "\\[",
|
1204
2970
|
"beginCaptures": {
|
1205
2971
|
"0": {
|
@@ -1212,80 +2978,193 @@
|
|
1212
2978
|
"name": "meta.brace.square.ts"
|
1213
2979
|
}
|
1214
2980
|
},
|
1215
|
-
"name": "meta.type.tuple.ts",
|
1216
2981
|
"patterns": [
|
1217
2982
|
{
|
1218
|
-
"include": "#
|
2983
|
+
"include": "#expression"
|
1219
2984
|
},
|
1220
2985
|
{
|
1221
|
-
"include": "#
|
2986
|
+
"include": "#punctuation-comma"
|
1222
2987
|
}
|
1223
2988
|
]
|
1224
2989
|
},
|
1225
|
-
"
|
1226
|
-
"match": "\\b(undefined)\\b",
|
1227
|
-
"name": "constant.language.ts"
|
1228
|
-
},
|
1229
|
-
"var-expr": {
|
1230
|
-
"begin": "(?<!\\()\\s*\\b(var|let|const(?!\\s+enum))\\b",
|
1231
|
-
"beginCaptures": {
|
1232
|
-
"1": {
|
1233
|
-
"name": "storage.type.ts"
|
1234
|
-
}
|
1235
|
-
},
|
1236
|
-
"end": "(?=$|;)",
|
1237
|
-
"name": "meta.var.expr.ts",
|
2990
|
+
"numeric-literal": {
|
1238
2991
|
"patterns": [
|
1239
2992
|
{
|
1240
|
-
"
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
2993
|
+
"name": "constant.numeric.hex.ts",
|
2994
|
+
"match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F]+\\b(?!\\$)"
|
2995
|
+
},
|
2996
|
+
{
|
2997
|
+
"name": "constant.numeric.binary.ts",
|
2998
|
+
"match": "\\b(?<!\\$)0(b|B)[01]+\\b(?!\\$)"
|
2999
|
+
},
|
3000
|
+
{
|
3001
|
+
"name": "constant.numeric.octal.ts",
|
3002
|
+
"match": "\\b(?<!\\$)0(o|O)?[0-7]+\\b(?!\\$)"
|
3003
|
+
},
|
3004
|
+
{
|
3005
|
+
"match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+(\\.)[eE][+-]?[0-9]+\\b)| # 1.E+3\n (?:\\B(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # .1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9]+\\b)| # .1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)",
|
3006
|
+
"captures": {
|
3007
|
+
"0": {
|
3008
|
+
"name": "constant.numeric.decimal.ts"
|
3009
|
+
},
|
3010
|
+
"1": {
|
3011
|
+
"name": "meta.delimiter.decimal.period.ts"
|
3012
|
+
},
|
3013
|
+
"2": {
|
3014
|
+
"name": "meta.delimiter.decimal.period.ts"
|
3015
|
+
},
|
3016
|
+
"3": {
|
3017
|
+
"name": "meta.delimiter.decimal.period.ts"
|
3018
|
+
},
|
3019
|
+
"4": {
|
3020
|
+
"name": "meta.delimiter.decimal.period.ts"
|
3021
|
+
},
|
3022
|
+
"5": {
|
3023
|
+
"name": "meta.delimiter.decimal.period.ts"
|
3024
|
+
},
|
3025
|
+
"6": {
|
3026
|
+
"name": "meta.delimiter.decimal.period.ts"
|
3027
|
+
}
|
3028
|
+
}
|
1244
3029
|
}
|
1245
3030
|
]
|
1246
3031
|
},
|
1247
|
-
"
|
1248
|
-
"begin": "\\b([a-zA-Z_$][\\w$]*)\\s*(=?)",
|
1249
|
-
"beginCaptures": {
|
1250
|
-
"1": {
|
1251
|
-
"name": "variable.ts"
|
1252
|
-
}
|
1253
|
-
},
|
1254
|
-
"end": "(?=$|[;,])",
|
1255
|
-
"name": "meta.var-single-variable.expr.ts",
|
3032
|
+
"boolean-literal": {
|
1256
3033
|
"patterns": [
|
1257
3034
|
{
|
1258
|
-
"
|
1259
|
-
|
1260
|
-
{
|
1261
|
-
"include": "#type-annotation"
|
3035
|
+
"name": "constant.language.boolean.true.ts",
|
3036
|
+
"match": "(?<!\\.|\\$)\\btrue\\b(?!\\$)"
|
1262
3037
|
},
|
1263
3038
|
{
|
1264
|
-
"
|
1265
|
-
|
3039
|
+
"name": "constant.language.boolean.false.ts",
|
3040
|
+
"match": "(?<!\\.|\\$)\\bfalse\\b(?!\\$)"
|
3041
|
+
}
|
3042
|
+
]
|
3043
|
+
},
|
3044
|
+
"null-literal": {
|
3045
|
+
"name": "constant.language.null.ts",
|
3046
|
+
"match": "(?<!\\.|\\$)\\bnull\\b(?!\\$)"
|
3047
|
+
},
|
3048
|
+
"this-literal": {
|
3049
|
+
"name": "variable.language.this.ts",
|
3050
|
+
"match": "(?<!\\.|\\$)\\bthis\\b(?!\\$)"
|
3051
|
+
},
|
3052
|
+
"super-literal": {
|
3053
|
+
"name": "variable.language.super.ts",
|
3054
|
+
"match": "(?<!\\.|\\$)\\bsuper\\b(?!\\$)"
|
3055
|
+
},
|
3056
|
+
"undefined-literal": {
|
3057
|
+
"name": "constant.language.undefined.ts",
|
3058
|
+
"match": "(?<!\\.|\\$)\\bundefined\\b(?!\\$)"
|
3059
|
+
},
|
3060
|
+
"numericConstant-literal": {
|
3061
|
+
"patterns": [
|
1266
3062
|
{
|
1267
|
-
"
|
3063
|
+
"name": "constant.language.nan.ts",
|
3064
|
+
"match": "(?<!\\.|\\$)\\bNaN\\b(?!\\$)"
|
1268
3065
|
},
|
1269
3066
|
{
|
1270
|
-
"
|
3067
|
+
"name": "constant.language.infinity.ts",
|
3068
|
+
"match": "(?<!\\.|\\$)\\bInfinity\\b(?!\\$)"
|
1271
3069
|
}
|
1272
3070
|
]
|
1273
3071
|
},
|
1274
|
-
"
|
1275
|
-
"
|
1276
|
-
"
|
1277
|
-
|
1278
|
-
|
3072
|
+
"access-modifier": {
|
3073
|
+
"name": "storage.modifier.ts",
|
3074
|
+
"match": "(?<!\\.|\\$)\\b(abstract|public|protected|private|readonly|static)\\b(?!\\$)"
|
3075
|
+
},
|
3076
|
+
"property-accessor": {
|
3077
|
+
"name": "storage.type.property.ts",
|
3078
|
+
"match": "(?<!\\.|\\$)\\b(get|set)\\b(?!\\$)"
|
3079
|
+
},
|
3080
|
+
"comment": {
|
3081
|
+
"patterns": [
|
3082
|
+
{
|
3083
|
+
"name": "comment.block.documentation.ts",
|
3084
|
+
"begin": "/\\*\\*(?!/)",
|
3085
|
+
"end": "\\*/",
|
3086
|
+
"captures": {
|
3087
|
+
"0": {
|
3088
|
+
"name": "punctuation.definition.comment.ts"
|
3089
|
+
}
|
3090
|
+
},
|
3091
|
+
"patterns": [
|
3092
|
+
{
|
3093
|
+
"include": "#docblock"
|
3094
|
+
}
|
3095
|
+
]
|
3096
|
+
},
|
3097
|
+
{
|
3098
|
+
"name": "comment.block.ts",
|
3099
|
+
"begin": "/\\*",
|
3100
|
+
"end": "\\*/",
|
3101
|
+
"captures": {
|
3102
|
+
"0": {
|
3103
|
+
"name": "punctuation.definition.comment.ts"
|
3104
|
+
}
|
3105
|
+
}
|
3106
|
+
},
|
3107
|
+
{
|
3108
|
+
"begin": "(^[ \\t]+)?(?=//)",
|
3109
|
+
"beginCaptures": {
|
3110
|
+
"1": {
|
3111
|
+
"name": "punctuation.whitespace.comment.leading.ts"
|
3112
|
+
}
|
3113
|
+
},
|
3114
|
+
"end": "(?=$)",
|
3115
|
+
"patterns": [
|
3116
|
+
{
|
3117
|
+
"name": "comment.line.double-slash.ts",
|
3118
|
+
"begin": "//",
|
3119
|
+
"beginCaptures": {
|
3120
|
+
"0": {
|
3121
|
+
"name": "punctuation.definition.comment.ts"
|
3122
|
+
}
|
3123
|
+
},
|
3124
|
+
"end": "(?=$)"
|
3125
|
+
}
|
3126
|
+
]
|
1279
3127
|
}
|
1280
|
-
|
1281
|
-
|
3128
|
+
]
|
3129
|
+
},
|
3130
|
+
"docblock": {
|
1282
3131
|
"patterns": [
|
1283
3132
|
{
|
1284
|
-
"
|
3133
|
+
"name": "storage.type.class.jsdoc",
|
3134
|
+
"match": "(?<!\\w)@(abstract|access|alias|arg|argument|async|attribute|augments|author|beta|borrows|bubbes|callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright|default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exports?|extends|extension|extension_for|extensionfor|external|file|fileoverview|final|fires|for|function|global|host|ignore|implements|inherit[Dd]oc|inner|instance|interface|kind|lends|license|listens|main|member|memberof|method|mixex|mixins?|module|name|namespace|nocollapse|nosideeffects|override|overview|package|param|preserve|private|prop|property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation|version|virtual|writeOnce)\\b"
|
3135
|
+
},
|
3136
|
+
{
|
3137
|
+
"match": "(?x)\n(?:(?<=@param)|(?<=@arg)|(?<=@argument)|(?<=@type))\n\\s+\n({(?:\n \\* | # {*} any type\n \\? | # {?} unknown type\n (?: # Check for a prefix\n \\? | # {?string} nullable type\n ! | # {!string} non-nullable type\n \\.{3} # {...string} variable number of parameters\n )?\n (?:\n \\( # Opening bracket of multiple types with parenthesis {(string|number)}\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {(string[]|number)} type application, an array of strings or a number\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {(string|number[])} type application, a string or an array of numbers\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n \\) |\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {string[]|number} type application, an array of strings or a number\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n )\n # Check for suffix\n (?:\\[\\])? # {string[]} type application, an array of strings\n =? # {string=} optional parameter\n)})\n\\s+\n(\n \\[ # [foo] optional parameter\n \\s*\n (?:\n [a-zA-Z_$][\\w$]*\n (?:\n (?:\\[\\])? # Foo[].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [a-zA-Z_$][\\w$]*\n )*\n (?:\n \\s*\n = # [foo=bar] Default parameter value\n \\s*\n [\\w$\\s]*\n )?\n )\n \\s*\n \\] |\n (?:\n [a-zA-Z_$][\\w$]*\n (?:\n (?:\\[\\])? # Foo[].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [a-zA-Z_$][\\w$]*\n )*\n )?\n)\n\\s+\n(?:-\\s+)? # optional hyphen before the description\n((?:(?!\\*\\/).)*) # The type description",
|
3138
|
+
"captures": {
|
3139
|
+
"0": {
|
3140
|
+
"name": "other.meta.jsdoc"
|
3141
|
+
},
|
3142
|
+
"1": {
|
3143
|
+
"name": "entity.name.type.instance.jsdoc"
|
3144
|
+
},
|
3145
|
+
"2": {
|
3146
|
+
"name": "variable.other.jsdoc"
|
3147
|
+
},
|
3148
|
+
"3": {
|
3149
|
+
"name": "other.description.jsdoc"
|
3150
|
+
}
|
3151
|
+
}
|
3152
|
+
},
|
3153
|
+
{
|
3154
|
+
"match": "(?x)\n({(?:\n \\* | # {*} any type\n \\? | # {?} unknown type\n\n (?: # Check for a prefix\n \\? | # {?string} nullable type\n ! | # {!string} non-nullable type\n \\.{3} # {...string} variable number of parameters\n )?\n\n (?:\n \\( # Opening bracket of multiple types with parenthesis {(string|number)}\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n \\) |\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n )\n # Check for suffix\n (?:\\[\\])? # {string[]} type application, an array of strings\n =? # {string=} optional parameter\n)})\n\\s+\n(?:-\\s+)? # optional hyphen before the description\n((?:(?!\\*\\/).)*) # The type description",
|
3155
|
+
"captures": {
|
3156
|
+
"0": {
|
3157
|
+
"name": "other.meta.jsdoc"
|
3158
|
+
},
|
3159
|
+
"1": {
|
3160
|
+
"name": "entity.name.type.instance.jsdoc"
|
3161
|
+
},
|
3162
|
+
"2": {
|
3163
|
+
"name": "other.description.jsdoc"
|
3164
|
+
}
|
3165
|
+
}
|
1285
3166
|
}
|
1286
3167
|
]
|
1287
3168
|
}
|
1288
|
-
}
|
1289
|
-
"scopeName": "source.ts",
|
1290
|
-
"uuid": "ef98eb90-bf9b-11e4-bb52-0800200c9a66"
|
3169
|
+
}
|
1291
3170
|
}
|