@codingame/monaco-editor-wrapper 3.4.1 → 3.4.2

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.
Files changed (48) hide show
  1. package/dist/{HTML (Eex).js → HTML (Eex)2.js} +0 -0
  2. package/dist/atd.js +90 -94
  3. package/dist/atd2.js +94 -90
  4. package/dist/css.worker.js +1 -1
  5. package/dist/d.js +3157 -84
  6. package/dist/d2.js +84 -3157
  7. package/dist/dart.js +510 -83
  8. package/dist/dart2.js +83 -510
  9. package/dist/diet.js +740 -82
  10. package/dist/diet2.js +82 -740
  11. package/dist/dml.js +155 -76
  12. package/dist/dml2.js +76 -155
  13. package/dist/dune-project.js +469 -53
  14. package/dist/dune-project2.js +53 -469
  15. package/dist/dune-workspace.js +287 -54
  16. package/dist/dune-workspace2.js +54 -287
  17. package/dist/dune.js +2948 -51
  18. package/dist/dune2.js +51 -2948
  19. package/dist/elixir.js +2335 -63
  20. package/dist/elixir2.js +63 -2335
  21. package/dist/features/cssContribution.js +1 -4
  22. package/dist/features/extensionConfigurations.js +24 -122
  23. package/dist/features/htmlContribution.js +4 -18
  24. package/dist/features/jsonContribution.js +1 -8
  25. package/dist/features/typescriptContribution.js +4 -8
  26. package/dist/{html (eex)2.js → html (eex).js} +0 -0
  27. package/dist/html.worker.js +1 -1
  28. package/dist/index.js +2178 -1355
  29. package/dist/index2.js +1354 -2186
  30. package/dist/json.worker.js +1 -1
  31. package/dist/main.js +270 -1417
  32. package/dist/ocaml.interface.js +273 -95
  33. package/dist/ocaml.interface2.js +95 -273
  34. package/dist/ocaml.js +884 -95
  35. package/dist/ocaml2.js +95 -884
  36. package/dist/r.js +657 -81
  37. package/dist/r2.js +81 -657
  38. package/dist/sdl.js +150 -78
  39. package/dist/sdl2.js +78 -150
  40. package/dist/solidity.js +1172 -56
  41. package/dist/solidity2.js +56 -1172
  42. package/dist/ts.worker.js +1 -1
  43. package/dist/vim.js +8 -8
  44. package/dist/vue-sugarss.js +390 -54
  45. package/dist/vue-sugarss2.js +54 -390
  46. package/dist/worker.js +1 -3
  47. package/package.json +29 -26
  48. package/stats.html +44 -34
package/dist/elixir2.js CHANGED
@@ -1,2341 +1,69 @@
1
- var comment = "Atom Syntax Parser for Elixir Programming Language.";
2
- var fileTypes = [
3
- "ex",
4
- "exs"
1
+ var comments = {
2
+ lineComment: "#"
3
+ };
4
+ var brackets = [
5
+ [
6
+ "{",
7
+ "}"
8
+ ],
9
+ [
10
+ "[",
11
+ "]"
12
+ ],
13
+ [
14
+ "(",
15
+ ")"
16
+ ]
5
17
  ];
6
- var firstLineMatch = "^#!/.*\\belixir";
7
- var foldingStartMarker = "(after|else|catch|rescue|\\-\\>|\\{|\\[|do)\\s*$";
8
- var foldingStopMarker = "^\\s*((\\}|\\]|after|else|catch|rescue)\\s*$|end\\b)";
9
- var name = "Elixir";
10
- var patterns = [
11
- {
12
- captures: {
13
- "1": {
14
- name: "keyword.control.module.elixir"
15
- },
16
- "2": {
17
- name: "entity.name.type.module.elixir"
18
- }
19
- },
20
- match: "^\\s*(defmodule)\\s+(([A-Z]\\w*\\s*(\\.)\\s*)*[A-Z]\\w*)",
21
- name: "meta.module.elixir"
22
- },
23
- {
24
- begin: "@(module|type)?doc (~s)?\"\"\"",
25
- comment: "@doc with interpolated heredocs",
26
- end: "\\s*\"\"\"",
27
- name: "comment.documentation.heredoc.elixir",
28
- patterns: [
29
- {
30
- include: "#interpolated_elixir"
31
- },
32
- {
33
- include: "#escaped_char"
34
- }
35
- ]
36
- },
37
- {
38
- begin: "@(module|type)?doc ~s'''",
39
- comment: "@doc with interpolated single quoted heredocs",
40
- end: "\\s*'''",
41
- name: "comment.documentation.heredoc.elixir",
42
- patterns: [
43
- {
44
- include: "#interpolated_elixir"
45
- },
46
- {
47
- include: "#escaped_char"
48
- }
49
- ]
50
- },
51
- {
52
- begin: "@(module|type)?doc ~S\"\"\"",
53
- comment: "@doc with heredocs is treated as documentation",
54
- end: "\\s*\"\"\"",
55
- name: "comment.documentation.heredoc.elixir",
56
- patterns: [
57
- {
58
- include: "#escaped_char"
59
- }
60
- ]
61
- },
62
- {
63
- begin: "@(module|type)?doc ~S'''",
64
- comment: "@doc with heredocs is treated as documentation",
65
- end: "\\s*'''",
66
- name: "comment.documentation.heredoc.elixir",
67
- patterns: [
68
- {
69
- include: "#escaped_char"
70
- }
71
- ]
72
- },
73
- {
74
- comment: "@doc false is treated as documentation",
75
- match: "@(module|type)?doc false",
76
- name: "comment.documentation.false"
77
- },
78
- {
79
- begin: "@(module|type)?doc \"",
80
- comment: "@doc with string is treated as documentation",
81
- end: "\"",
82
- name: "comment.documentation.string",
83
- patterns: [
84
- {
85
- include: "#interpolated_elixir"
86
- },
87
- {
88
- include: "#escaped_char"
89
- }
90
- ]
91
- },
92
- {
93
- match: "(?<!\\.)\\b(alias|require|import|use)\\b(?![?!])",
94
- name: "keyword.other.special-method.elixir"
95
- },
96
- {
97
- captures: {
98
- "1": {
99
- name: "punctuation.definition.constant.elixir"
100
- }
101
- },
102
- comment: "symbols",
103
- match: "(?>[a-zA-Z_][\\w@]*(?>[?!])?)(:)(?!:)",
104
- name: "constant.other.symbol.elixir"
105
- },
106
- {
107
- match: "(?<!\\.)\\b(do|end|case|bc|lc|for|if|cond|with|unless|try|receive|fn|defmodule|defprotocol|defimpl|defrecordp?|defstruct|defdelegate|defcallback|defexception|defoverridable|defguardp?|exit|after|rescue|catch|else|raise|throw|quote|unquote|super|when|and|or|not|in)\\b(?![?!])",
108
- name: "keyword.control.elixir"
109
- },
110
- {
111
- comment: "Function with parameters",
112
- begin: "\\b(defp?|defmacrop?)\\b\\s*([_$a-z][$\\w]*[!?]?)\\s*\\(",
113
- beginCaptures: {
114
- "1": {
115
- name: "keyword.control.elixir"
116
- },
117
- "2": {
118
- name: "entity.name.function.elixir"
119
- }
120
- },
121
- end: "\\)",
122
- patterns: [
123
- {
124
- include: "$self"
125
- },
126
- {
127
- include: "#function_parameter"
128
- }
129
- ]
130
- },
131
- {
132
- comment: "Function without parameters",
133
- match: "\\b(defp?|defmacrop?)\\b\\s*([_$a-z][$\\w]*[!?]?)",
134
- captures: {
135
- "1": {
136
- name: "keyword.control.elixir"
137
- },
138
- "2": {
139
- name: "entity.name.function.elixir"
140
- }
141
- }
142
- },
143
- {
144
- comment: " as above, just doesn't need a 'end' and does a logic operation",
145
- match: "(?<!\\.)\\b(and|not|or|when|xor|in|inlist|inbits)\\b",
146
- name: "keyword.operator.elixir"
147
- },
148
- {
149
- match: "\\b(nil|true|false)\\b(?![?!])",
150
- name: "constant.language.elixir"
151
- },
152
- {
153
- match: "\\b(__(CALLER|ENV|MODULE|DIR)__)\\b(?![?!])",
154
- name: "variable.language.elixir"
155
- },
156
- {
157
- match: "\\b[A-Z]\\w*\\b",
158
- name: "variable.other.constant.elixir"
159
- },
160
- {
161
- match: "\\b(0[xX]\\h(?>_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0[bB][01]+)\\b",
162
- name: "constant.numeric.elixir"
163
- },
164
- {
165
- comment: "Regex sigil with curlies",
166
- begin: "~r\\{",
167
- beginCaptures: {
168
- "0": {
169
- name: "punctuation.section.regexp.begin.elixir"
170
- }
171
- },
172
- end: "\\}[eimnosux]*",
173
- endCaptures: {
174
- "0": {
175
- name: "punctuation.section.regexp.end.elixir"
176
- }
177
- },
178
- name: "string.regexp.interpolated.elixir",
179
- patterns: [
180
- {
181
- include: "#regex_sub"
182
- },
183
- {
184
- include: "#nest_curly"
185
- }
186
- ]
187
- },
188
- {
189
- comment: "Regex sigil with pipes",
190
- begin: "~r\\|",
191
- beginCaptures: {
192
- "0": {
193
- name: "punctuation.section.regexp.begin.elixir"
194
- }
195
- },
196
- end: "\\|[eimnosux]*",
197
- endCaptures: {
198
- "0": {
199
- name: "punctuation.section.regexp.end.elixir"
200
- }
201
- },
202
- name: "string.regexp.interpolated.elixir",
203
- patterns: [
204
- {
205
- include: "#regex_sub"
206
- }
207
- ]
208
- },
209
- {
210
- comment: "Regex sigil with parens",
211
- begin: "~r\\(",
212
- beginCaptures: {
213
- "0": {
214
- name: "punctuation.section.regexp.begin.elixir"
215
- }
216
- },
217
- end: "\\)[eimnosux]*",
218
- endCaptures: {
219
- "0": {
220
- name: "punctuation.section.regexp.end.elixir"
221
- }
222
- },
223
- name: "string.regexp.interpolated.elixir",
224
- patterns: [
225
- {
226
- include: "#regex_sub"
227
- }
228
- ]
229
- },
230
- {
231
- comment: "Regex sigil with slashes",
232
- begin: "~r\\/",
233
- beginCaptures: {
234
- "0": {
235
- name: "punctuation.section.regexp.begin.elixir"
236
- }
237
- },
238
- end: "\\/[eimnosux]*",
239
- endCaptures: {
240
- "0": {
241
- name: "punctuation.section.regexp.end.elixir"
242
- }
243
- },
244
- name: "string.regexp.interpolated.elixir",
245
- patterns: [
246
- {
247
- include: "#regex_sub"
248
- }
249
- ]
250
- },
251
- {
252
- comment: "Regex sigil with brackets",
253
- begin: "~r\\[",
254
- beginCaptures: {
255
- "0": {
256
- name: "punctuation.section.regexp.begin.elixir"
257
- }
258
- },
259
- end: "\\][eimnosux]*",
260
- endCaptures: {
261
- "0": {
262
- name: "punctuation.section.regexp.end.elixir"
263
- }
264
- },
265
- name: "string.regexp.interpolated.elixir",
266
- patterns: [
267
- {
268
- include: "#regex_sub"
269
- },
270
- {
271
- include: "#nest_brackets"
272
- }
273
- ]
274
- },
275
- {
276
- comment: "Regex sigil with ltgt",
277
- begin: "~r\\<",
278
- beginCaptures: {
279
- "0": {
280
- name: "punctuation.section.regexp.begin.elixir"
281
- }
282
- },
283
- end: "\\>[eimnosux]*",
284
- endCaptures: {
285
- "0": {
286
- name: "punctuation.section.regexp.end.elixir"
287
- }
288
- },
289
- name: "string.regexp.interpolated.elixir",
290
- patterns: [
291
- {
292
- include: "#regex_sub"
293
- },
294
- {
295
- include: "#nest_ltgt"
296
- }
297
- ]
298
- },
299
- {
300
- comment: "Regex sigil with single quoted heredocs",
301
- begin: "~r\\'\\'\\'",
302
- beginCaptures: {
303
- "0": {
304
- name: "punctuation.section.regexp.begin.elixir"
305
- }
306
- },
307
- end: "\\'\\'\\'[eimnosux]*",
308
- endCaptures: {
309
- "0": {
310
- name: "punctuation.section.regexp.end.elixir"
311
- }
312
- },
313
- name: "string.regexp.interpolated.elixir",
314
- patterns: [
315
- {
316
- include: "#regex_sub"
317
- },
318
- {
319
- include: "#nest_ltgt"
320
- }
321
- ]
322
- },
323
- {
324
- comment: "Regex sigil with single quotes",
325
- begin: "~r\\\"\\\"\\\"",
326
- beginCaptures: {
327
- "0": {
328
- name: "punctuation.section.regexp.begin.elixir"
329
- }
330
- },
331
- end: "\\\"\\\"\\\"[eimnosux]*",
332
- endCaptures: {
333
- "0": {
334
- name: "punctuation.section.regexp.end.elixir"
335
- }
336
- },
337
- name: "string.regexp.interpolated.elixir",
338
- patterns: [
339
- {
340
- include: "#regex_sub"
341
- },
342
- {
343
- include: "#nest_ltgt"
344
- }
345
- ]
346
- },
347
- {
348
- comment: "Regex sigil with double quotes",
349
- begin: "~r\\\"",
350
- beginCaptures: {
351
- "0": {
352
- name: "punctuation.section.regexp.begin.elixir"
353
- }
354
- },
355
- end: "\\\"[eimnosux]*",
356
- endCaptures: {
357
- "0": {
358
- name: "punctuation.section.regexp.end.elixir"
359
- }
360
- },
361
- name: "string.regexp.interpolated.elixir",
362
- patterns: [
363
- {
364
- include: "#regex_sub"
365
- },
366
- {
367
- include: "#nest_ltgt"
368
- }
369
- ]
370
- },
371
- {
372
- comment: "Regex sigil with single quotes",
373
- begin: "~r\\'",
374
- beginCaptures: {
375
- "0": {
376
- name: "punctuation.section.regexp.begin.elixir"
377
- }
378
- },
379
- end: "\\'[eimnosux]*",
380
- endCaptures: {
381
- "0": {
382
- name: "punctuation.section.regexp.end.elixir"
383
- }
384
- },
385
- name: "string.regexp.interpolated.elixir",
386
- patterns: [
387
- {
388
- include: "#regex_sub"
389
- },
390
- {
391
- include: "#nest_ltgt"
392
- }
393
- ]
394
- },
395
- {
396
- comment: "Literal regex sigil with curlies",
397
- begin: "~R\\{",
398
- beginCaptures: {
399
- "0": {
400
- name: "punctuation.section.regexp.begin.elixir"
401
- }
402
- },
403
- end: "\\}[eimnosux]*",
404
- endCaptures: {
405
- "0": {
406
- name: "punctuation.section.regexp.end.elixir"
407
- }
408
- },
409
- name: "string.regexp.literal.elixir",
410
- patterns: [
411
- {
412
- include: "#nest_curly"
413
- }
414
- ]
415
- },
416
- {
417
- comment: "Literal regex sigil with pipes",
418
- begin: "~R\\|",
419
- beginCaptures: {
420
- "0": {
421
- name: "punctuation.section.regexp.begin.elixir"
422
- }
423
- },
424
- end: "\\|[eimnosux]*",
425
- endCaptures: {
426
- "0": {
427
- name: "punctuation.section.regexp.end.elixir"
428
- }
429
- },
430
- name: "string.regexp.literal.elixir"
431
- },
432
- {
433
- comment: "Literal regex sigil with parens",
434
- begin: "~R\\(",
435
- beginCaptures: {
436
- "0": {
437
- name: "punctuation.section.regexp.begin.elixir"
438
- }
439
- },
440
- end: "\\)[eimnosux]*",
441
- endCaptures: {
442
- "0": {
443
- name: "punctuation.section.regexp.end.elixir"
444
- }
445
- },
446
- name: "string.regexp.literal.elixir",
447
- patterns: [
448
- {
449
- include: "#nest_parens"
450
- }
451
- ]
452
- },
453
- {
454
- comment: "Literal regex sigil with slashes",
455
- begin: "~R\\/",
456
- beginCaptures: {
457
- "0": {
458
- name: "punctuation.section.regexp.begin.elixir"
459
- }
460
- },
461
- end: "\\/[eimnosux]*",
462
- endCaptures: {
463
- "0": {
464
- name: "punctuation.section.regexp.end.elixir"
465
- }
466
- },
467
- name: "string.regexp.literal.elixir"
468
- },
469
- {
470
- comment: "Literal regex sigil with brackets",
471
- begin: "~R\\[",
472
- beginCaptures: {
473
- "0": {
474
- name: "punctuation.section.regexp.begin.elixir"
475
- }
476
- },
477
- end: "\\][eimnosux]*",
478
- endCaptures: {
479
- "0": {
480
- name: "punctuation.section.regexp.end.elixir"
481
- }
482
- },
483
- name: "string.regexp.literal.elixir",
484
- patterns: [
485
- {
486
- include: "#nest_brackets"
487
- }
488
- ]
489
- },
490
- {
491
- comment: "Literal regex sigil with ltgt",
492
- begin: "~R\\<",
493
- beginCaptures: {
494
- "0": {
495
- name: "punctuation.section.regexp.begin.elixir"
496
- }
497
- },
498
- end: "\\>[eimnosux]*",
499
- endCaptures: {
500
- "0": {
501
- name: "punctuation.section.regexp.end.elixir"
502
- }
503
- },
504
- name: "string.regexp.literal.elixir",
505
- patterns: [
506
- {
507
- include: "#nest_ltgt"
508
- }
509
- ]
510
- },
511
- {
512
- comment: "Literal regex sigil with single quoted heredoc",
513
- begin: "~R\\'\\'\\'",
514
- beginCaptures: {
515
- "0": {
516
- name: "punctuation.section.regexp.begin.elixir"
517
- }
518
- },
519
- end: "\\'\\'\\'[eimnosux]*",
520
- endCaptures: {
521
- "0": {
522
- name: "punctuation.section.regexp.end.elixir"
523
- }
524
- },
525
- name: "string.regexp.literal.elixir",
526
- patterns: [
527
- {
528
- include: "#nest_ltgt"
529
- }
530
- ]
531
- },
532
- {
533
- comment: "Literal regex sigil with double quoted heredoc",
534
- begin: "~R\\\"\\\"\\\"",
535
- beginCaptures: {
536
- "0": {
537
- name: "punctuation.section.regexp.begin.elixir"
538
- }
539
- },
540
- end: "\\\"\\\"\\\"[eimnosux]*",
541
- endCaptures: {
542
- "0": {
543
- name: "punctuation.section.regexp.end.elixir"
544
- }
545
- },
546
- name: "string.regexp.literal.elixir",
547
- patterns: [
548
- {
549
- include: "#nest_ltgt"
550
- }
551
- ]
552
- },
553
- {
554
- comment: "Literal regex sigil with double quotes",
555
- begin: "~R\\\"",
556
- beginCaptures: {
557
- "0": {
558
- name: "punctuation.section.regexp.begin.elixir"
559
- }
560
- },
561
- end: "\\\"[eimnosux]*",
562
- endCaptures: {
563
- "0": {
564
- name: "punctuation.section.regexp.end.elixir"
565
- }
566
- },
567
- name: "string.regexp.literal.elixir",
568
- patterns: [
569
- {
570
- include: "#nest_ltgt"
571
- }
572
- ]
573
- },
574
- {
575
- comment: "Literal regex sigil with single quotes",
576
- begin: "~R\\'",
577
- beginCaptures: {
578
- "0": {
579
- name: "punctuation.section.regexp.begin.elixir"
580
- }
581
- },
582
- end: "\\'[eimnosux]*",
583
- endCaptures: {
584
- "0": {
585
- name: "punctuation.section.regexp.end.elixir"
586
- }
587
- },
588
- name: "string.regexp.literal.elixir",
589
- patterns: [
590
- {
591
- include: "#nest_ltgt"
592
- }
593
- ]
594
- },
595
- {
596
- comment: "Character list sigil with curlies",
597
- begin: "~c\\{",
598
- beginCaptures: {
599
- "0": {
600
- name: "punctuation.definition.string.begin.elixir"
601
- }
602
- },
603
- end: "\\}[a-z]*",
604
- endCaptures: {
605
- "0": {
606
- name: "punctuation.definition.string.end.elixir"
607
- }
608
- },
609
- name: "support.function.variable.quoted.single.elixir",
610
- patterns: [
611
- {
612
- include: "#interpolated_elixir"
613
- },
614
- {
615
- include: "#escaped_char"
616
- }
617
- ]
618
- },
619
- {
620
- comment: "Character list sigil with pipes",
621
- begin: "~c\\|",
622
- beginCaptures: {
623
- "0": {
624
- name: "punctuation.definition.string.begin.elixir"
625
- }
626
- },
627
- end: "\\|[a-z]*",
628
- endCaptures: {
629
- "0": {
630
- name: "punctuation.definition.string.end.elixir"
631
- }
632
- },
633
- name: "support.function.variable.quoted.single.elixir",
634
- patterns: [
635
- {
636
- include: "#interpolated_elixir"
637
- },
638
- {
639
- include: "#escaped_char"
640
- }
641
- ]
642
- },
643
- {
644
- comment: "Character list sigil with parens",
645
- begin: "~c\\(",
646
- beginCaptures: {
647
- "0": {
648
- name: "punctuation.definition.string.begin.elixir"
649
- }
650
- },
651
- end: "\\)[a-z]*",
652
- endCaptures: {
653
- "0": {
654
- name: "punctuation.definition.string.end.elixir"
655
- }
656
- },
657
- name: "support.function.variable.quoted.single.elixir",
658
- patterns: [
659
- {
660
- include: "#interpolated_elixir"
661
- },
662
- {
663
- include: "#escaped_char"
664
- }
665
- ]
666
- },
667
- {
668
- comment: "Character list sigil with curlies",
669
- begin: "~c\\<",
670
- beginCaptures: {
671
- "0": {
672
- name: "punctuation.definition.string.begin.elixir"
673
- }
674
- },
675
- end: "\\>[a-z]*",
676
- endCaptures: {
677
- "0": {
678
- name: "punctuation.definition.string.end.elixir"
679
- }
680
- },
681
- name: "support.function.variable.quoted.single.elixir",
682
- patterns: [
683
- {
684
- include: "#interpolated_elixir"
685
- },
686
- {
687
- include: "#escaped_char"
688
- }
689
- ]
690
- },
691
- {
692
- comment: "Character list sigil with curlies",
693
- begin: "~c\\[",
694
- beginCaptures: {
695
- "0": {
696
- name: "punctuation.definition.string.begin.elixir"
697
- }
698
- },
699
- end: "\\][a-z]*",
700
- endCaptures: {
701
- "0": {
702
- name: "punctuation.definition.string.end.elixir"
703
- }
704
- },
705
- name: "support.function.variable.quoted.single.elixir",
706
- patterns: [
707
- {
708
- include: "#interpolated_elixir"
709
- },
710
- {
711
- include: "#escaped_char"
712
- }
713
- ]
714
- },
715
- {
716
- comment: "Character list sigil with curlies",
717
- begin: "~c\\/",
718
- beginCaptures: {
719
- "0": {
720
- name: "punctuation.definition.string.begin.elixir"
721
- }
722
- },
723
- end: "\\/[a-z]*",
724
- endCaptures: {
725
- "0": {
726
- name: "punctuation.definition.string.end.elixir"
727
- }
728
- },
729
- name: "support.function.variable.quoted.single.elixir",
730
- patterns: [
731
- {
732
- include: "#interpolated_elixir"
733
- },
734
- {
735
- include: "#escaped_char"
736
- }
737
- ]
738
- },
739
- {
740
- comment: "Character list sigil with single quoted heredoc",
741
- begin: "~c\\'\\'\\'",
742
- beginCaptures: {
743
- "0": {
744
- name: "punctuation.definition.string.begin.elixir"
745
- }
746
- },
747
- end: "\\'\\'\\'[a-z]*",
748
- endCaptures: {
749
- "0": {
750
- name: "punctuation.definition.string.end.elixir"
751
- }
752
- },
753
- name: "support.function.variable.quoted.single.elixir",
754
- patterns: [
755
- {
756
- include: "#interpolated_elixir"
757
- },
758
- {
759
- include: "#escaped_char"
760
- }
761
- ]
762
- },
763
- {
764
- comment: "Character list sigil with double quoted heredoc",
765
- begin: "~c\\\"\\\"\\\"",
766
- beginCaptures: {
767
- "0": {
768
- name: "punctuation.definition.string.begin.elixir"
769
- }
770
- },
771
- end: "\\\"\\\"\\\"[a-z]*",
772
- endCaptures: {
773
- "0": {
774
- name: "punctuation.definition.string.end.elixir"
775
- }
776
- },
777
- name: "support.function.variable.quoted.single.elixir",
778
- patterns: [
779
- {
780
- include: "#interpolated_elixir"
781
- },
782
- {
783
- include: "#escaped_char"
784
- }
785
- ]
786
- },
787
- {
788
- comment: "Character list sigil with curlies",
789
- begin: "~c\\'",
790
- beginCaptures: {
791
- "0": {
792
- name: "punctuation.definition.string.begin.elixir"
793
- }
794
- },
795
- end: "\\'[a-z]*",
796
- endCaptures: {
797
- "0": {
798
- name: "punctuation.definition.string.end.elixir"
799
- }
800
- },
801
- name: "support.function.variable.quoted.single.elixir",
802
- patterns: [
803
- {
804
- include: "#interpolated_elixir"
805
- },
806
- {
807
- include: "#escaped_char"
808
- }
809
- ]
810
- },
811
- {
812
- comment: "Character list sigil with curlies",
813
- begin: "~c\\\"",
814
- beginCaptures: {
815
- "0": {
816
- name: "punctuation.definition.string.begin.elixir"
817
- }
818
- },
819
- end: "\\\"[a-z]*",
820
- endCaptures: {
821
- "0": {
822
- name: "punctuation.definition.string.end.elixir"
823
- }
824
- },
825
- name: "support.function.variable.quoted.single.elixir",
826
- patterns: [
827
- {
828
- include: "#interpolated_elixir"
829
- },
830
- {
831
- include: "#escaped_char"
832
- }
833
- ]
834
- },
835
- {
836
- comment: "Literal Character list sigil with curlies",
837
- begin: "~C\\{",
838
- beginCaptures: {
839
- "0": {
840
- name: "punctuation.definition.string.begin.elixir"
841
- }
842
- },
843
- end: "\\}[a-z]*",
844
- endCaptures: {
845
- "0": {
846
- name: "punctuation.definition.string.end.elixir"
847
- }
848
- },
849
- name: "support.function.variable.quoted.single.elixir"
850
- },
851
- {
852
- comment: "Literal Character list sigil with pipes",
853
- begin: "~C\\|",
854
- beginCaptures: {
855
- "0": {
856
- name: "punctuation.definition.string.begin.elixir"
857
- }
858
- },
859
- end: "\\|[a-z]*",
860
- endCaptures: {
861
- "0": {
862
- name: "punctuation.definition.string.end.elixir"
863
- }
864
- },
865
- name: "support.function.variable.quoted.single.elixir"
866
- },
867
- {
868
- comment: "Literal Character list sigil with parens",
869
- begin: "~C\\(",
870
- beginCaptures: {
871
- "0": {
872
- name: "punctuation.definition.string.begin.elixir"
873
- }
874
- },
875
- end: "\\)[a-z]*",
876
- endCaptures: {
877
- "0": {
878
- name: "punctuation.definition.string.end.elixir"
879
- }
880
- },
881
- name: "support.function.variable.quoted.single.elixir"
882
- },
883
- {
884
- comment: "Literal Character list sigil with curlies",
885
- begin: "~C\\<",
886
- beginCaptures: {
887
- "0": {
888
- name: "punctuation.definition.string.begin.elixir"
889
- }
890
- },
891
- end: "\\>[a-z]*",
892
- endCaptures: {
893
- "0": {
894
- name: "punctuation.definition.string.end.elixir"
895
- }
896
- },
897
- name: "support.function.variable.quoted.single.elixir"
898
- },
899
- {
900
- comment: "Literal Character list sigil with curlies",
901
- begin: "~C\\[",
902
- beginCaptures: {
903
- "0": {
904
- name: "punctuation.definition.string.begin.elixir"
905
- }
906
- },
907
- end: "\\][a-z]*",
908
- endCaptures: {
909
- "0": {
910
- name: "punctuation.definition.string.end.elixir"
911
- }
912
- },
913
- name: "support.function.variable.quoted.single.elixir"
914
- },
915
- {
916
- comment: "Literal Character list sigil with curlies",
917
- begin: "~C\\/",
918
- beginCaptures: {
919
- "0": {
920
- name: "punctuation.definition.string.begin.elixir"
921
- }
922
- },
923
- end: "\\/[a-z]*",
924
- endCaptures: {
925
- "0": {
926
- name: "punctuation.definition.string.end.elixir"
927
- }
928
- },
929
- name: "support.function.variable.quoted.single.elixir"
930
- },
931
- {
932
- comment: "Literal Character list sigil with single quoted heredoc",
933
- begin: "~C\\'\\'\\'",
934
- beginCaptures: {
935
- "0": {
936
- name: "punctuation.definition.string.begin.elixir"
937
- }
938
- },
939
- end: "\\'\\'\\'[a-z]*",
940
- endCaptures: {
941
- "0": {
942
- name: "punctuation.definition.string.end.elixir"
943
- }
944
- },
945
- name: "support.function.variable.quoted.single.elixir"
946
- },
947
- {
948
- comment: "Literal Character list sigil with double quoted heredoc",
949
- begin: "~C\\\"\\\"\\\"",
950
- beginCaptures: {
951
- "0": {
952
- name: "punctuation.definition.string.begin.elixir"
953
- }
954
- },
955
- end: "\\\"\\\"\\\"[a-z]*",
956
- endCaptures: {
957
- "0": {
958
- name: "punctuation.definition.string.end.elixir"
959
- }
960
- },
961
- name: "support.function.variable.quoted.single.elixir"
962
- },
963
- {
964
- comment: "Literal Character list sigil with curlies",
965
- begin: "~C\\'",
966
- beginCaptures: {
967
- "0": {
968
- name: "punctuation.definition.string.begin.elixir"
969
- }
970
- },
971
- end: "\\'[a-z]*",
972
- endCaptures: {
973
- "0": {
974
- name: "punctuation.definition.string.end.elixir"
975
- }
976
- },
977
- name: "support.function.variable.quoted.single.elixir"
978
- },
979
- {
980
- comment: "Literal Character list sigil with curlies",
981
- begin: "~C\\\"",
982
- beginCaptures: {
983
- "0": {
984
- name: "punctuation.definition.string.begin.elixir"
985
- }
986
- },
987
- end: "\\\"[a-z]*",
988
- endCaptures: {
989
- "0": {
990
- name: "punctuation.definition.string.end.elixir"
991
- }
992
- },
993
- name: "support.function.variable.quoted.single.elixir"
994
- },
995
- {
996
- begin: "~w\\{",
997
- beginCaptures: {
998
- "0": {
999
- name: "punctuation.section.list.begin.elixir"
1000
- }
1001
- },
1002
- comment: "sigil (allow for interpolation)",
1003
- end: "\\}[acs]*",
1004
- endCaptures: {
1005
- "0": {
1006
- name: "punctuation.section.list.end.elixir"
1007
- }
1008
- },
1009
- name: "string.quoted.double.interpolated.elixir",
1010
- patterns: [
1011
- {
1012
- include: "#interpolated_elixir"
1013
- },
1014
- {
1015
- include: "#escaped_char"
1016
- },
1017
- {
1018
- include: "#nest_curly"
1019
- }
1020
- ]
1021
- },
1022
- {
1023
- begin: "~w\\[",
1024
- beginCaptures: {
1025
- "0": {
1026
- name: "punctuation.section.list.begin.elixir"
1027
- }
1028
- },
1029
- comment: "sigil (allow for interpolation)",
1030
- end: "\\][acs]*",
1031
- endCaptures: {
1032
- "0": {
1033
- name: "punctuation.section.list.end.elixir"
1034
- }
1035
- },
1036
- name: "string.quoted.double.interpolated.elixir",
1037
- patterns: [
1038
- {
1039
- include: "#interpolated_elixir"
1040
- },
1041
- {
1042
- include: "#escaped_char"
1043
- },
1044
- {
1045
- include: "#nest_brackets"
1046
- }
1047
- ]
1048
- },
1049
- {
1050
- begin: "~w\\<",
1051
- beginCaptures: {
1052
- "0": {
1053
- name: "punctuation.section.list.begin.elixir"
1054
- }
1055
- },
1056
- comment: "sigil (allow for interpolation)",
1057
- end: "\\>[acs]*",
1058
- endCaptures: {
1059
- "0": {
1060
- name: "punctuation.section.list.end.elixir"
1061
- }
1062
- },
1063
- name: "string.quoted.double.interpolated.elixir",
1064
- patterns: [
1065
- {
1066
- include: "#interpolated_elixir"
1067
- },
1068
- {
1069
- include: "#escaped_char"
1070
- },
1071
- {
1072
- include: "#nest_ltgt"
1073
- }
1074
- ]
1075
- },
1076
- {
1077
- begin: "~w\\(",
1078
- beginCaptures: {
1079
- "0": {
1080
- name: "punctuation.section.list.begin.elixir"
1081
- }
1082
- },
1083
- comment: "sigil (allow for interpolation)",
1084
- end: "\\)[acs]*",
1085
- endCaptures: {
1086
- "0": {
1087
- name: "punctuation.section.list.end.elixir"
1088
- }
1089
- },
1090
- name: "string.quoted.double.interpolated.elixir",
1091
- patterns: [
1092
- {
1093
- include: "#interpolated_elixir"
1094
- },
1095
- {
1096
- include: "#escaped_char"
1097
- },
1098
- {
1099
- include: "#nest_parens"
1100
- }
1101
- ]
1102
- },
1103
- {
1104
- begin: "~w\\/",
1105
- beginCaptures: {
1106
- "0": {
1107
- name: "punctuation.section.list.begin.elixir"
1108
- }
1109
- },
1110
- comment: "sigil (allow for interpolation)",
1111
- end: "\\/[acs]*",
1112
- endCaptures: {
1113
- "0": {
1114
- name: "punctuation.section.list.end.elixir"
1115
- }
1116
- },
1117
- name: "string.quoted.double.interpolated.elixir",
1118
- patterns: [
1119
- {
1120
- include: "#interpolated_elixir"
1121
- },
1122
- {
1123
- include: "#escaped_char"
1124
- }
1125
- ]
1126
- },
1127
- {
1128
- begin: "~w\\|",
1129
- beginCaptures: {
1130
- "0": {
1131
- name: "punctuation.section.list.begin.elixir"
1132
- }
1133
- },
1134
- comment: "sigil (allow for interpolation)",
1135
- end: "\\|[acs]*",
1136
- endCaptures: {
1137
- "0": {
1138
- name: "punctuation.section.list.end.elixir"
1139
- }
1140
- },
1141
- name: "string.quoted.double.interpolated.elixir",
1142
- patterns: [
1143
- {
1144
- include: "#interpolated_elixir"
1145
- },
1146
- {
1147
- include: "#escaped_char"
1148
- }
1149
- ]
1150
- },
1151
- {
1152
- comment: "Interpolated word list sigil with single quoted heredoc",
1153
- begin: "~w\\'\\'\\'",
1154
- beginCaptures: {
1155
- "0": {
1156
- name: "punctuation.section.list.begin.elixir"
1157
- }
1158
- },
1159
- end: "\\'\\'\\'[acs]*",
1160
- endCaptures: {
1161
- "0": {
1162
- name: "punctuation.section.list.end.elixir"
1163
- }
1164
- },
1165
- name: "string.quoted.double.interpolated.elixir",
1166
- patterns: [
1167
- {
1168
- include: "#interpolated_elixir"
1169
- },
1170
- {
1171
- include: "#escaped_char"
1172
- }
1173
- ]
1174
- },
1175
- {
1176
- comment: "Interpolated word list sigil with double quoted heredoc",
1177
- begin: "~w\\\"\\\"\\\"",
1178
- beginCaptures: {
1179
- "0": {
1180
- name: "punctuation.section.list.begin.elixir"
1181
- }
1182
- },
1183
- end: "\\\"\\\"\\\"[acs]*",
1184
- endCaptures: {
1185
- "0": {
1186
- name: "punctuation.section.list.end.elixir"
1187
- }
1188
- },
1189
- name: "string.quoted.double.interpolated.elixir",
1190
- patterns: [
1191
- {
1192
- include: "#interpolated_elixir"
1193
- },
1194
- {
1195
- include: "#escaped_char"
1196
- }
1197
- ]
1198
- },
1199
- {
1200
- begin: "~w\\'",
1201
- beginCaptures: {
1202
- "0": {
1203
- name: "punctuation.section.list.begin.elixir"
1204
- }
1205
- },
1206
- comment: "sigil (allow for interpolation)",
1207
- end: "\\'[acs]*",
1208
- endCaptures: {
1209
- "0": {
1210
- name: "punctuation.section.list.end.elixir"
1211
- }
1212
- },
1213
- name: "string.quoted.double.interpolated.elixir",
1214
- patterns: [
1215
- {
1216
- include: "#interpolated_elixir"
1217
- },
1218
- {
1219
- include: "#escaped_char"
1220
- }
1221
- ]
1222
- },
1223
- {
1224
- begin: "~w\\\"",
1225
- beginCaptures: {
1226
- "0": {
1227
- name: "punctuation.section.list.begin.elixir"
1228
- }
1229
- },
1230
- comment: "sigil (allow for interpolation)",
1231
- end: "\\\"[acs]*",
1232
- endCaptures: {
1233
- "0": {
1234
- name: "punctuation.section.list.end.elixir"
1235
- }
1236
- },
1237
- name: "string.quoted.double.interpolated.elixir",
1238
- patterns: [
1239
- {
1240
- include: "#interpolated_elixir"
1241
- },
1242
- {
1243
- include: "#escaped_char"
1244
- }
1245
- ]
1246
- },
1247
- {
1248
- begin: "~W\\{",
1249
- beginCaptures: {
1250
- "0": {
1251
- name: "punctuation.section.list.begin.elixir"
1252
- }
1253
- },
1254
- comment: "sigil (without interpolation)",
1255
- end: "\\}[acs]*",
1256
- endCaptures: {
1257
- "0": {
1258
- name: "punctuation.section.list.end.elixir"
1259
- }
1260
- },
1261
- name: "string.quoted.double.literal.elixir"
1262
- },
1263
- {
1264
- begin: "~W\\[",
1265
- beginCaptures: {
1266
- "0": {
1267
- name: "punctuation.section.list.begin.elixir"
1268
- }
1269
- },
1270
- comment: "sigil (without interpolation)",
1271
- end: "\\][acs]*",
1272
- endCaptures: {
1273
- "0": {
1274
- name: "punctuation.section.list.end.elixir"
1275
- }
1276
- },
1277
- name: "string.quoted.double.literal.elixir",
1278
- patterns: [
1279
- {
1280
- include: "#nest_brackets"
1281
- }
1282
- ]
1283
- },
1284
- {
1285
- begin: "~W\\<",
1286
- beginCaptures: {
1287
- "0": {
1288
- name: "punctuation.section.list.begin.elixir"
1289
- }
1290
- },
1291
- comment: "sigil (without interpolation)",
1292
- end: "\\>[acs]*",
1293
- endCaptures: {
1294
- "0": {
1295
- name: "punctuation.section.list.end.elixir"
1296
- }
1297
- },
1298
- name: "string.quoted.double.literal.elixir",
1299
- patterns: [
1300
- {
1301
- include: "#nest_ltgt"
1302
- }
1303
- ]
1304
- },
1305
- {
1306
- begin: "~W\\(",
1307
- beginCaptures: {
1308
- "0": {
1309
- name: "punctuation.section.list.begin.elixir"
1310
- }
1311
- },
1312
- comment: "sigil (without interpolation)",
1313
- end: "\\)[acs]*",
1314
- endCaptures: {
1315
- "0": {
1316
- name: "punctuation.section.list.end.elixir"
1317
- }
1318
- },
1319
- name: "string.quoted.double.literal.elixir",
1320
- patterns: [
1321
- {
1322
- include: "#nest_parens"
1323
- }
1324
- ]
1325
- },
1326
- {
1327
- begin: "~W\\/",
1328
- beginCaptures: {
1329
- "0": {
1330
- name: "punctuation.section.list.begin.elixir"
1331
- }
1332
- },
1333
- comment: "sigil (without interpolation)",
1334
- end: "\\/[acs]*",
1335
- endCaptures: {
1336
- "0": {
1337
- name: "punctuation.section.list.end.elixir"
1338
- }
1339
- },
1340
- name: "string.quoted.double.literal.elixir"
1341
- },
1342
- {
1343
- begin: "~W\\|",
1344
- beginCaptures: {
1345
- "0": {
1346
- name: "punctuation.section.list.begin.elixir"
1347
- }
1348
- },
1349
- comment: "sigil (without interpolation)",
1350
- end: "\\|[acs]*",
1351
- endCaptures: {
1352
- "0": {
1353
- name: "punctuation.section.list.end.elixir"
1354
- }
1355
- },
1356
- name: "string.quoted.double.literal.elixir"
1357
- },
1358
- {
1359
- comment: "Literal word list sigil with single quoted heredoc",
1360
- begin: "~W\\'\\'\\'",
1361
- beginCaptures: {
1362
- "0": {
1363
- name: "punctuation.section.list.begin.elixir"
1364
- }
1365
- },
1366
- end: "\\'\\'\\'[acs]*",
1367
- endCaptures: {
1368
- "0": {
1369
- name: "punctuation.section.list.end.elixir"
1370
- }
1371
- },
1372
- name: "string.quoted.double.literal.elixir"
1373
- },
1374
- {
1375
- comment: "Literal word list sigil with double quoted heredoc",
1376
- begin: "~W\\\"\\\"\\\"",
1377
- beginCaptures: {
1378
- "0": {
1379
- name: "punctuation.section.list.begin.elixir"
1380
- }
1381
- },
1382
- end: "\\\"\\\"\\\"[acs]*",
1383
- endCaptures: {
1384
- "0": {
1385
- name: "punctuation.section.list.end.elixir"
1386
- }
1387
- },
1388
- name: "string.quoted.double.literal.elixir"
1389
- },
1390
- {
1391
- begin: "~W\\'",
1392
- beginCaptures: {
1393
- "0": {
1394
- name: "punctuation.section.list.begin.elixir"
1395
- }
1396
- },
1397
- comment: "sigil (without interpolation)",
1398
- end: "\\'[acs]*",
1399
- endCaptures: {
1400
- "0": {
1401
- name: "punctuation.section.list.end.elixir"
1402
- }
1403
- },
1404
- name: "string.quoted.double.literal.elixir"
1405
- },
1406
- {
1407
- begin: "~W\\\"",
1408
- beginCaptures: {
1409
- "0": {
1410
- name: "punctuation.section.list.begin.elixir"
1411
- }
1412
- },
1413
- comment: "sigil (without interpolation)",
1414
- end: "\\\"[acs]*",
1415
- endCaptures: {
1416
- "0": {
1417
- name: "punctuation.section.list.end.elixir"
1418
- }
1419
- },
1420
- name: "string.quoted.double.literal.elixir"
1421
- },
1422
- {
1423
- begin: "~[a-z](?>\"\"\")",
1424
- beginCaptures: {
1425
- "0": {
1426
- name: "punctuation.definition.string.begin.elixir"
1427
- }
1428
- },
1429
- comment: "Double-quoted heredocs sigils",
1430
- end: "^\\s*\"\"\"",
1431
- endCaptures: {
1432
- "0": {
1433
- name: "punctuation.definition.string.end.elixir"
1434
- }
1435
- },
1436
- name: "string.quoted.double.heredoc.elixir",
1437
- patterns: [
1438
- {
1439
- include: "#interpolated_elixir"
1440
- },
1441
- {
1442
- include: "#escaped_char"
1443
- }
1444
- ]
1445
- },
1446
- {
1447
- begin: "~[a-z](?>''')",
1448
- beginCaptures: {
1449
- "0": {
1450
- name: "punctuation.definition.string.begin.elixir"
1451
- }
1452
- },
1453
- comment: "Double-quoted heredocs sigils",
1454
- end: "^\\s*'''",
1455
- endCaptures: {
1456
- "0": {
1457
- name: "punctuation.definition.string.end.elixir"
1458
- }
1459
- },
1460
- name: "string.quoted.double.heredoc.elixir",
1461
- patterns: [
1462
- {
1463
- include: "#interpolated_elixir"
1464
- },
1465
- {
1466
- include: "#escaped_char"
1467
- }
1468
- ]
1469
- },
1470
- {
1471
- begin: "~[a-z]\\{",
1472
- beginCaptures: {
1473
- "0": {
1474
- name: "punctuation.definition.string.begin.elixir"
1475
- }
1476
- },
1477
- comment: "sigil (allow for interpolation)",
1478
- end: "\\}[a-z]*",
1479
- endCaptures: {
1480
- "0": {
1481
- name: "punctuation.definition.string.end.elixir"
1482
- }
1483
- },
1484
- name: "string.quoted.double.interpolated.elixir",
1485
- patterns: [
1486
- {
1487
- include: "#interpolated_elixir"
1488
- },
1489
- {
1490
- include: "#escaped_char"
1491
- },
1492
- {
1493
- include: "#nest_curly"
1494
- }
1495
- ]
1496
- },
1497
- {
1498
- begin: "~[a-z]\\[",
1499
- beginCaptures: {
1500
- "0": {
1501
- name: "punctuation.definition.string.begin.elixir"
1502
- }
1503
- },
1504
- comment: "sigil (allow for interpolation)",
1505
- end: "\\][a-z]*",
1506
- endCaptures: {
1507
- "0": {
1508
- name: "punctuation.definition.string.end.elixir"
1509
- }
1510
- },
1511
- name: "string.quoted.double.interpolated.elixir",
1512
- patterns: [
1513
- {
1514
- include: "#interpolated_elixir"
1515
- },
1516
- {
1517
- include: "#escaped_char"
1518
- },
1519
- {
1520
- include: "#nest_brackets"
1521
- }
1522
- ]
1523
- },
1524
- {
1525
- begin: "~[a-z]\\<",
1526
- beginCaptures: {
1527
- "0": {
1528
- name: "punctuation.definition.string.begin.elixir"
1529
- }
1530
- },
1531
- comment: "sigil (allow for interpolation)",
1532
- end: "\\>[a-z]*",
1533
- endCaptures: {
1534
- "0": {
1535
- name: "punctuation.definition.string.end.elixir"
1536
- }
1537
- },
1538
- name: "string.quoted.double.interpolated.elixir",
1539
- patterns: [
1540
- {
1541
- include: "#interpolated_elixir"
1542
- },
1543
- {
1544
- include: "#escaped_char"
1545
- },
1546
- {
1547
- include: "#nest_ltgt"
1548
- }
1549
- ]
1550
- },
1551
- {
1552
- begin: "~[a-z]\\(",
1553
- beginCaptures: {
1554
- "0": {
1555
- name: "punctuation.definition.string.begin.elixir"
1556
- }
1557
- },
1558
- comment: "sigil (allow for interpolation)",
1559
- end: "\\)[a-z]*",
1560
- endCaptures: {
1561
- "0": {
1562
- name: "punctuation.definition.string.end.elixir"
1563
- }
1564
- },
1565
- name: "string.quoted.double.interpolated.elixir",
1566
- patterns: [
1567
- {
1568
- include: "#interpolated_elixir"
1569
- },
1570
- {
1571
- include: "#escaped_char"
1572
- },
1573
- {
1574
- include: "#nest_parens"
1575
- }
1576
- ]
1577
- },
1578
- {
1579
- begin: "~[a-z]\\/",
1580
- beginCaptures: {
1581
- "0": {
1582
- name: "punctuation.definition.string.begin.elixir"
1583
- }
1584
- },
1585
- comment: "sigil (allow for interpolation)",
1586
- end: "\\/[a-z]*",
1587
- endCaptures: {
1588
- "0": {
1589
- name: "punctuation.definition.string.end.elixir"
1590
- }
1591
- },
1592
- name: "string.quoted.double.interpolated.elixir",
1593
- patterns: [
1594
- {
1595
- include: "#interpolated_elixir"
1596
- },
1597
- {
1598
- include: "#escaped_char"
1599
- }
1600
- ]
1601
- },
1602
- {
1603
- begin: "~[a-z]\\'",
1604
- beginCaptures: {
1605
- "0": {
1606
- name: "punctuation.definition.string.begin.elixir"
1607
- }
1608
- },
1609
- comment: "sigil (allow for interpolation)",
1610
- end: "\\'[a-z]*",
1611
- endCaptures: {
1612
- "0": {
1613
- name: "punctuation.definition.string.end.elixir"
1614
- }
1615
- },
1616
- name: "string.quoted.double.interpolated.elixir",
1617
- patterns: [
1618
- {
1619
- include: "#interpolated_elixir"
1620
- },
1621
- {
1622
- include: "#escaped_char"
1623
- }
1624
- ]
1625
- },
1626
- {
1627
- begin: "~[a-z]\\\"",
1628
- beginCaptures: {
1629
- "0": {
1630
- name: "punctuation.definition.string.begin.elixir"
1631
- }
1632
- },
1633
- comment: "sigil (allow for interpolation)",
1634
- end: "\\\"[a-z]*",
1635
- endCaptures: {
1636
- "0": {
1637
- name: "punctuation.definition.string.end.elixir"
1638
- }
1639
- },
1640
- name: "string.quoted.double.interpolated.elixir",
1641
- patterns: [
1642
- {
1643
- include: "#interpolated_elixir"
1644
- },
1645
- {
1646
- include: "#escaped_char"
1647
- }
1648
- ]
1649
- },
1650
- {
1651
- begin: "~[a-z]\\|",
1652
- beginCaptures: {
1653
- "0": {
1654
- name: "punctuation.definition.string.begin.elixir"
1655
- }
1656
- },
1657
- comment: "sigil (allow for interpolation)",
1658
- end: "\\|[a-z]*",
1659
- endCaptures: {
1660
- "0": {
1661
- name: "punctuation.definition.string.end.elixir"
1662
- }
1663
- },
1664
- name: "string.quoted.double.interpolated.elixir",
1665
- patterns: [
1666
- {
1667
- include: "#interpolated_elixir"
1668
- },
1669
- {
1670
- include: "#escaped_char"
1671
- }
1672
- ]
1673
- },
1674
- {
1675
- begin: "~[A-Z](?>\"\"\")",
1676
- beginCaptures: {
1677
- "0": {
1678
- name: "punctuation.definition.string.begin.elixir"
1679
- }
1680
- },
1681
- comment: "Double-quoted heredocs sigils",
1682
- end: "^\\s*\"\"\"",
1683
- endCaptures: {
1684
- "0": {
1685
- name: "punctuation.definition.string.end.elixir"
1686
- }
1687
- },
1688
- name: "string.quoted.other.literal.elixir"
1689
- },
1690
- {
1691
- begin: "~[A-Z](?>''')",
1692
- beginCaptures: {
1693
- "0": {
1694
- name: "punctuation.definition.string.begin.elixir"
1695
- }
1696
- },
1697
- comment: "Double-quoted heredocs sigils",
1698
- end: "^\\s*'''",
1699
- endCaptures: {
1700
- "0": {
1701
- name: "punctuation.definition.string.end.elixir"
1702
- }
1703
- },
1704
- name: "string.quoted.other.literal.elixir"
1705
- },
1706
- {
1707
- begin: "~[A-Z]\\{",
1708
- beginCaptures: {
1709
- "0": {
1710
- name: "punctuation.definition.string.begin.elixir"
1711
- }
1712
- },
1713
- comment: "sigil (without interpolation)",
1714
- end: "\\}[a-z]*",
1715
- endCaptures: {
1716
- "0": {
1717
- name: "punctuation.definition.string.end.elixir"
1718
- }
1719
- },
1720
- name: "string.quoted.double.literal.elixir"
1721
- },
1722
- {
1723
- begin: "~[A-Z]\\[",
1724
- beginCaptures: {
1725
- "0": {
1726
- name: "punctuation.definition.string.begin.elixir"
1727
- }
1728
- },
1729
- comment: "sigil (without interpolation)",
1730
- end: "\\][a-z]*",
1731
- endCaptures: {
1732
- "0": {
1733
- name: "punctuation.definition.string.end.elixir"
1734
- }
1735
- },
1736
- name: "string.quoted.double.literal.elixir",
1737
- patterns: [
1738
- {
1739
- include: "#nest_brackets"
1740
- }
1741
- ]
1742
- },
1743
- {
1744
- begin: "~[A-Z]\\<",
1745
- beginCaptures: {
1746
- "0": {
1747
- name: "punctuation.definition.string.begin.elixir"
1748
- }
1749
- },
1750
- comment: "sigil (without interpolation)",
1751
- end: "\\>[a-z]*",
1752
- endCaptures: {
1753
- "0": {
1754
- name: "punctuation.definition.string.end.elixir"
1755
- }
1756
- },
1757
- name: "string.quoted.double.literal.elixir",
1758
- patterns: [
1759
- {
1760
- include: "#nest_ltgt"
1761
- }
1762
- ]
1763
- },
1764
- {
1765
- begin: "~[A-Z]\\(",
1766
- beginCaptures: {
1767
- "0": {
1768
- name: "punctuation.definition.string.begin.elixir"
1769
- }
1770
- },
1771
- comment: "sigil (without interpolation)",
1772
- end: "\\)[a-z]*",
1773
- endCaptures: {
1774
- "0": {
1775
- name: "punctuation.definition.string.end.elixir"
1776
- }
1777
- },
1778
- name: "string.quoted.double.literal.elixir",
1779
- patterns: [
1780
- {
1781
- include: "#nest_parens"
1782
- }
1783
- ]
1784
- },
1785
- {
1786
- begin: "~[A-Z]\\/",
1787
- beginCaptures: {
1788
- "0": {
1789
- name: "punctuation.definition.string.begin.elixir"
1790
- }
1791
- },
1792
- comment: "sigil (without interpolation)",
1793
- end: "\\/[a-z]*",
1794
- endCaptures: {
1795
- "0": {
1796
- name: "punctuation.definition.string.end.elixir"
1797
- }
1798
- },
1799
- name: "string.quoted.double.literal.elixir"
1800
- },
1801
- {
1802
- begin: "~[A-Z]\\'",
1803
- beginCaptures: {
1804
- "0": {
1805
- name: "punctuation.definition.string.begin.elixir"
1806
- }
1807
- },
1808
- comment: "sigil (without interpolation)",
1809
- end: "\\'[a-z]*",
1810
- endCaptures: {
1811
- "0": {
1812
- name: "punctuation.definition.string.end.elixir"
1813
- }
1814
- },
1815
- name: "string.quoted.double.literal.elixir"
1816
- },
1817
- {
1818
- begin: "~[A-Z]\\\"",
1819
- beginCaptures: {
1820
- "0": {
1821
- name: "punctuation.definition.string.begin.elixir"
1822
- }
1823
- },
1824
- comment: "sigil (without interpolation)",
1825
- end: "\\\"[a-z]*",
1826
- endCaptures: {
1827
- "0": {
1828
- name: "punctuation.definition.string.end.elixir"
1829
- }
1830
- },
1831
- name: "string.quoted.double.literal.elixir"
1832
- },
1833
- {
1834
- begin: "~[A-Z]\\|",
1835
- beginCaptures: {
1836
- "0": {
1837
- name: "punctuation.definition.string.begin.elixir"
1838
- }
1839
- },
1840
- comment: "sigil (without interpolation)",
1841
- end: "\\|[a-z]*",
1842
- endCaptures: {
1843
- "0": {
1844
- name: "punctuation.definition.string.end.elixir"
1845
- }
1846
- },
1847
- name: "string.quoted.double.literal.elixir"
1848
- },
1849
- {
1850
- begin: ":'",
1851
- captures: {
1852
- "0": {
1853
- name: "punctuation.definition.constant.elixir"
1854
- }
1855
- },
1856
- end: "'",
1857
- name: "constant.other.symbol.single-quoted.elixir",
1858
- patterns: [
1859
- {
1860
- include: "#interpolated_elixir"
1861
- },
1862
- {
1863
- include: "#escaped_char"
1864
- }
1865
- ]
1866
- },
1867
- {
1868
- comment: "symbols with single-quoted string, used as keys in Keyword lists.",
1869
- match: "(')((?:[^'\\\\]*(?:\\\\.[^'\\\\]*)*))(':)(?!:)",
1870
- name: "constant.other.symbol.single-quoted.elixir",
1871
- captures: {
1872
- "1": {
1873
- name: "punctuation.definition.constant.elixir"
1874
- },
1875
- "2": {
1876
- patterns: [
1877
- {
1878
- include: "#interpolated_elixir"
1879
- },
1880
- {
1881
- include: "#escaped_char"
1882
- }
1883
- ]
1884
- },
1885
- "3": {
1886
- name: "punctuation.definition.constant.elixir"
1887
- }
1888
- }
1889
- },
1890
- {
1891
- begin: ":\"",
1892
- captures: {
1893
- "0": {
1894
- name: "punctuation.definition.constant.elixir"
1895
- }
1896
- },
1897
- end: "\"",
1898
- name: "constant.other.symbol.double-quoted.elixir",
1899
- patterns: [
1900
- {
1901
- include: "#interpolated_elixir"
1902
- },
1903
- {
1904
- include: "#escaped_char"
1905
- }
1906
- ]
1907
- },
1908
- {
1909
- begin: "(?>''')",
1910
- beginCaptures: {
1911
- "0": {
1912
- name: "punctuation.definition.string.begin.elixir"
1913
- }
1914
- },
1915
- comment: "Single-quoted heredocs",
1916
- end: "^\\s*'''",
1917
- endCaptures: {
1918
- "0": {
1919
- name: "punctuation.definition.string.end.elixir"
1920
- }
1921
- },
1922
- name: "support.function.variable.quoted.single.heredoc.elixir",
1923
- patterns: [
1924
- {
1925
- include: "#interpolated_elixir"
1926
- },
1927
- {
1928
- include: "#escaped_char"
1929
- }
1930
- ]
1931
- },
1932
- {
1933
- begin: "'",
1934
- beginCaptures: {
1935
- "0": {
1936
- name: "punctuation.definition.string.begin.elixir"
1937
- }
1938
- },
1939
- comment: "single quoted string (allows for interpolation)",
1940
- end: "'",
1941
- endCaptures: {
1942
- "0": {
1943
- name: "punctuation.definition.string.end.elixir"
1944
- }
1945
- },
1946
- name: "support.function.variable.quoted.single.elixir",
1947
- patterns: [
1948
- {
1949
- include: "#interpolated_elixir"
1950
- },
1951
- {
1952
- include: "#escaped_char"
1953
- }
1954
- ]
1955
- },
1956
- {
1957
- begin: "(?>\"\"\")",
1958
- beginCaptures: {
1959
- "0": {
1960
- name: "punctuation.definition.string.begin.elixir"
1961
- }
1962
- },
1963
- comment: "Double-quoted heredocs",
1964
- end: "^\\s*\"\"\"",
1965
- endCaptures: {
1966
- "0": {
1967
- name: "punctuation.definition.string.end.elixir"
1968
- }
1969
- },
1970
- name: "string.quoted.double.heredoc.elixir",
1971
- patterns: [
1972
- {
1973
- include: "#interpolated_elixir"
1974
- },
1975
- {
1976
- include: "#escaped_char"
1977
- }
1978
- ]
1979
- },
1980
- {
1981
- comment: "symbols defined by double-quoted string, used as keys in Keyword lists.",
1982
- match: "(\")((?:[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*))(\":)(?!:)",
1983
- name: "constant.other.symbol.double-quoted.elixir",
1984
- captures: {
1985
- "1": {
1986
- name: "punctuation.definition.constant.elixir"
1987
- },
1988
- "2": {
1989
- patterns: [
1990
- {
1991
- include: "#interpolated_elixir"
1992
- },
1993
- {
1994
- include: "#escaped_char"
1995
- }
1996
- ]
1997
- },
1998
- "3": {
1999
- name: "punctuation.definition.constant.elixir"
2000
- }
2001
- }
2002
- },
2003
- {
2004
- begin: "\"",
2005
- beginCaptures: {
2006
- "0": {
2007
- name: "punctuation.definition.string.begin.elixir"
2008
- }
2009
- },
2010
- comment: "double quoted string (allows for interpolation)",
2011
- end: "\"",
2012
- endCaptures: {
2013
- "0": {
2014
- name: "punctuation.definition.string.end.elixir"
2015
- }
2016
- },
2017
- name: "string.quoted.double.elixir",
2018
- patterns: [
2019
- {
2020
- include: "#interpolated_elixir"
2021
- },
2022
- {
2023
- include: "#escaped_char"
2024
- }
2025
- ]
2026
- },
2027
- {
2028
- begin: "#",
2029
- beginCaptures: {
2030
- "0": {
2031
- name: "punctuation.definition.comment.elixir"
2032
- }
2033
- },
2034
- end: "\\n",
2035
- name: "comment.line.number-sign.elixir"
2036
- },
2037
- {
2038
- match: "\\b_([\\w]+[?!]?)",
2039
- name: "comment.unused.elixir"
2040
- },
2041
- {
2042
- match: "\\b_\\b",
2043
- name: "comment.wildcard.elixir"
2044
- },
2045
- {
2046
- comment: "matches questionmark-letters.\n\nexamples (1st alternation = hex):\n?\\x1 ?\\x61\n\nexamples (2nd alternation = octal):\n?\\0 ?\\07 ?\\017\n\nexamples (3rd alternation = escaped):\n?\\n ?\\b\n\nexamples (4th alternation = meta-ctrl):\n?\\C-a ?\\M-a ?\\C-\\M-\\C-\\M-a\n\nexamples (4th alternation = normal):\n?a ?A ?0\n?* ?\" ?(\n?. ?#\n\n\nthe negative lookbehind prevents against matching\np(42.tainted?)",
2047
- match: "(?<!\\w)\\?(\\\\(x\\h{1,2}(?!\\h)\\b|0[0-7]{0,2}(?![0-7])\\b|[^x0MC])|(\\\\[MC]-)+\\w|[^\\s\\\\])",
2048
- name: "constant.numeric.elixir"
2049
- },
2050
- {
2051
- match: "(\\|\\|\\||&&&|\\^\\^\\^|<<<|>>>|~~~)",
2052
- name: "keyword.operator.bitwise.elixir"
2053
- },
2054
- {
2055
- comment: "matches: | ++ -- ** \\ <- <> << >> :: .. |> => -> <|> <~> <~ <<~ ~> ~>>",
2056
- match: "\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\<\\-|<\\<\\~|\\<\\>|\\<\\<|\\>\\>|\\:\\:|\\.\\.|\\|>|=>|<\\|\\>|<~>|->|~>>|~>|<~|(?<!\\|)\\|(?!\\|)",
2057
- name: "keyword.operator.other.elixir"
2058
- },
2059
- {
2060
- match: "===?|!==?|<=?|>=?|=~",
2061
- name: "keyword.operator.comparison.elixir"
2062
- },
2063
- {
2064
- match: "(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b",
2065
- name: "keyword.operator.logical.elixir"
2066
- },
2067
- {
2068
- match: "(\\*|\\+|\\-|/)",
2069
- name: "keyword.operator.arithmetic.elixir"
2070
- },
2071
- {
2072
- match: "=",
2073
- name: "keyword.operator.assignment.elixir"
2074
- },
2075
- {
2076
- match: "\\;",
2077
- name: "punctuation.separator.statement.elixir"
2078
- },
2079
- {
2080
- match: ",",
2081
- name: "punctuation.separator.object.elixir"
2082
- },
2083
- {
2084
- match: "\\.",
2085
- name: "punctuation.separator.method.elixir"
2086
- },
2087
- {
2088
- match: "\\{|\\}",
2089
- name: "punctuation.section.scope.elixir"
2090
- },
2091
- {
2092
- match: "\\[\\]|\\[|\\]",
2093
- name: "punctuation.section.array.elixir"
2094
- },
2095
- {
2096
- match: "\\(|\\)",
2097
- name: "punctuation.section.function.elixir"
2098
- },
2099
- {
2100
- captures: {
2101
- "1": {
2102
- name: "punctuation.definition.variable.elixir"
2103
- }
2104
- },
2105
- match: "(@)[a-zA-Z_]\\w*",
2106
- name: "variable.other.readwrite.module.elixir"
2107
- },
2108
- {
2109
- captures: {
2110
- "1": {
2111
- name: "punctuation.definition.variable.elixir"
2112
- }
2113
- },
2114
- match: "(&)\\d*",
2115
- name: "variable.other.anonymous.elixir"
2116
- },
2117
- {
2118
- captures: {
2119
- "1": {
2120
- name: "punctuation.definition.constant.elixir"
2121
- }
2122
- },
2123
- comment: "symbols",
2124
- match: "(?<!:)(:)(?>[a-zA-Z_][\\w@]*(?>[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(\\^\\^)?)",
2125
- name: "constant.other.symbol.elixir"
2126
- },
2127
- {
2128
- match: ":",
2129
- name: "punctuation.separator.other.elixir"
2130
- }
18
+ var surroundingPairs = [
19
+ [
20
+ "{",
21
+ "}"
22
+ ],
23
+ [
24
+ "[",
25
+ "]"
26
+ ],
27
+ [
28
+ "(",
29
+ ")"
30
+ ],
31
+ [
32
+ "'",
33
+ "'"
34
+ ],
35
+ [
36
+ "\"",
37
+ "\""
38
+ ]
2131
39
  ];
2132
- var repository = {
2133
- escaped_char: {
2134
- match: "\\\\(?:[0-7]{1,3}|x[\\da-fA-F]{1,2}|.)",
2135
- name: "constant.character.escape.elixir"
2136
- },
2137
- function_parameter: {
2138
- match: "[_$a-z][$\\w]*[?!]?",
2139
- name: "parameter.variable.function.elixir"
2140
- },
2141
- interpolated_elixir: {
2142
- patterns: [
2143
- {
2144
- captures: {
2145
- "0": {
2146
- name: "punctuation.section.embedded.elixir"
2147
- },
2148
- "1": {
2149
- name: "source.elixir.embedded.source.empty"
2150
- }
2151
- },
2152
- match: "#\\{(\\})",
2153
- name: "source.elixir.embedded.source"
2154
- },
2155
- {
2156
- begin: "#\\{",
2157
- captures: {
2158
- "0": {
2159
- name: "punctuation.section.embedded.elixir"
2160
- }
2161
- },
2162
- end: "\\}",
2163
- name: "source.elixir.embedded.source",
2164
- patterns: [
2165
- {
2166
- include: "#nest_curly_and_self"
2167
- },
2168
- {
2169
- include: "$self"
2170
- }
2171
- ]
2172
- }
2173
- ]
2174
- },
2175
- nest_brackets: {
2176
- begin: "\\[",
2177
- captures: {
2178
- "0": {
2179
- name: "punctuation.section.scope.elixir"
2180
- }
2181
- },
2182
- end: "\\]",
2183
- patterns: [
2184
- {
2185
- include: "#nest_brackets"
2186
- }
2187
- ]
2188
- },
2189
- nest_curly: {
2190
- begin: "\\{",
2191
- captures: {
2192
- "0": {
2193
- name: "punctuation.section.scope.elixir"
2194
- }
2195
- },
2196
- end: "\\}",
2197
- patterns: [
2198
- {
2199
- include: "#nest_curly"
2200
- }
2201
- ]
2202
- },
2203
- nest_curly_and_self: {
2204
- patterns: [
2205
- {
2206
- begin: "\\{",
2207
- captures: {
2208
- "0": {
2209
- name: "punctuation.section.scope.elixir"
2210
- }
2211
- },
2212
- end: "\\}",
2213
- patterns: [
2214
- {
2215
- include: "#nest_curly_and_self"
2216
- }
2217
- ]
2218
- },
2219
- {
2220
- include: "$self"
2221
- }
2222
- ]
2223
- },
2224
- nest_ltgt: {
2225
- begin: "\\<",
2226
- captures: {
2227
- "0": {
2228
- name: "punctuation.section.scope.elixir"
2229
- }
2230
- },
2231
- end: "\\>",
2232
- patterns: [
2233
- {
2234
- include: "#nest_ltgt"
2235
- }
2236
- ]
2237
- },
2238
- nest_parens: {
2239
- begin: "\\(",
2240
- captures: {
2241
- "0": {
2242
- name: "punctuation.section.scope.elixir"
2243
- }
2244
- },
2245
- end: "\\)",
2246
- patterns: [
2247
- {
2248
- include: "#nest_parens"
2249
- }
2250
- ]
2251
- },
2252
- regex_sub: {
2253
- name: "string.interpolated.regexp.elixir",
2254
- patterns: [
2255
- {
2256
- include: "#interpolated_elixir"
2257
- },
2258
- {
2259
- include: "#escaped_char"
2260
- },
2261
- {
2262
- name: "string.regexp.arbitrary-repitition.elixir",
2263
- match: "(\\{)\\d+(,\\d+)?(\\})",
2264
- captures: {
2265
- "1": {
2266
- name: "punctuation.definition.arbitrary-repitition.elixir"
2267
- },
2268
- "3": {
2269
- name: "punctuation.definition.arbitrary-repitition.elixir"
2270
- }
2271
- }
2272
- },
2273
- {
2274
- name: "string.regexp.character-class.elixir",
2275
- begin: "\\[(?:\\^?\\])?",
2276
- end: "\\]",
2277
- captures: {
2278
- "0": {
2279
- name: "punctuation.definition.character-class.elixir"
2280
- }
2281
- },
2282
- patterns: [
2283
- {
2284
- include: "#escaped_char"
2285
- }
2286
- ]
2287
- },
2288
- {
2289
- begin: "\\(",
2290
- captures: {
2291
- "0": {
2292
- name: "punctuation.definition.group.elixir"
2293
- }
2294
- },
2295
- end: "\\)",
2296
- name: "string.regexp.group.elixir",
2297
- patterns: [
2298
- {
2299
- include: "#regex_sub"
2300
- }
2301
- ]
2302
- },
2303
- {
2304
- begin: "(?<=^|\\s)(#)\\s(?=[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$)",
2305
- beginCaptures: {
2306
- "1": {
2307
- name: "punctuation.definition.comment.elixir"
2308
- }
2309
- },
2310
- comment: "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.",
2311
- end: "$\\n?",
2312
- endCaptures: {
2313
- "0": {
2314
- name: "punctuation.definition.comment.elixir"
2315
- }
2316
- },
2317
- name: "comment.line.number-sign.elixir"
2318
- }
2319
- ]
2320
- }
2321
- };
2322
- var scopeName = "source.elixir";
2323
- var information_for_contributors = [
2324
- "This file has been converted from https://github.com/timmhirsens/vscode-elixir/blob/master/",
2325
- "If you want to provide a fix or improvement, please create a pull request against the original repository.",
2326
- "Once accepted there, we are happy to receive an update request."
40
+ var autoClosingPairs = [
41
+ [
42
+ "'",
43
+ "'"
44
+ ],
45
+ [
46
+ "\"",
47
+ "\""
48
+ ],
49
+ [
50
+ "(",
51
+ ")"
52
+ ],
53
+ [
54
+ "{",
55
+ "}"
56
+ ],
57
+ [
58
+ "[",
59
+ "]"
60
+ ]
2327
61
  ];
2328
62
  var elixir = {
2329
- comment: comment,
2330
- fileTypes: fileTypes,
2331
- firstLineMatch: firstLineMatch,
2332
- foldingStartMarker: foldingStartMarker,
2333
- foldingStopMarker: foldingStopMarker,
2334
- name: name,
2335
- patterns: patterns,
2336
- repository: repository,
2337
- scopeName: scopeName,
2338
- information_for_contributors: information_for_contributors
63
+ comments: comments,
64
+ brackets: brackets,
65
+ surroundingPairs: surroundingPairs,
66
+ autoClosingPairs: autoClosingPairs
2339
67
  };
2340
68
 
2341
- export { comment, elixir as default, fileTypes, firstLineMatch, foldingStartMarker, foldingStopMarker, information_for_contributors, name, patterns, repository, scopeName };
69
+ export { autoClosingPairs, brackets, comments, elixir as default, surroundingPairs };