@codingame/monaco-editor-wrapper 3.4.1 → 3.5.0

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 (81) hide show
  1. package/dist/{HTML (Eex).js → HTML (Eex)2.js} +0 -0
  2. package/dist/JavaScript.tmLanguage.js +13 -7
  3. package/dist/JavaScriptReact.tmLanguage.js +13 -7
  4. package/dist/Scala.tmLanguage.js +1 -1
  5. package/dist/TypeScript.tmLanguage.js +13 -7
  6. package/dist/TypeScriptReact.tmLanguage.js +13 -7
  7. package/dist/atd.js +90 -94
  8. package/dist/atd2.js +94 -90
  9. package/dist/c.js +8 -0
  10. package/dist/cpp.js +8 -0
  11. package/dist/cpp.tmLanguage.js +150 -112
  12. package/dist/cpptools.js +133 -40
  13. package/dist/css.worker.js +1 -1
  14. package/dist/cuda-cpp.js +8 -0
  15. package/dist/d.js +3157 -84
  16. package/dist/d2.js +84 -3157
  17. package/dist/d3.js +4 -2
  18. package/dist/dart.js +510 -83
  19. package/dist/dart2.js +83 -510
  20. package/dist/dart3.js +0 -6
  21. package/dist/diet.js +740 -82
  22. package/dist/diet2.js +82 -740
  23. package/dist/django-html.js +155 -0
  24. package/dist/django-html.tmLanguage.js +715 -0
  25. package/dist/django-txt.js +155 -0
  26. package/dist/django-txt.tmLanguage.js +269 -0
  27. package/dist/dml.js +155 -76
  28. package/dist/dml2.js +76 -155
  29. package/dist/dune-project.js +469 -53
  30. package/dist/dune-project2.js +53 -469
  31. package/dist/dune-workspace.js +287 -54
  32. package/dist/dune-workspace2.js +54 -287
  33. package/dist/dune.js +2948 -51
  34. package/dist/dune2.js +51 -2948
  35. package/dist/elixir.js +2335 -63
  36. package/dist/elixir2.js +63 -2335
  37. package/dist/features/cssContribution.js +1 -4
  38. package/dist/features/extensionConfigurations.js +25 -122
  39. package/dist/features/htmlContribution.js +4 -18
  40. package/dist/features/jsonContribution.js +1 -8
  41. package/dist/features/typescriptContribution.js +4 -8
  42. package/dist/{html (eex)2.js → html (eex).js} +0 -0
  43. package/dist/html-html.code-snippets.js +20 -0
  44. package/dist/html.worker.js +1 -1
  45. package/dist/index.js +2178 -1355
  46. package/dist/index2.js +1362 -2186
  47. package/dist/java2.js +32 -9
  48. package/dist/json.worker.js +1 -1
  49. package/dist/lua2.js +35 -0
  50. package/dist/main.js +322 -1420
  51. package/dist/ocaml.interface.js +273 -95
  52. package/dist/ocaml.interface2.js +95 -273
  53. package/dist/ocaml.js +884 -95
  54. package/dist/ocaml2.js +95 -884
  55. package/dist/omnisharp.js +6 -0
  56. package/dist/php-php.code-snippets.js +2 -0
  57. package/dist/r.js +657 -81
  58. package/dist/r2.js +81 -657
  59. package/dist/scalameta.js +5 -4
  60. package/dist/sdl.js +150 -78
  61. package/dist/sdl2.js +78 -150
  62. package/dist/semanticdb.js +62 -0
  63. package/dist/solidity.js +1172 -56
  64. package/dist/solidity2.js +56 -1172
  65. package/dist/solidity3.js +6 -5
  66. package/dist/svelte.svelte-vscode-javascript.js +45 -0
  67. package/dist/svelte.svelte-vscode-typescript.js +43 -0
  68. package/dist/svelte.svelte-vscode.js +8 -1
  69. package/dist/svelte.tmLanguage.src.yaml.js +3 -3
  70. package/dist/theme-defaults~light_vs.js +3 -2
  71. package/dist/ts.worker.js +1 -1
  72. package/dist/typescript-basics-typescript.code-snippets.js +1 -0
  73. package/dist/vim.js +8 -8
  74. package/dist/vscode-django-filters.js +340 -0
  75. package/dist/vscode-django.js +37 -0
  76. package/dist/vscode-python.js +4 -8
  77. package/dist/vue-sugarss.js +390 -54
  78. package/dist/vue-sugarss2.js +54 -390
  79. package/dist/worker.js +1 -3
  80. package/package.json +29 -26
  81. package/stats.html +44 -34
package/dist/ocaml2.js CHANGED
@@ -1,903 +1,114 @@
1
- var name = "OCaml";
2
- var scopeName = "source.ocaml";
3
- var fileTypes = [
4
- "ml",
5
- "eliom",
6
- ".ocamlinit"
7
- ];
8
- var patterns = [
9
- {
10
- include: "#directives"
11
- },
12
- {
13
- include: "#comments"
14
- },
15
- {
16
- include: "#strings"
17
- },
18
- {
19
- include: "#characters"
20
- },
21
- {
22
- include: "#attributes"
23
- },
24
- {
25
- include: "#extensions"
26
- },
1
+ var autoClosingPairs = [
27
2
  {
28
- include: "#modules"
3
+ open: "{",
4
+ close: "}"
29
5
  },
30
6
  {
31
- include: "#bindings"
7
+ open: "[",
8
+ close: "]"
32
9
  },
33
10
  {
34
- include: "#operators"
11
+ open: "(",
12
+ close: ")"
35
13
  },
36
14
  {
37
- include: "#keywords"
38
- },
39
- {
40
- include: "#literals"
15
+ open: "\"",
16
+ close: "\"",
17
+ notIn: [
18
+ "string"
19
+ ]
41
20
  },
42
21
  {
43
- include: "#types"
22
+ open: "(*",
23
+ close: "*",
24
+ notIn: [
25
+ "string"
26
+ ]
44
27
  },
45
28
  {
46
- include: "#identifiers"
29
+ open: "[|",
30
+ close: "|",
31
+ notIn: [
32
+ "string"
33
+ ]
47
34
  }
48
35
  ];
49
- var repository = {
50
- directives: {
51
- patterns: [
52
- {
53
- comment: "line number directive",
54
- begin: "^[[:space:]]*(#)[[:space:]]*([[:digit:]]+)",
55
- end: "$",
56
- beginCaptures: {
57
- "1": {
58
- name: "keyword.other.ocaml"
59
- },
60
- "2": {
61
- name: "constant.numeric.decimal.integer.ocaml"
62
- }
63
- },
64
- contentName: "comment.line.directive.ocaml"
65
- },
66
- {
67
- comment: "toplevel directives",
68
- patterns: [
69
- {
70
- comment: "general, loading codes",
71
- begin: "^[[:space:]]*(#)[[:space:]]*(help|quit|cd|directory|remove_directory|load_rec|load|use|mod_use)",
72
- end: "$",
73
- beginCaptures: {
74
- "1": {
75
- name: "keyword.other.ocaml"
76
- },
77
- "2": {
78
- name: "keyword.other.ocaml"
79
- }
80
- },
81
- patterns: [
82
- {
83
- include: "#strings"
84
- }
85
- ]
86
- },
87
- {
88
- comment: "environment queries",
89
- begin: "^[[:space:]]*(#)[[:space:]]*(show_class_type|show_class|show_exception|show_module_type|show_module|show_type|show_val|show)",
90
- end: "$",
91
- beginCaptures: {
92
- "1": {
93
- name: "keyword.other.ocaml"
94
- },
95
- "2": {
96
- name: "keyword.other.ocaml"
97
- }
98
- },
99
- patterns: [
100
- {
101
- include: "#types"
102
- },
103
- {
104
- include: "#identifiers"
105
- }
106
- ]
107
- },
108
- {
109
- comment: "pretty-printing, tracing",
110
- begin: "^[[:space:]]*(#)[[:space:]]*(install_printer|print_depth|print_length|remove_printer|trace|untrace_all|untrace)",
111
- end: "$",
112
- beginCaptures: {
113
- "1": {
114
- name: "keyword.other.ocaml"
115
- },
116
- "2": {
117
- name: "keyword.other.ocaml"
118
- }
119
- },
120
- patterns: [
121
- {
122
- include: "#literals"
123
- },
124
- {
125
- include: "#identifiers"
126
- }
127
- ]
128
- },
129
- {
130
- comment: "compiler options",
131
- begin: "^[[:space:]]*(#)[[:space:]]*(labels|ppx|principal|rectypes|warn_error|warnings)",
132
- end: "$",
133
- beginCaptures: {
134
- "1": {
135
- name: "keyword.other.ocaml"
136
- },
137
- "2": {
138
- name: "keyword.other.ocaml"
139
- }
140
- },
141
- patterns: [
142
- {
143
- include: "#strings"
144
- },
145
- {
146
- include: "#literals"
147
- }
148
- ]
149
- }
150
- ]
151
- },
152
- {
153
- comment: "topfind directives",
154
- begin: "^[[:space:]]*(#)[[:space:]]*(require|list|camlp4o|camlp4r|predicates|thread)",
155
- end: "$",
156
- beginCaptures: {
157
- "1": {
158
- name: "keyword.other.ocaml"
159
- },
160
- "2": {
161
- name: "keyword.other.ocaml"
162
- }
163
- },
164
- patterns: [
165
- {
166
- include: "#strings"
167
- }
168
- ]
169
- },
170
- {
171
- comment: "cppo directives",
172
- begin: "^[[:space:]]*(#)[[:space:]]*(define|undef|ifdef|ifndef|if|else|elif|endif|include|warning|error|ext|endext)",
173
- end: "$",
174
- beginCaptures: {
175
- "1": {
176
- name: "keyword.other.ocaml"
177
- },
178
- "2": {
179
- name: "keyword.other.ocaml"
180
- }
181
- },
182
- patterns: [
183
- {
184
- name: "keyword.other.ocaml",
185
- match: "\\b(defined)\\b"
186
- },
187
- {
188
- name: "keyword.other.ocaml",
189
- match: "\\\\"
190
- },
191
- {
192
- include: "#comments"
193
- },
194
- {
195
- include: "#strings"
196
- },
197
- {
198
- include: "#characters"
199
- },
200
- {
201
- include: "#keywords"
202
- },
203
- {
204
- include: "#operators"
205
- },
206
- {
207
- include: "#literals"
208
- },
209
- {
210
- include: "#types"
211
- },
212
- {
213
- include: "#identifiers"
214
- }
215
- ]
216
- }
217
- ]
218
- },
219
- comments: {
220
- patterns: [
221
- {
222
- comment: "empty comment",
223
- name: "comment.block.ocaml",
224
- match: "\\(\\*\\*\\)"
225
- },
226
- {
227
- comment: "ocamldoc comment",
228
- name: "comment.doc.ocaml",
229
- begin: "\\(\\*\\*",
230
- end: "\\*\\)",
231
- patterns: [
232
- {
233
- include: "source.ocaml.ocamldoc#markup"
234
- },
235
- {
236
- include: "#strings-in-comments"
237
- },
238
- {
239
- include: "#comments"
240
- }
241
- ]
242
- },
243
- {
244
- comment: "Cinaps comment",
245
- begin: "\\(\\*\\$",
246
- end: "\\*\\)",
247
- beginCaptures: [
248
- {
249
- name: "comment.cinaps.ocaml"
250
- }
251
- ],
252
- endCaptures: [
253
- {
254
- name: "comment.cinaps.ocaml"
255
- }
256
- ],
257
- patterns: [
258
- {
259
- include: "$self"
260
- }
261
- ]
262
- },
263
- {
264
- comment: "block comment",
265
- name: "comment.block.ocaml",
266
- begin: "\\(\\*",
267
- end: "\\*\\)",
268
- patterns: [
269
- {
270
- include: "#strings-in-comments"
271
- },
272
- {
273
- include: "#comments"
274
- }
275
- ]
276
- }
277
- ]
278
- },
279
- "strings-in-comments": {
280
- patterns: [
281
- {
282
- comment: "char literal",
283
- match: "'(\\\\)?.'"
284
- },
285
- {
286
- comment: "string literal",
287
- begin: "\"",
288
- end: "\"",
289
- patterns: [
290
- {
291
- match: "\\\\\\\\"
292
- },
293
- {
294
- match: "\\\\\""
295
- }
296
- ]
297
- },
298
- {
299
- comment: "quoted string literal",
300
- begin: "\\{[[:lower:]_]*\\|",
301
- end: "\\|[[:lower:]_]*\\}"
302
- }
303
- ]
304
- },
305
- strings: {
306
- patterns: [
307
- {
308
- comment: "quoted string literal",
309
- name: "string.quoted.braced.ocaml",
310
- begin: "\\{(%%?[[:alpha:]_][[:word:]']*(\\.[[:alpha:]_][[:word:]']*)*[[:space:]]*)?[[:lower:]_]*\\|",
311
- end: "\\|[[:lower:]_]*\\}",
312
- beginCaptures: {
313
- "1": {
314
- name: "keyword.other.extension.ocaml"
315
- }
316
- }
317
- },
318
- {
319
- comment: "string literal",
320
- name: "string.quoted.double.ocaml",
321
- begin: "\"",
322
- end: "\"",
323
- patterns: [
324
- {
325
- comment: "escaped newline",
326
- name: "constant.character.escape.ocaml",
327
- match: "\\\\$"
328
- },
329
- {
330
- comment: "escaped backslash",
331
- name: "constant.character.escape.ocaml",
332
- match: "\\\\\\\\"
333
- },
334
- {
335
- comment: "escaped quote or whitespace",
336
- name: "constant.character.escape.ocaml",
337
- match: "\\\\[\"'ntbr ]"
338
- },
339
- {
340
- comment: "character from decimal ASCII code",
341
- name: "constant.character.escape.ocaml",
342
- match: "\\\\[[:digit:]]{3}"
343
- },
344
- {
345
- comment: "character from hexadecimal ASCII code",
346
- name: "constant.character.escape.ocaml",
347
- match: "\\\\x[[:xdigit:]]{2}"
348
- },
349
- {
350
- comment: "character from octal ASCII code",
351
- name: "constant.character.escape.ocaml",
352
- match: "\\\\o[0-3][0-7]{2}"
353
- },
354
- {
355
- comment: "unicode character escape sequence",
356
- name: "constant.character.escape.ocaml",
357
- match: "\\\\u\\{[[:xdigit:]]{1,6}\\}"
358
- },
359
- {
360
- comment: "printf format string",
361
- name: "constant.character.printf.ocaml",
362
- match: "%[-0+ #]*([[:digit:]]+|\\*)?(.([[:digit:]]+|\\*))?[lLn]?[diunlLNxXosScCfFeEgGhHBbat!%@,]"
363
- },
364
- {
365
- comment: "unknown escape sequence",
366
- name: "invalid.illegal.unknown-escape.ocaml",
367
- match: "\\\\."
368
- }
369
- ]
370
- }
371
- ]
372
- },
373
- characters: {
374
- patterns: [
375
- {
376
- comment: "character literal from escaped backslash",
377
- name: "string.quoted.single.ocaml",
378
- match: "'(\\\\\\\\)'",
379
- captures: {
380
- "1": {
381
- name: "constant.character.escape.ocaml"
382
- }
383
- }
384
- },
385
- {
386
- comment: "character literal from escaped quote or whitespace",
387
- name: "string.quoted.single.ocaml",
388
- match: "'(\\\\[\"'ntbr ])'",
389
- captures: {
390
- "1": {
391
- name: "constant.character.escape.ocaml"
392
- }
393
- }
394
- },
395
- {
396
- comment: "character literal from decimal ASCII code",
397
- name: "string.quoted.single.ocaml",
398
- match: "'(\\\\[[:digit:]]{3})'",
399
- captures: {
400
- "1": {
401
- name: "constant.character.escape.ocaml"
402
- }
403
- }
404
- },
405
- {
406
- comment: "character literal from hexadecimal ASCII code",
407
- name: "string.quoted.single.ocaml",
408
- match: "'(\\\\x[[:xdigit:]]{2})'",
409
- captures: {
410
- "1": {
411
- name: "constant.character.escape.ocaml"
412
- }
413
- }
414
- },
415
- {
416
- comment: "character literal from octal ASCII code",
417
- name: "string.quoted.single.ocaml",
418
- match: "'(\\\\o[0-3][0-7]{2})'",
419
- captures: {
420
- "1": {
421
- name: "constant.character.escape.ocaml"
422
- }
423
- }
424
- },
425
- {
426
- comment: "character literal from unknown escape sequence",
427
- name: "string.quoted.single.ocaml",
428
- match: "'(\\\\.)'",
429
- captures: {
430
- "1": {
431
- name: "invalid.illegal.unknown-escape.ocaml"
432
- }
433
- }
434
- },
435
- {
436
- comment: "character literal",
437
- name: "string.quoted.single.ocaml",
438
- match: "'.'"
439
- }
440
- ]
441
- },
442
- attributes: {
443
- begin: "\\[(@|@@|@@@)[[:space:]]*([[:alpha:]_]+(\\.[[:word:]']+)*)",
444
- end: "\\]",
445
- beginCaptures: {
446
- "1": {
447
- name: "keyword.operator.attribute.ocaml"
448
- },
449
- "2": {
450
- name: "keyword.other.attribute.ocaml",
451
- patterns: [
452
- {
453
- name: "keyword.other.ocaml punctuation.other.period punctuation.separator.period",
454
- match: "\\."
455
- }
456
- ]
457
- }
458
- },
459
- patterns: [
460
- {
461
- include: "$self"
462
- }
463
- ]
464
- },
465
- extensions: {
466
- begin: "\\[(%|%%)[[:space:]]*([[:alpha:]_]+(\\.[[:word:]']+)*)",
467
- end: "\\]",
468
- beginCaptures: {
469
- "1": {
470
- name: "keyword.operator.extension.ocaml"
471
- },
472
- "2": {
473
- name: "keyword.other.extension.ocaml",
474
- patterns: [
475
- {
476
- name: "keyword.other.ocaml punctuation.other.period punctuation.separator.period",
477
- match: "\\."
478
- }
479
- ]
480
- }
481
- },
482
- patterns: [
483
- {
484
- include: "$self"
485
- }
486
- ]
487
- },
488
- modules: {
489
- patterns: [
490
- {
491
- begin: "\\b(sig)\\b",
492
- end: "\\b(end)\\b",
493
- beginCaptures: [
494
- {
495
- name: "keyword.other.ocaml"
496
- }
497
- ],
498
- endCaptures: [
499
- {
500
- name: "keyword.other.ocaml"
501
- }
502
- ],
503
- patterns: [
504
- {
505
- include: "source.ocaml.interface"
506
- }
507
- ]
508
- },
509
- {
510
- begin: "\\b(struct)\\b",
511
- end: "\\b(end)\\b",
512
- beginCaptures: [
513
- {
514
- name: "keyword.other.ocaml"
515
- }
516
- ],
517
- endCaptures: [
518
- {
519
- name: "keyword.other.ocaml"
520
- }
521
- ],
522
- patterns: [
523
- {
524
- include: "$self"
525
- }
526
- ]
527
- }
528
- ]
529
- },
530
- bindings: {
531
- patterns: [
532
- {
533
- comment: "for loop",
534
- match: "\\b(for)[[:space:]]+([[:lower:]_][[:word:]']*)",
535
- captures: {
536
- "1": {
537
- name: "keyword.ocaml"
538
- },
539
- "2": {
540
- name: "entity.name.function.binding.ocaml"
541
- }
542
- }
543
- },
544
- {
545
- comment: "local open/exception/module",
546
- match: "\\b(let)[[:space:]]+(open|exception|module)\\b(?!')",
547
- captures: {
548
- "1": {
549
- name: "keyword.ocaml"
550
- },
551
- "2": {
552
- name: "keyword.ocaml"
553
- }
554
- }
555
- },
556
- {
557
- comment: "let expression",
558
- match: "\\b(let)[[:space:]]+(?!lazy\\b(?!'))(rec[[:space:]]+)?(?!rec\\b(?!'))([[:lower:]_][[:word:]']*)(?![[:word:]'])[[:space:]]*(?!,|::|[[:space:]])",
559
- captures: {
560
- "1": {
561
- name: "keyword.ocaml"
562
- },
563
- "2": {
564
- name: "keyword.ocaml"
565
- },
566
- "3": {
567
- name: "entity.name.function.binding.ocaml"
568
- }
569
- }
570
- },
571
- {
572
- comment: "using binding operators",
573
- match: "\\b(let|and)([$&*+\\-/=>@^|<][!?$&*+\\-/=>@^|%:]*)[[:space:]]*(?!lazy\\b(?!'))([[:lower:]_][[:word:]']*)(?![[:word:]'])[[:space:]]*(?!,|::|[[:space:]])",
574
- captures: {
575
- "1": {
576
- name: "keyword.ocaml"
577
- },
578
- "2": {
579
- name: "keyword.ocaml"
580
- },
581
- "3": {
582
- name: "entity.name.function.binding.ocaml"
583
- }
584
- }
585
- },
586
- {
587
- comment: "first class module packing",
588
- match: "\\([[:space:]]*(val)[[:space:]]+([[:lower:]_][[:word:]']*)",
589
- captures: {
590
- "1": {
591
- name: "keyword.ocaml"
592
- },
593
- "2": {
594
- patterns: [
595
- {
596
- include: "$self"
597
- }
598
- ]
599
- }
600
- }
601
- },
602
- {
603
- comment: "locally abstract types",
604
- match: "(?:\\(|(:))[[:space:]]*(type)((?:[[:space:]]+[[:lower:]_][[:word:]']*)+)",
605
- captures: {
606
- "1": {
607
- name: "keyword.other.ocaml punctuation.other.colon punctuation.colon"
608
- },
609
- "2": {
610
- name: "keyword.ocaml"
611
- },
612
- "3": {
613
- name: "entity.name.function.binding.ocaml"
614
- }
615
- }
616
- },
617
- {
618
- comment: "optional labeled argument with type",
619
- begin: "(\\?)\\([[:space:]]*([[:lower:]_][[:word:]']*)",
620
- beginCaptures: {
621
- "1": {
622
- name: "variable.parameter.optional.ocaml"
623
- },
624
- "2": {
625
- name: "variable.parameter.optional.ocaml"
626
- }
627
- },
628
- end: "\\)",
629
- patterns: [
630
- {
631
- include: "$self"
632
- }
633
- ]
634
- },
635
- {
636
- comment: "labeled argument with type",
637
- begin: "(~)\\([[:space:]]*([[:lower:]_][[:word:]']*)",
638
- beginCaptures: {
639
- "1": {
640
- name: "variable.parameter.labeled.ocaml"
641
- },
642
- "2": {
643
- name: "variable.parameter.labeled.ocaml"
644
- }
645
- },
646
- end: "\\)",
647
- patterns: [
648
- {
649
- include: "$self"
650
- }
651
- ]
652
- },
653
- {
654
- include: "source.ocaml.interface#bindings"
655
- }
656
- ]
657
- },
658
- operators: {
659
- patterns: [
660
- {
661
- comment: "binding operator",
662
- name: "keyword.ocaml",
663
- match: "\\b(let|and)[$&*+\\-/=>@^|<][!?$&*+\\-/=>@^|%:]*"
664
- },
665
- {
666
- comment: "infix symbol",
667
- name: "keyword.operator.ocaml",
668
- match: "[$&*+\\-/=>@^%<][~!?$&*+\\-/=>@^|%<:.]*"
669
- },
670
- {
671
- comment: "infix symbol that begins with vertical bar",
672
- name: "keyword.operator.ocaml",
673
- match: "\\|[~!?$&*+\\-/=>@^|%<:.]+"
674
- },
675
- {
676
- comment: "vertical bar",
677
- name: "keyword.other.ocaml",
678
- match: "(?<!\\[)(\\|)(?!\\])"
679
- },
680
- {
681
- comment: "infix symbol",
682
- name: "keyword.operator.ocaml",
683
- match: "#[~!?$&*+\\-/=>@^|%<:.]+"
684
- },
685
- {
686
- comment: "prefix symbol",
687
- name: "keyword.operator.ocaml",
688
- match: "![~!?$&*+\\-/=>@^|%<:.]*"
689
- },
690
- {
691
- comment: "prefix symbol",
692
- name: "keyword.operator.ocaml",
693
- match: "[?~][~!?$&*+\\-/=>@^|%<:.]+"
694
- },
695
- {
696
- comment: "named operator",
697
- name: "keyword.operator.ocaml",
698
- match: "\\b(or|mod|land|lor|lxor|lsl|lsr|asr)\\b"
699
- },
700
- {
701
- comment: "method invocation",
702
- name: "keyword.other.ocaml",
703
- match: "#"
704
- },
705
- {
706
- comment: "type annotation",
707
- name: "keyword.other.ocaml punctuation.other.colon punctuation.colon",
708
- match: ":"
709
- },
710
- {
711
- comment: "field accessor",
712
- name: "keyword.other.ocaml punctuation.other.period punctuation.separator.period",
713
- match: "\\."
714
- },
715
- {
716
- comment: "semicolon separator",
717
- name: "keyword.other.ocaml punctuation.separator.terminator punctuation.separator.semicolon",
718
- match: ";"
719
- },
720
- {
721
- comment: "comma separator",
722
- name: "keyword.other.ocaml punctuation.comma punctuation.separator.comma",
723
- match: ","
724
- }
725
- ]
726
- },
727
- keywords: {
728
- patterns: [
729
- {
730
- comment: "reserved ocaml keyword",
731
- name: "keyword.other.ocaml",
732
- match: "\\b(and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|virtual|when|while|with)\\b(?!')"
733
- }
734
- ]
735
- },
736
- literals: {
737
- patterns: [
738
- {
739
- comment: "boolean literal",
740
- name: "constant.language.boolean.ocaml",
741
- match: "\\b(true|false)\\b"
742
- },
743
- {
744
- comment: "floating point decimal literal with exponent",
745
- name: "constant.numeric.decimal.float.ocaml",
746
- match: "\\b([[:digit:]][[:digit:]_]*(\\.[[:digit:]_]*)?[eE][+-]?[[:digit:]][[:digit:]_]*[g-zG-Z]?)\\b"
747
- },
748
- {
749
- comment: "floating point decimal literal",
750
- name: "constant.numeric.decimal.float.ocaml",
751
- match: "\\b([[:digit:]][[:digit:]_]*)(\\.[[:digit:]_]*[g-zG-Z]?\\b|\\.)"
752
- },
753
- {
754
- comment: "floating point hexadecimal literal with exponent part",
755
- name: "constant.numeric.hexadecimal.float.ocaml",
756
- match: "\\b((0x|0X)[[:xdigit:]][[:xdigit:]_]*(\\.[[:xdigit:]_]*)?[pP][+-]?[[:digit:]][[:digit:]_]*[g-zG-Z]?)\\b"
757
- },
758
- {
759
- comment: "floating point hexadecimal literal",
760
- name: "constant.numeric.hexadecimal.float.ocaml",
761
- match: "\\b((0x|0X)[[:xdigit:]][[:xdigit:]_]*)(\\.[[:xdigit:]_]*[g-zG-Z]?\\b|\\.)"
762
- },
763
- {
764
- comment: "decimal integer literal",
765
- name: "constant.numeric.decimal.integer.ocaml",
766
- match: "\\b([[:digit:]][[:digit:]_]*[lLng-zG-Z]?)\\b"
767
- },
768
- {
769
- comment: "hexadecimal integer literal",
770
- name: "constant.numeric.hexadecimal.integer.ocaml",
771
- match: "\\b((0x|0X)[[:xdigit:]][[:xdigit:]_]*[lLng-zG-Z]?)\\b"
772
- },
773
- {
774
- comment: "octal integer literal",
775
- name: "constant.numeric.octal.integer.ocaml",
776
- match: "\\b((0o|0O)[0-7][0-7_]*[lLng-zG-Z]?)\\b"
777
- },
778
- {
779
- comment: "binary integer literal",
780
- name: "constant.numeric.binary.integer.ocaml",
781
- match: "\\b((0b|0B)[0-1][0-1_]*[lLng-zG-Z]?)\\b"
782
- },
783
- {
784
- comment: "unit literal",
785
- name: "constant.language.unit.ocaml",
786
- match: "\\(\\)"
787
- },
788
- {
789
- comment: "parentheses",
790
- begin: "\\(",
791
- end: "\\)",
792
- patterns: [
793
- {
794
- include: "$self"
795
- }
796
- ]
797
- },
798
- {
799
- comment: "empty array",
800
- name: "constant.language.array.ocaml",
801
- match: "\\[\\|\\|\\]"
802
- },
803
- {
804
- comment: "array",
805
- begin: "\\[\\|",
806
- end: "\\|\\]",
807
- patterns: [
808
- {
809
- include: "$self"
810
- }
811
- ]
812
- },
813
- {
814
- comment: "empty list",
815
- name: "constant.language.list.ocaml",
816
- match: "\\[\\]"
817
- },
818
- {
819
- comment: "list",
820
- begin: "\\[",
821
- end: "]",
822
- patterns: [
823
- {
824
- include: "$self"
825
- }
826
- ]
827
- },
828
- {
829
- comment: "braces",
830
- begin: "\\{",
831
- end: "\\}",
832
- patterns: [
833
- {
834
- include: "$self"
835
- }
836
- ]
837
- }
838
- ]
839
- },
840
- types: {
841
- patterns: [
842
- {
843
- comment: "type parameter",
844
- name: "storage.type.ocaml",
845
- match: "'[[:alpha:]][[:word:]']*\\b|'_\\b"
846
- },
847
- {
848
- comment: "weak type parameter",
849
- name: "storage.type.weak.ocaml",
850
- match: "'_[[:alpha:]][[:word:]']*\\b"
851
- },
852
- {
853
- comment: "builtin type",
854
- name: "support.type.ocaml",
855
- match: "\\b(unit|bool|int|int32|int64|nativeint|float|char|bytes|string)\\b"
856
- }
857
- ]
36
+ var brackets = [
37
+ [
38
+ "{",
39
+ "}"
40
+ ],
41
+ [
42
+ "[",
43
+ "]"
44
+ ],
45
+ [
46
+ "(",
47
+ ")"
48
+ ],
49
+ [
50
+ "[|",
51
+ "|]"
52
+ ]
53
+ ];
54
+ var comments = {
55
+ blockComment: [
56
+ "(*",
57
+ "*)"
58
+ ]
59
+ };
60
+ var surroundingPairs = [
61
+ [
62
+ "{",
63
+ "}"
64
+ ],
65
+ [
66
+ "[",
67
+ "]"
68
+ ],
69
+ [
70
+ "(",
71
+ ")"
72
+ ],
73
+ [
74
+ "'",
75
+ "'"
76
+ ],
77
+ [
78
+ "\"",
79
+ "\""
80
+ ]
81
+ ];
82
+ var indentationRules = {
83
+ decreaseIndentPattern: "^\\s*(end|done|with|in|else)\\b|^\\s*;;",
84
+ increaseIndentPattern: "\\b(begin|object)\\s*$|\\blet [a-zA-Z0-9_-]+( [^ ]+)* =\\s*$|method!?[ \\t]+.*=[ \\t]*$|->[ \\t]*$|\\b(for|while)(_lwt)?[ \\t]+.*[ \\t]+do[ \\t]*$|(\\btry(_lwt)?$|\\bif\\s+.*\\sthen$|\\belse|[:=]\\s*sig|=\\s*struct)\\s*$",
85
+ indentNextLinePattern: "(?!\\bif.*then.*(else.*|(;|[ \\t]in)[ \\t]*$))\\bif|\\bthen[ \\t]*$|\\belse[ \\t]*$$"
86
+ };
87
+ var onEnterRules = [
88
+ {
89
+ beforeText: "\\(\\*\\*",
90
+ afterText: "\\*\\)",
91
+ action: {
92
+ indent: "none",
93
+ appendText: " "
94
+ }
858
95
  },
859
- identifiers: {
860
- patterns: [
861
- {
862
- comment: "wildcard underscore",
863
- name: "constant.language.ocaml",
864
- match: "\\b_\\b"
865
- },
866
- {
867
- comment: "capital identifier for constructor, exception, or module",
868
- name: "constant.language.capital-identifier.ocaml",
869
- match: "\\b[[:upper:]][[:word:]']*('|\\b)"
870
- },
871
- {
872
- comment: "lowercase identifier",
873
- name: "source.ocaml",
874
- match: "\\b[[:lower:]_][[:word:]']*('|\\b)"
875
- },
876
- {
877
- comment: "polymorphic variant tag",
878
- name: "constant.language.polymorphic-variant.ocaml",
879
- match: "\\`[[:alpha:]][[:word:]']*\\b"
880
- },
881
- {
882
- comment: "empty list (can be used as a constructor)",
883
- name: "constant.language.list.ocaml",
884
- match: "\\[\\]"
885
- }
886
- ]
96
+ {
97
+ beforeText: "\\(\\*",
98
+ afterText: "\\*\\)",
99
+ action: {
100
+ indent: "none",
101
+ appendText: " "
102
+ }
887
103
  }
888
- };
889
- var information_for_contributors = [
890
- "This file has been converted from https://github.com/ocamllabs/vscode-ocaml-platform/blob/master/",
891
- "If you want to provide a fix or improvement, please create a pull request against the original repository.",
892
- "Once accepted there, we are happy to receive an update request."
893
104
  ];
894
105
  var ocaml = {
895
- name: name,
896
- scopeName: scopeName,
897
- fileTypes: fileTypes,
898
- patterns: patterns,
899
- repository: repository,
900
- information_for_contributors: information_for_contributors
106
+ autoClosingPairs: autoClosingPairs,
107
+ brackets: brackets,
108
+ comments: comments,
109
+ surroundingPairs: surroundingPairs,
110
+ indentationRules: indentationRules,
111
+ onEnterRules: onEnterRules
901
112
  };
902
113
 
903
- export { ocaml as default, fileTypes, information_for_contributors, name, patterns, repository, scopeName };
114
+ export { autoClosingPairs, brackets, comments, ocaml as default, indentationRules, onEnterRules, surroundingPairs };