@salesforcedevs/dx-components 1.18.6 → 1.18.8-layoutfix-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1130 @@
1
+ {
2
+ "name": "dataweave",
3
+ "scopeName": "source.data-weave",
4
+ "fileTypes": ["dwl"],
5
+ "uuid": "ba6390ae-c50f-4dce-97f1-951dab8fc607",
6
+ "patterns": [
7
+ { "include": "#comments" },
8
+ { "include": "#directives" },
9
+ {
10
+ "match": "(---)",
11
+ "name": "keyword.operator.body-marker.dw"
12
+ },
13
+ { "include": "#expressions" },
14
+ {
15
+ "match": "([^\\s]+)",
16
+ "name": "invalid"
17
+ }
18
+ ],
19
+ "repository": {
20
+ "directives": {
21
+ "patterns": [
22
+ { "include": "#dw-directive" },
23
+ { "include": "#import-directive" },
24
+ { "include": "#type-directive" },
25
+ { "include": "#fun-directive" },
26
+ { "include": "#var-directive" },
27
+ { "include": "#ns-directive" },
28
+ { "include": "#input-directive" },
29
+ { "include": "#output-directive" },
30
+ { "include": "#annotation-usage" },
31
+ { "include": "#annotation-directive" }
32
+ ]
33
+ },
34
+ "type_parameters": {
35
+ "begin": "<",
36
+ "end": ">",
37
+ "patterns": [
38
+ { "include": "#types" },
39
+ { "include": "#punctuation-comma" },
40
+ { "include": "#comments" }
41
+ ]
42
+ },
43
+ "variable-reference": {
44
+ "patterns": [
45
+ {
46
+ "name": "variable.other.dw",
47
+ "match": "\\b(?!(fun|input|output|type|var|ns|import|%dw|private|---)\\b)((\\+\\+|\\-\\-|[A-Za-z])[a-zA-Z0-9_]*)"
48
+ },
49
+ {
50
+ "name": "invalid",
51
+ "match": "\\b(fun|input|output|type|var|ns|import|private)\\b"
52
+ },
53
+ {
54
+ "name": "variable.parameter.dw",
55
+ "match": "(\\$+)"
56
+ }
57
+ ]
58
+ },
59
+ "cast": {
60
+ "begin": "(?<!\\.|\\$)\\b(as|is)\\s+",
61
+ "beginCaptures": { "1": { "name": "keyword.control.as.dw" } },
62
+ "end": "(?=$|^|[;,:})\\]\\s])",
63
+ "patterns": [{ "include": "#types" }]
64
+ },
65
+ "case-clause": {
66
+ "name": "case-clause.expr.dw",
67
+ "begin": "(?<!\\.|\\$)\\b(case|else(?=\\s*->))\\b(?!\\$|\\.)",
68
+ "beginCaptures": { "1": { "name": "keyword.control.switch.dw" } },
69
+ "end": "\\-\\>",
70
+ "endCaptures": { "0": { "name": "keyword.control.switch.dw" } },
71
+ "patterns": [
72
+ {
73
+ "begin": "(?<!\\.|\\$)\\b(is)\\s+",
74
+ "beginCaptures": {
75
+ "1": { "name": "keyword.control.is.dw" }
76
+ },
77
+ "end": "(?=\\-\\>)",
78
+ "patterns": [{ "include": "#types" }]
79
+ },
80
+ {
81
+ "begin": "(?<!\\.|\\$)\\b(matches)\\b",
82
+ "beginCaptures": {
83
+ "1": { "name": "keyword.control.matches.dw" }
84
+ },
85
+ "end": "(?=\\-\\>)",
86
+ "patterns": [{ "include": "#expressions" }]
87
+ },
88
+ {
89
+ "begin": "(?<!\\.|\\$)\\b([A-Za-z][a-zA-Z0-9_]*)\\s*:\\s+",
90
+ "beginCaptures": {
91
+ "1": { "name": "entity.name.variable.dw" }
92
+ },
93
+ "end": "(?=\\-\\>)",
94
+ "patterns": [{ "include": "#expressions" }]
95
+ },
96
+ {
97
+ "begin": "(?<!\\.|\\$)\\b([A-Za-z][a-zA-Z0-9_]*)\\s*(if|matches)\\s+",
98
+ "beginCaptures": {
99
+ "1": { "name": "entity.name.variable.dw" },
100
+ "2": { "name": "keyword.control.if.dw" }
101
+ },
102
+ "end": "(?=\\-\\>)",
103
+ "patterns": [{ "include": "#expressions" }]
104
+ },
105
+ { "include": "#expressions" }
106
+ ]
107
+ },
108
+ "comments": {
109
+ "patterns": [
110
+ {
111
+ "name": "comment.block.dw",
112
+ "begin": "/\\*",
113
+ "end": "\\*/",
114
+ "captures": {
115
+ "0": { "name": "punctuation.definition.comment.dw" }
116
+ }
117
+ },
118
+ {
119
+ "match": "\\s*((//).*$\\n?)",
120
+ "captures": {
121
+ "1": { "name": "comment.line.double-slash.dw" },
122
+ "2": { "name": "punctuation.definition.comment.dw" }
123
+ }
124
+ }
125
+ ]
126
+ },
127
+ "constants": {
128
+ "patterns": [
129
+ {
130
+ "name": "constant.language.dw",
131
+ "match": "\\b(true|false|null)\\b"
132
+ },
133
+ {
134
+ "name": "constant.numeric.dw",
135
+ "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDd]|UL|ul)?\\b"
136
+ },
137
+ {
138
+ "begin": "\\|",
139
+ "beginCaptures": { "0": { "name": "constant.numeric.dw" } },
140
+ "end": "\\|",
141
+ "endCaptures": { "0": { "name": "constant.numeric.dw" } },
142
+ "patterns": [
143
+ {
144
+ "name": "constant.numeric.dw",
145
+ "match": "([0-9]+)"
146
+ },
147
+ {
148
+ "name": "constant.character.escape.dw",
149
+ "match": "([+:\\-WYMDTHSPZ\\.])"
150
+ },
151
+ {
152
+ "name": "invalid",
153
+ "match": "([^\\|])"
154
+ }
155
+ ]
156
+ }
157
+ ]
158
+ },
159
+ "dw-directive": {
160
+ "name": "meta.directive.version.dw",
161
+ "begin": "(?<!\\.|\\$)(%dw)\\s+([0-9]\\.[0-9])(?!\\$|\\.)",
162
+ "beginCaptures": {
163
+ "1": { "name": "comment.dw" },
164
+ "2": { "name": "comment.dw" }
165
+ },
166
+ "end": "(?=\\n)"
167
+ },
168
+ "infix": {
169
+ "name": "support.function.dw",
170
+ "match": "(?<!^|,|\\[|\\(|=|\\+|>|<|\\-|\\*|:|\\{|case|is|else|not|as|and|or)(?<=[a-zA-Z0-9_$\\}\\])\"'`|/])\\s*(?!(var|match|case|else|fun|input|output|is|as|default|ns|import|null|false|true|using|do|not|and|or)\\s)(\\+\\+|\\-\\-|[a-zA-Z][a-zA-Z_0-9]*)(\\s+|\\s*(?=[\"'/|{]))"
171
+ },
172
+ "expressions": {
173
+ "name": "expression",
174
+ "patterns": [
175
+ {
176
+ "name": "keyword.other.dw",
177
+ "match": "\\b(not)\\s+"
178
+ },
179
+ { "include": "#undefined-fun-character" },
180
+ { "include": "#paren-expression" },
181
+ { "include": "#strings" },
182
+ { "include": "#constants" },
183
+ { "include": "#comments" },
184
+ { "include": "#match-statement" },
185
+ { "include": "#using-statement" },
186
+ { "include": "#do-statement" },
187
+ { "include": "#if-statement" },
188
+ { "include": "#regex" },
189
+ { "include": "#type_parameters" },
190
+ { "include": "#keywords" },
191
+ { "include": "#object-literal" },
192
+ { "include": "#array-literal" },
193
+ { "include": "#cast" },
194
+ { "include": "#object-member" },
195
+ { "include": "#variable-reference" },
196
+ { "include": "#selectors" },
197
+ { "include": "#directives" },
198
+ { "include": "#infix" }
199
+ ]
200
+ },
201
+ "generics": {
202
+ "patterns": [
203
+ {
204
+ "begin": "(:)",
205
+ "beginCaptures": {
206
+ "1": { "name": "keyword.operator.declaration.dw" }
207
+ },
208
+ "end": "(?=,|>)",
209
+ "patterns": [{ "include": "#types" }]
210
+ },
211
+ {
212
+ "name": "keyword.operator.extends.dw",
213
+ "match": "<:"
214
+ },
215
+ { "include": "#keywords" },
216
+ {
217
+ "name": "entity.name.type.parameter.dw",
218
+ "match": "\\w+"
219
+ }
220
+ ]
221
+ },
222
+ "input-directive": {
223
+ "name": "meta.directive.ns.dw",
224
+ "begin": "(?<!\\.|\\$)\\b(input)\\s+([[:alpha:]][[:alnum:]]*)\\s*",
225
+ "end": "(?=\\n)",
226
+ "beginCaptures": {
227
+ "1": { "name": "storage.type.dw" },
228
+ "2": { "name": "entity.name.variable.dw" }
229
+ },
230
+ "patterns": [
231
+ {
232
+ "begin": "(\\:\\s*)",
233
+ "beginCaptures": { "1": { "name": "keyword.other.dw" } },
234
+ "end": "(\\s|\\n)",
235
+ "patterns": [{ "include": "#types" }]
236
+ },
237
+ {
238
+ "match": "([^{\\n\\s])",
239
+ "name": "string.mime.dw"
240
+ }
241
+ ]
242
+ },
243
+ "keywords": {
244
+ "patterns": [
245
+ {
246
+ "name": "keyword.reserved.dw",
247
+ "match": "\\b(throw|for|yield|enum|private|async)\\b"
248
+ },
249
+ {
250
+ "name": "invalid",
251
+ "match": "\\b(not)\\b"
252
+ },
253
+ {
254
+ "name": "keyword.control.dw",
255
+ "match": "\\b(if|else|while|for|do|using|unless|default)\\b"
256
+ },
257
+ {
258
+ "name": "keyword.operator.comparison.dw",
259
+ "match": "(~=|==|!=|!=|<=|>=|<|>)"
260
+ },
261
+ {
262
+ "name": "keyword.operator.assignment.dw",
263
+ "match": "(=)"
264
+ },
265
+ {
266
+ "name": "keyword.operator.declaration.dw",
267
+ "match": "(:)"
268
+ },
269
+ {
270
+ "name": "keyword.operator.arithmetic.dw",
271
+ "match": "(\\-|\\+|\\*|\\/)"
272
+ },
273
+ {
274
+ "name": "keyword.other.dw",
275
+ "match": "\\b(and|or)\\b"
276
+ }
277
+ ]
278
+ },
279
+ "match-block": {
280
+ "name": "match-block.expr.dw",
281
+ "begin": "\\{",
282
+ "beginCaptures": {
283
+ "0": { "name": "punctuation.definition.block.dw" }
284
+ },
285
+ "end": "(?=\\})",
286
+ "patterns": [
287
+ { "include": "#case-clause" },
288
+ { "include": "#expressions" }
289
+ ]
290
+ },
291
+ "match-statement": {
292
+ "name": "match-statement.expr.dw",
293
+ "begin": "(?<!\\.|\\$)\\b(match)\\s*(?=\\{)",
294
+ "beginCaptures": { "1": { "name": "keyword.control.switch.dw" } },
295
+ "end": "\\}",
296
+ "endCaptures": {
297
+ "1": { "name": "punctuation.definition.block.dw" }
298
+ },
299
+ "patterns": [{ "include": "#match-block" }]
300
+ },
301
+ "using-statement": {
302
+ "name": "using-statement.expr.dw",
303
+ "begin": "(?<!\\.|\\$)\\b(using)\\s*(\\()",
304
+ "beginCaptures": {
305
+ "1": { "name": "keyword.control.using.dw" },
306
+ "2": { "name": "punctuation.definitions.begin.dw" }
307
+ },
308
+ "end": "(\\))",
309
+ "endCaptures": {
310
+ "1": { "name": "punctuation.definitions.end.dw" }
311
+ },
312
+ "patterns": [
313
+ {
314
+ "match": "((?:\\+\\+|\\-\\-|[A-Za-z])(?:[a-zA-Z0-9_]*))(\\s*=)",
315
+ "captures": {
316
+ "1": { "name": "entity.name.variable.dw" },
317
+ "2": { "name": "keyword.operator.dw" }
318
+ }
319
+ },
320
+ { "include": "#expressions" }
321
+ ]
322
+ },
323
+ "do-statement": {
324
+ "name": "do-statement.expr.dw",
325
+ "begin": "(?<!\\.|\\$)\\b(do)\\s*(\\{)",
326
+ "beginCaptures": {
327
+ "1": { "name": "keyword.control.do.dw" },
328
+ "2": { "name": "punctuation.definitions.begin.dw" }
329
+ },
330
+ "end": "(\\})",
331
+ "endCaptures": {
332
+ "1": { "name": "punctuation.definitions.end.dw" }
333
+ },
334
+ "patterns": [
335
+ { "include": "#comments" },
336
+ { "include": "#directives" },
337
+ {
338
+ "match": "(---)",
339
+ "name": "keyword.operator.body-marker.dw"
340
+ },
341
+ { "include": "#expressions" },
342
+ {
343
+ "match": "([^\\s]+)",
344
+ "name": "invalid"
345
+ }
346
+ ]
347
+ },
348
+ "if-statement": {
349
+ "name": "meta.if.dw",
350
+ "begin": "(?<!\\.|\\$)\\b(if\\s*)\\(",
351
+ "beginCaptures": { "1": { "name": "keyword.control.if.dw" } },
352
+ "end": "\\)",
353
+ "patterns": [{ "include": "#expressions" }]
354
+ },
355
+ "ns-directive": {
356
+ "name": "meta.directive.ns.dw",
357
+ "begin": "(?<!\\.|\\$)\\b(ns)\\s+([A-Za-z][a-zA-Z0-9_]*)\\s+([^\\n]*)(?!\\$|\\.)",
358
+ "beginCaptures": {
359
+ "1": { "name": "storage.type.dw" },
360
+ "2": { "name": "entity.name.namespace.dw" },
361
+ "3": { "name": "meta.definition.ns.dw string.url.dw" }
362
+ },
363
+ "end": "(?=\\n)"
364
+ },
365
+ "object-literal": {
366
+ "name": "meta.objectliteral.dw",
367
+ "begin": "\\{",
368
+ "beginCaptures": {
369
+ "0": { "name": "punctuation.definition.block.dw" }
370
+ },
371
+ "end": "\\}",
372
+ "endCaptures": {
373
+ "0": { "name": "punctuation.definition.block.dw" }
374
+ },
375
+ "patterns": [{ "include": "#object-member" }]
376
+ },
377
+ "attr-literal": {
378
+ "name": "meta.attributes.dw",
379
+ "begin": "\\@\\(",
380
+ "beginCaptures": {
381
+ "0": { "name": "keyword.operator.attributes.dw" }
382
+ },
383
+ "end": "\\)",
384
+ "endCaptures": {
385
+ "0": { "name": "keyword.operator.attributes.dw" }
386
+ },
387
+ "patterns": [{ "include": "#object-member" }]
388
+ },
389
+ "selectors": {
390
+ "name": "meta.selector.data-weave",
391
+ "begin": "(?<![\\[\\(:+*/\\-])(\\s*\\.\\.\\*|\\s*\\.\\.|\\s*\\.\\*|\\s*\\.\\@|\\s*\\.#|\\s*\\.&|\\s*\\.|(?=\\[)|\\:\\:)",
392
+ "end": "(?=\\s|,|\\}|\\)|\\n|\\]|\\(|-|$)",
393
+ "patterns": [
394
+ {
395
+ "name": "variable.object.member.dw",
396
+ "match": "\\b([[:alpha:]][_[:alnum:]]+#)",
397
+ "captures": { "0": { "name": "variable.language.dw" } }
398
+ },
399
+ {
400
+ "match": "((?:[A-Za-z])([a-zA-Z0-9_]*)[?!]?|(\\$)+)",
401
+ "name": "variable.object.member.dw"
402
+ },
403
+ { "include": "#strings" },
404
+ {
405
+ "begin": "(\\[(@|\\^)?)",
406
+ "end": "(\\])",
407
+ "patterns": [
408
+ { "include": "#expressions" },
409
+ {
410
+ "match": "([\\)])",
411
+ "name": "invalid"
412
+ }
413
+ ]
414
+ },
415
+ { "include": "#selectors" }
416
+ ]
417
+ },
418
+ "object-key": {
419
+ "patterns": [
420
+ {
421
+ "name": "variable.object.member.dw meta.object-literal.namespace.dw",
422
+ "match": "\\b([[:alpha:]][_[:alnum:]]+#)",
423
+ "captures": { "0": { "name": "variable.language.dw" } }
424
+ },
425
+ {
426
+ "name": "variable.object.member.dw meta.object-literal.key.dw",
427
+ "begin": "(?=[\\'\\\"\\`])",
428
+ "end": "(?=@\\(|:)",
429
+ "patterns": [{ "include": "#strings" }]
430
+ },
431
+ {
432
+ "name": "variable.object.member.dw",
433
+ "end": "(?=,|\\}|\\))",
434
+ "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:|@\\()",
435
+ "captures": {
436
+ "1": { "name": "meta.object-literal.key.dw" }
437
+ }
438
+ }
439
+ ]
440
+ },
441
+ "object-member": {
442
+ "name": "meta.object.member.first.dw",
443
+ "patterns": [
444
+ { "include": "#comments" },
445
+ { "include": "#paren-expression" },
446
+ { "include": "#object-key" },
447
+ { "include": "#attr-literal" },
448
+ { "include": "#object-member-body" },
449
+ { "include": "#punctuation-comma" }
450
+ ]
451
+ },
452
+ "object-member-body": {
453
+ "name": "variable.object.member.dw",
454
+ "begin": ":",
455
+ "beginCaptures": {
456
+ "0": {
457
+ "name": "meta.object-literal.key.dw punctuation.separator.key-value.dw"
458
+ }
459
+ },
460
+ "end": "(?=,|\\}|\\))",
461
+ "patterns": [{ "include": "#expressions" }]
462
+ },
463
+ "output-directive": {
464
+ "name": "meta.directive.ns.dw",
465
+ "begin": "(?<!\\.|\\$)\\b(output)\\s+([^\\n{\\s]*)(?!\\$|\\.)",
466
+ "beginCaptures": {
467
+ "1": { "name": "storage.type.dw" },
468
+ "2": { "name": "string.other.dw" }
469
+ },
470
+ "end": "(?=\\n)"
471
+ },
472
+ "parameters": {
473
+ "patterns": [
474
+ {
475
+ "begin": "(:)",
476
+ "beginCaptures": {
477
+ "1": { "name": "keyword.operator.declaration.dw" }
478
+ },
479
+ "end": "(?=,|\\)|=)",
480
+ "patterns": [{ "include": "#types" }]
481
+ },
482
+ {
483
+ "begin": "(=)",
484
+ "beginCaptures": {
485
+ "1": { "name": "keyword.operator.declaration.dw" }
486
+ },
487
+ "end": "(?=,|\\))",
488
+ "patterns": [{ "include": "#expressions" }]
489
+ },
490
+ {
491
+ "name": "variable.parameter.dw",
492
+ "match": "\\w+"
493
+ }
494
+ ]
495
+ },
496
+ "paren-expression": {
497
+ "begin": "(\\()",
498
+ "beginCaptures": {
499
+ "1": { "name": "punctuation.expression.begin.dw" }
500
+ },
501
+ "end": "(\\))",
502
+ "endCaptures": { "1": { "name": "punctuation.expression.end.dw" } },
503
+ "patterns": [{ "include": "#expressions" }]
504
+ },
505
+ "punctuation-comma": {
506
+ "name": "punctuation.separator.comma.dw",
507
+ "match": ","
508
+ },
509
+ "strings": {
510
+ "patterns": [
511
+ { "include": "#qstring-single" },
512
+ { "include": "#qstring-double" },
513
+ { "include": "#qstring-backtick" },
514
+ { "include": "#template" }
515
+ ]
516
+ },
517
+ "qstring-backtick": {
518
+ "begin": "`",
519
+ "beginCaptures": {
520
+ "0": {
521
+ "name": "string.quoted.double.dw punctuation.definition.string.begin.dw"
522
+ }
523
+ },
524
+ "end": "`",
525
+ "endCaptures": {
526
+ "0": {
527
+ "name": "string.quoted.double.dw punctuation.definition.string.end.dw"
528
+ }
529
+ },
530
+ "patterns": [
531
+ { "include": "#template-substitution-element" },
532
+ { "include": "#template-dollar" },
533
+ { "include": "#string-character-escape" },
534
+ {
535
+ "match": "([^`])",
536
+ "name": "string.template.dw"
537
+ }
538
+ ]
539
+ },
540
+ "template": {
541
+ "begin": "([$[:alpha:]][_$[:alnum:]]*)\\s*(`)",
542
+ "beginCaptures": {
543
+ "1": { "name": "support.function.dw" },
544
+ "2": {
545
+ "name": "string.template.dw punctuation.definition.string.template.begin.dw"
546
+ }
547
+ },
548
+ "end": "`",
549
+ "endCaptures": {
550
+ "0": {
551
+ "name": "string.template.dw punctuation.definition.string.template.end.dw"
552
+ }
553
+ },
554
+ "patterns": [
555
+ { "include": "#template-substitution-element" },
556
+ { "include": "#template-dollar" },
557
+ { "include": "#string-character-escape" },
558
+ {
559
+ "match": "([^`])",
560
+ "name": "string.template.dw"
561
+ }
562
+ ]
563
+ },
564
+ "string-character-escape": {
565
+ "name": "constant.character.escape.dw",
566
+ "match": "\\\\(u\\h{4}|$|.)"
567
+ },
568
+ "undefined-fun-character": {
569
+ "name": "constant.language.undefined.dw",
570
+ "match": "\\?\\?\\?"
571
+ },
572
+ "qstring-double": {
573
+ "begin": "\"",
574
+ "beginCaptures": {
575
+ "0": {
576
+ "name": "string.quoted.double.dw punctuation.definition.string.begin.dw"
577
+ }
578
+ },
579
+ "end": "\"",
580
+ "endCaptures": {
581
+ "0": {
582
+ "name": "string.quoted.double.dw punctuation.definition.string.end.dw"
583
+ }
584
+ },
585
+ "patterns": [
586
+ { "include": "#template-substitution-element" },
587
+ { "include": "#template-dollar" },
588
+ { "include": "#string-character-escape" },
589
+ {
590
+ "match": "([^\"])",
591
+ "name": "string.quoted.double.dw"
592
+ }
593
+ ]
594
+ },
595
+ "qstring-single": {
596
+ "begin": "'",
597
+ "beginCaptures": {
598
+ "0": {
599
+ "name": "string.quoted.single.dw punctuation.definition.string.begin.dw"
600
+ }
601
+ },
602
+ "end": "(\\')|((?:[^\\\\\\n])$)",
603
+ "endCaptures": {
604
+ "1": {
605
+ "name": "string.quoted.single.dw punctuation.definition.string.end.dw"
606
+ },
607
+ "2": { "name": "invalid.illegal.newline.dw" }
608
+ },
609
+ "patterns": [
610
+ { "include": "#template-substitution-element" },
611
+ { "include": "#template-dollar" },
612
+ { "include": "#string-character-escape" },
613
+ {
614
+ "match": "([^'])",
615
+ "name": "string.quoted.single.dw"
616
+ }
617
+ ]
618
+ },
619
+ "template-dollar": {
620
+ "patterns": [
621
+ {
622
+ "match": "(\\$(\\$)+)",
623
+ "name": "variable.parameter.dw"
624
+ },
625
+ {
626
+ "match": "(\\$)(?![a-zA-Z(])",
627
+ "name": "variable.parameter.dw"
628
+ },
629
+ {
630
+ "match": "(\\$)([a-zA-Z][a-zA-Z0-9_]*)",
631
+ "captures": {
632
+ "1": { "name": "keyword.other.dw" },
633
+ "2": { "name": "variable.other.dw" }
634
+ },
635
+ "name": "variable.parameter.dw"
636
+ }
637
+ ]
638
+ },
639
+ "template-substitution-element": {
640
+ "name": "meta.template.expression.dw",
641
+ "begin": "\\$\\(",
642
+ "beginCaptures": { "0": { "name": "keyword.other.dw" } },
643
+ "end": "\\)",
644
+ "endCaptures": { "0": { "name": "keyword.other.dw" } },
645
+ "patterns": [{ "include": "#expressions" }]
646
+ },
647
+ "types": {
648
+ "patterns": [
649
+ { "include": "#comments" },
650
+ {
651
+ "name": "constant.language.dw",
652
+ "match": "\\b(true|false|null)\\b"
653
+ },
654
+ {
655
+ "name": "constant.numeric.dw",
656
+ "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDd]|UL|ul)?\\b"
657
+ },
658
+ { "include": "#strings" },
659
+ {
660
+ "begin": "<",
661
+ "end": ">",
662
+ "patterns": [
663
+ { "include": "#types" },
664
+ { "include": "#punctuation-comma" },
665
+ { "include": "#comments" }
666
+ ]
667
+ },
668
+ {
669
+ "begin": "\\{\\-\\|",
670
+ "end": "\\|\\-\\}",
671
+ "patterns": [
672
+ { "include": "#punctuation-comma" },
673
+ { "include": "#object-member-type" }
674
+ ]
675
+ },
676
+ {
677
+ "begin": "\\{\\|",
678
+ "end": "\\|\\}",
679
+ "patterns": [
680
+ { "include": "#punctuation-comma" },
681
+ { "include": "#object-member-type" }
682
+ ]
683
+ },
684
+ {
685
+ "begin": "\\{\\-",
686
+ "end": "\\-\\}",
687
+ "patterns": [
688
+ { "include": "#punctuation-comma" },
689
+ { "include": "#object-member-type" }
690
+ ]
691
+ },
692
+ {
693
+ "begin": "\\{",
694
+ "end": "\\}",
695
+ "patterns": [
696
+ { "include": "#punctuation-comma" },
697
+ { "include": "#object-member-type" }
698
+ ]
699
+ },
700
+ {
701
+ "begin": "(\\()",
702
+ "beginCaptures": {
703
+ "0": { "name": "keyword.operator.grouping.dw" }
704
+ },
705
+ "end": "(\\)\\s*->|\\))",
706
+ "endCaptures": {
707
+ "0": { "name": "keyword.operator.grouping.dw" }
708
+ },
709
+ "patterns": [
710
+ { "include": "#types" },
711
+ { "include": "#parameters" }
712
+ ]
713
+ },
714
+ {
715
+ "name": "support.class.dw",
716
+ "match": "(String|Boolean|Number|Range|Namespace|Uri|DateTime|LocalDateTime|Date|LocalTime|TimeZone|Time|Period|Binary|Null|Regex|Nothing|Any|Object|Key)"
717
+ },
718
+ {
719
+ "begin": "(Array|Type)\\s*<",
720
+ "beginCaptures": { "1": { "name": "support.type.dw" } },
721
+ "end": ">",
722
+ "patterns": [
723
+ {
724
+ "match": ",",
725
+ "name": "invalid"
726
+ },
727
+ { "include": "#types" }
728
+ ]
729
+ },
730
+ {
731
+ "name": "keyword.operator.declaration.dw",
732
+ "match": "(&|\\|)"
733
+ },
734
+ {
735
+ "name": "keyword.operator.declaration.dw",
736
+ "match": "<:"
737
+ },
738
+ {
739
+ "name": "support.class.dw",
740
+ "match": "\\b([A-Z][a-zA-Z0-9_]*)"
741
+ },
742
+ { "include": "#undefined-fun-character" },
743
+ { "match": "\\b(var|fun|ns)\\b" },
744
+ {
745
+ "name": "invalid",
746
+ "match": "\\b(input|output|var|ns|import|try|catch|throw|do|for|yield|enum|private|async)\\b"
747
+ },
748
+ {
749
+ "name": "invalid",
750
+ "match": "\\b(if|else|while|for|do|using|unless|default|match)\\b"
751
+ },
752
+ {
753
+ "name": "invalid",
754
+ "match": "(~=|==|!=|===|!==|<=|>=|<|>|\\$+)"
755
+ }
756
+ ]
757
+ },
758
+ "object-member-type": {
759
+ "patterns": [
760
+ { "include": "#comments" },
761
+ {
762
+ "match": "_",
763
+ "name": "variable.language.dw"
764
+ },
765
+ {
766
+ "match": "([a-zA-Z0-9]+#)",
767
+ "name": "variable.language.dw"
768
+ },
769
+ {
770
+ "match": "\\(\\s*([a-zA-Z][a-zA-Z0-9]*)\\s*\\)",
771
+ "name": "entity.name.type.dw"
772
+ },
773
+ {
774
+ "match": "([a-zA-Z][a-zA-Z0-9]*)",
775
+ "name": "variable.object.member.dw"
776
+ },
777
+ { "include": "#strings" },
778
+ {
779
+ "match": "\\?",
780
+ "name": "keyword.operator.optional.dw"
781
+ },
782
+ {
783
+ "match": "\\*",
784
+ "name": "keyword.operator.optional.dw"
785
+ },
786
+ {
787
+ "begin": "(\\@\\()",
788
+ "beginCaptures": {
789
+ "1": { "name": "keyword.operator.attributes.dw" }
790
+ },
791
+ "end": "(\\))",
792
+ "endCaptures": {
793
+ "1": { "name": "keyword.operator.attributes.dw" }
794
+ },
795
+ "patterns": [
796
+ { "include": "#punctuation-comma" },
797
+ { "include": "#object-member-type" }
798
+ ]
799
+ },
800
+ {
801
+ "begin": "(:)",
802
+ "beginCaptures": {
803
+ "1": { "name": "keyword.operator.declaration.dw" }
804
+ },
805
+ "end": "(?=,|}|\\)|\\|}|\\-}|\\|\\-})",
806
+ "patterns": [{ "include": "#types" }]
807
+ },
808
+ {
809
+ "match": "([^\\s])",
810
+ "name": "invalid"
811
+ }
812
+ ]
813
+ },
814
+ "type-directive": {
815
+ "name": "meta.directive.type.dw",
816
+ "begin": "(\\s*(type)\\s+([a-zA-Z][a-zA-Z0-9]*))",
817
+ "end": "(?=(fun|input|output|type|var|ns|import|%dw|private|---)\\s|(\\@[a-zA-Z][a-zA-Z0-9]*))",
818
+ "beginCaptures": {
819
+ "2": { "name": "storage.type.dw" },
820
+ "3": { "name": "entity.name.type.dw" }
821
+ },
822
+ "patterns": [
823
+ {
824
+ "begin": "<",
825
+ "end": ">",
826
+ "patterns": [{ "include": "#generics" }]
827
+ },
828
+ {
829
+ "name": "keyword.other.dw",
830
+ "match": "\\="
831
+ },
832
+ { "include": "#types" }
833
+ ]
834
+ },
835
+ "import-directive": {
836
+ "name": "meta.directive.import.dw",
837
+ "begin": "(\\s*(import)\\s+)",
838
+ "end": "(?=(fun|input|output|type|var|ns|import|%dw|private|annotation|\\@|---)\\s|$)",
839
+ "beginCaptures": { "2": { "name": "keyword.control.import" } },
840
+ "patterns": [
841
+ { "include": "#comments" },
842
+ { "match": "(,)" },
843
+ {
844
+ "match": "(\\*)",
845
+ "name": "entity.name.type.dw"
846
+ },
847
+ {
848
+ "match": "\\s+(from)\\s+",
849
+ "captures": { "1": { "name": "keyword.control.from" } }
850
+ },
851
+ {
852
+ "match": "(?:[a-zA-Z][a-zA-Z0-9]*(?:::[a-zA-Z][a-zA-Z0-9]*)+)\n",
853
+ "name": "entity.name.type.dw"
854
+ },
855
+ {
856
+ "match": "(?:[a-zA-Z][a-zA-Z0-9]*)\n",
857
+ "name": "entity.name.function.dw"
858
+ },
859
+ {
860
+ "match": "\\s+(as)\\s+([a-zA-Z][a-zA-Z0-9]*)",
861
+ "captures": {
862
+ "1": { "name": "keyword.control.as" },
863
+ "2": { "name": "entity.name.function.dw" }
864
+ }
865
+ }
866
+ ]
867
+ },
868
+ "var-directive": {
869
+ "name": "meta.directive.var.dw",
870
+ "begin": "(\\s*(var)\\s+([a-zA-Z][a-zA-Z0-9]*))",
871
+ "end": "(=)",
872
+ "beginCaptures": {
873
+ "2": { "name": "storage.type.dw" },
874
+ "3": { "name": "entity.name.variable.dw" }
875
+ },
876
+ "endCaptures": {
877
+ "0": { "name": "keyword.operator.assignment.dw" }
878
+ },
879
+ "patterns": [
880
+ {
881
+ "begin": "<",
882
+ "end": ">",
883
+ "patterns": [{ "include": "#generics" }]
884
+ },
885
+ {
886
+ "begin": "(:)",
887
+ "beginCaptures": {
888
+ "1": { "name": "keyword.operator.declaration.dw" }
889
+ },
890
+ "end": "(?==|$)",
891
+ "patterns": [
892
+ { "include": "#comments" },
893
+ { "include": "#types" }
894
+ ]
895
+ }
896
+ ]
897
+ },
898
+ "fun-directive": {
899
+ "name": "meta.directive.fun.dw",
900
+ "begin": "(\\s*(fun)\\s+([a-zA-Z][a-zA-Z0-9_]*|--|\\+\\+))",
901
+ "end": "(=)",
902
+ "beginCaptures": {
903
+ "2": { "name": "storage.type.dw" },
904
+ "3": { "name": "entity.name.function.dw" }
905
+ },
906
+ "endCaptures": {
907
+ "0": { "name": "keyword.operator.assignment.dw" }
908
+ },
909
+ "patterns": [
910
+ {
911
+ "begin": "<",
912
+ "end": ">",
913
+ "patterns": [{ "include": "#generics" }]
914
+ },
915
+ {
916
+ "begin": "\\(",
917
+ "end": "\\)",
918
+ "patterns": [{ "include": "#parameters" }]
919
+ },
920
+ {
921
+ "begin": "(:)",
922
+ "beginCaptures": {
923
+ "1": { "name": "keyword.operator.declaration.dw" }
924
+ },
925
+ "end": "(?==)",
926
+ "patterns": [{ "include": "#types" }]
927
+ }
928
+ ]
929
+ },
930
+ "annotation-directive": {
931
+ "name": "meta.directive.annot.dw",
932
+ "begin": "(\\s*(annotation)\\s+([a-zA-Z][a-zA-Z0-9]*))",
933
+ "end": "(?=\\n)",
934
+ "beginCaptures": {
935
+ "2": { "name": "storage.type.annotation.dw" },
936
+ "3": { "name": "entity.name.function.dw" }
937
+ },
938
+ "endCaptures": {
939
+ "0": { "name": "keyword.operator.assignment.dw" }
940
+ },
941
+ "patterns": [
942
+ {
943
+ "begin": "\\(",
944
+ "end": "\\)",
945
+ "patterns": [{ "include": "#parameters" }]
946
+ }
947
+ ]
948
+ },
949
+ "annotation-usage": {
950
+ "name": "meta.annot.usage.dw",
951
+ "begin": "(\\s*(\\@)([a-zA-Z][a-zA-Z0-9]*))",
952
+ "end": "(?=\\n)",
953
+ "beginCaptures": {
954
+ "2": { "name": "storage.type.annotation.dw" },
955
+ "3": { "name": "entity.name.function.dw" }
956
+ },
957
+ "endCaptures": {
958
+ "0": { "name": "keyword.operator.assignment.dw" }
959
+ },
960
+ "patterns": [
961
+ {
962
+ "begin": "\\(",
963
+ "end": "\\)",
964
+ "patterns": [{ "include": "#parameters" }]
965
+ }
966
+ ]
967
+ },
968
+ "array-literal": {
969
+ "name": "meta.array.literal.dw",
970
+ "begin": "(?<!\\w|}|])(\\[)",
971
+ "beginCaptures": { "0": { "name": "meta.brace.square.dw" } },
972
+ "end": "\\]",
973
+ "endCaptures": { "0": { "name": "meta.brace.square.dw" } },
974
+ "patterns": [
975
+ { "include": "#expressions" },
976
+ { "include": "#punctuation-comma" }
977
+ ]
978
+ },
979
+ "regex": {
980
+ "patterns": [
981
+ {
982
+ "name": "string.regexp.dw",
983
+ "begin": "(?<=[=(:,\\[?+!]|replace|match|scan|matches|contains|---|case|->|and|or|\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])(?!\\s*[a-zA-Z0-9_$]))",
984
+ "beginCaptures": {
985
+ "1": {
986
+ "name": "punctuation.definition.string.begin.dw"
987
+ }
988
+ },
989
+ "end": "(/)",
990
+ "endCaptures": {
991
+ "1": { "name": "punctuation.definition.string.end.dw" }
992
+ },
993
+ "patterns": [{ "include": "#regexp" }]
994
+ },
995
+ {
996
+ "name": "string.regexp.dw",
997
+ "begin": "(?<![_$[:alnum:])])\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])(?!\\s*[a-zA-Z0-9_$]))",
998
+ "beginCaptures": {
999
+ "0": {
1000
+ "name": "punctuation.definition.string.begin.dw"
1001
+ }
1002
+ },
1003
+ "end": "(/)",
1004
+ "endCaptures": {
1005
+ "1": { "name": "punctuation.definition.string.end.dw" }
1006
+ },
1007
+ "patterns": [{ "include": "#regexp" }]
1008
+ }
1009
+ ]
1010
+ },
1011
+ "regexp": {
1012
+ "patterns": [
1013
+ {
1014
+ "name": "keyword.control.anchor.regexp",
1015
+ "match": "\\\\[bB]|\\^|\\$"
1016
+ },
1017
+ {
1018
+ "name": "keyword.other.back-reference.regexp",
1019
+ "match": "\\\\[1-9]\\d*"
1020
+ },
1021
+ {
1022
+ "name": "keyword.operator.quantifier.regexp",
1023
+ "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
1024
+ },
1025
+ {
1026
+ "name": "keyword.operator.or.regexp",
1027
+ "match": "\\|"
1028
+ },
1029
+ {
1030
+ "name": "meta.group.assertion.regexp",
1031
+ "begin": "(\\()((\\?=)|(\\?!))",
1032
+ "beginCaptures": {
1033
+ "1": { "name": "punctuation.definition.group.regexp" },
1034
+ "2": {
1035
+ "name": "punctuation.definition.group.assertion.regexp"
1036
+ },
1037
+ "3": { "name": "meta.assertion.look-ahead.regexp" },
1038
+ "4": {
1039
+ "name": "meta.assertion.negative-look-ahead.regexp"
1040
+ }
1041
+ },
1042
+ "end": "(\\))",
1043
+ "endCaptures": {
1044
+ "1": { "name": "punctuation.definition.group.regexp" }
1045
+ },
1046
+ "patterns": [{ "include": "#regexp" }]
1047
+ },
1048
+ {
1049
+ "name": "meta.group.regexp",
1050
+ "begin": "\\((\\?:)?",
1051
+ "beginCaptures": {
1052
+ "0": { "name": "punctuation.definition.group.regexp" },
1053
+ "1": {
1054
+ "name": "punctuation.definition.group.capture.regexp"
1055
+ }
1056
+ },
1057
+ "end": "\\)",
1058
+ "endCaptures": {
1059
+ "0": { "name": "punctuation.definition.group.regexp" }
1060
+ },
1061
+ "patterns": [{ "include": "#regexp" }]
1062
+ },
1063
+ {
1064
+ "name": "constant.other.character-class.set.regexp",
1065
+ "begin": "(\\[)(\\^)?",
1066
+ "beginCaptures": {
1067
+ "1": {
1068
+ "name": "punctuation.definition.character-class.regexp"
1069
+ },
1070
+ "2": { "name": "keyword.operator.negation.regexp" }
1071
+ },
1072
+ "end": "(\\])",
1073
+ "endCaptures": {
1074
+ "1": {
1075
+ "name": "punctuation.definition.character-class.regexp"
1076
+ }
1077
+ },
1078
+ "patterns": [
1079
+ {
1080
+ "name": "constant.other.character-class.range.regexp",
1081
+ "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])|(\\\\.))",
1082
+ "captures": {
1083
+ "1": {
1084
+ "name": "constant.character.numeric.regexp"
1085
+ },
1086
+ "2": {
1087
+ "name": "constant.character.control.regexp"
1088
+ },
1089
+ "3": {
1090
+ "name": "constant.character.escape.backslash.regexp"
1091
+ },
1092
+ "4": {
1093
+ "name": "constant.character.numeric.regexp"
1094
+ },
1095
+ "5": {
1096
+ "name": "constant.character.control.regexp"
1097
+ },
1098
+ "6": {
1099
+ "name": "constant.character.escape.backslash.regexp"
1100
+ }
1101
+ }
1102
+ },
1103
+ { "include": "#regex-character-class" }
1104
+ ]
1105
+ },
1106
+ { "include": "#regex-character-class" }
1107
+ ]
1108
+ },
1109
+ "regex-character-class": {
1110
+ "patterns": [
1111
+ {
1112
+ "name": "constant.other.character-class.regexp",
1113
+ "match": "\\\\[wWsSdDtrnvf]|\\."
1114
+ },
1115
+ {
1116
+ "name": "constant.character.numeric.regexp",
1117
+ "match": "\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)"
1118
+ },
1119
+ {
1120
+ "name": "constant.character.control.regexp",
1121
+ "match": "\\\\c[A-Z]"
1122
+ },
1123
+ {
1124
+ "name": "constant.character.escape.backslash.regexp",
1125
+ "match": "\\\\."
1126
+ }
1127
+ ]
1128
+ }
1129
+ }
1130
+ }