@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/solidity2.js CHANGED
@@ -1,1187 +1,71 @@
1
- var fileTypes = [
2
- "sol"
1
+ var comments = {
2
+ lineComment: "//",
3
+ blockComment: [
4
+ "/*",
5
+ "*/"
6
+ ]
7
+ };
8
+ var brackets = [
9
+ [
10
+ "{",
11
+ "}"
12
+ ],
13
+ [
14
+ "[",
15
+ "]"
16
+ ],
17
+ [
18
+ "(",
19
+ ")"
20
+ ]
3
21
  ];
4
- var name = "Solidity";
5
- var patterns = [
6
- {
7
- include: "#natspec"
8
- },
9
- {
10
- include: "#comment"
11
- },
12
- {
13
- include: "#operator"
14
- },
15
- {
16
- include: "#global"
17
- },
18
- {
19
- include: "#control"
20
- },
21
- {
22
- include: "#constant"
23
- },
24
- {
25
- include: "#primitive"
26
- },
22
+ var autoClosingPairs = [
27
23
  {
28
- include: "#type-primitive"
24
+ open: "{",
25
+ close: "}"
29
26
  },
30
27
  {
31
- include: "#type-modifier-extended-scope"
28
+ open: "[",
29
+ close: "]"
32
30
  },
33
31
  {
34
- include: "#declaration"
32
+ open: "(",
33
+ close: ")"
35
34
  },
36
35
  {
37
- include: "#function-call"
38
- },
39
- {
40
- include: "#assembly"
41
- },
42
- {
43
- include: "#punctuation"
36
+ open: "/**",
37
+ close: " */",
38
+ notIn: [
39
+ "string"
40
+ ]
44
41
  }
45
42
  ];
46
- var repository = {
47
- natspec: {
48
- patterns: [
49
- {
50
- begin: "/\\*\\*",
51
- end: "\\*/",
52
- name: "comment.block.documentation",
53
- patterns: [
54
- {
55
- include: "#natspec-tags"
56
- }
57
- ]
58
- },
59
- {
60
- begin: "///",
61
- end: "$",
62
- name: "comment.block.documentation",
63
- patterns: [
64
- {
65
- include: "#natspec-tags"
66
- }
67
- ]
68
- }
69
- ]
70
- },
71
- "natspec-tags": {
72
- patterns: [
73
- {
74
- include: "#comment-todo"
75
- },
76
- {
77
- include: "#natspec-tag-title"
78
- },
79
- {
80
- include: "#natspec-tag-author"
81
- },
82
- {
83
- include: "#natspec-tag-notice"
84
- },
85
- {
86
- include: "#natspec-tag-dev"
87
- },
88
- {
89
- include: "#natspec-tag-param"
90
- },
91
- {
92
- include: "#natspec-tag-return"
93
- }
94
- ]
95
- },
96
- "natspec-tag-title": {
97
- match: "(@title)\\b",
98
- name: "storage.type.title.natspec"
99
- },
100
- "natspec-tag-author": {
101
- match: "(@author)\\b",
102
- name: "storage.type.author.natspec"
103
- },
104
- "natspec-tag-notice": {
105
- match: "(@notice)\\b",
106
- name: "storage.type.dev.natspec"
107
- },
108
- "natspec-tag-dev": {
109
- match: "(@dev)\\b",
110
- name: "storage.type.dev.natspec"
111
- },
112
- "natspec-tag-param": {
113
- match: "(@param)(\\s+([A-Za-z_]\\w*))?\\b",
114
- captures: {
115
- "1": {
116
- name: "storage.type.param.natspec"
117
- },
118
- "3": {
119
- name: "variable.other.natspec"
120
- }
121
- }
122
- },
123
- "natspec-tag-return": {
124
- match: "(@return)(\\s+([A-Za-z_]\\w*))?\\b",
125
- captures: {
126
- "1": {
127
- name: "storage.type.return.natspec"
128
- },
129
- "3": {
130
- name: "variable.other.natspec"
131
- }
132
- }
133
- },
134
- comment: {
135
- patterns: [
136
- {
137
- include: "#comment-line"
138
- },
139
- {
140
- include: "#comment-block"
141
- }
142
- ]
143
- },
144
- "comment-todo": {
145
- match: "(?i)\\b(FIXME|TODO|CHANGED|XXX|IDEA|HACK|NOTE|REVIEW|NB|BUG|QUESTION|COMBAK|TEMP|SUPPRESS|LINT|\\w+-disable|\\w+-suppress)\\b(?-i)",
146
- name: "keyword.comment.todo"
147
- },
148
- "comment-line": {
149
- begin: "(?<!tp:)//",
150
- end: "$",
151
- name: "comment.line",
152
- patterns: [
153
- {
154
- include: "#comment-todo"
155
- }
156
- ]
157
- },
158
- "comment-block": {
159
- begin: "/\\*",
160
- end: "\\*/",
161
- name: "comment.block",
162
- patterns: [
163
- {
164
- include: "#comment-todo"
165
- }
166
- ]
167
- },
168
- operator: {
169
- patterns: [
170
- {
171
- include: "#operator-logic"
172
- },
173
- {
174
- include: "#operator-mapping"
175
- },
176
- {
177
- include: "#operator-arithmetic"
178
- },
179
- {
180
- include: "#operator-binary"
181
- },
182
- {
183
- include: "#operator-assignment"
184
- }
185
- ]
186
- },
187
- "operator-logic": {
188
- match: "(==|\\!=|<(?!<)|<=|>(?!>)|>=|\\&\\&|\\|\\||\\:(?!=)|\\?|\\!)",
189
- name: "keyword.operator.logic"
190
- },
191
- "operator-mapping": {
192
- match: "(=>)",
193
- name: "keyword.operator.mapping"
194
- },
195
- "operator-arithmetic": {
196
- match: "(\\+|\\-|\\/|\\*)",
197
- name: "keyword.operator.arithmetic"
198
- },
199
- "operator-binary": {
200
- match: "(\\^|\\&|\\||<<|>>)",
201
- name: "keyword.operator.binary"
202
- },
203
- "operator-assignment": {
204
- match: "(\\:?=)",
205
- name: "keyword.operator.assignment"
206
- },
207
- control: {
208
- patterns: [
209
- {
210
- include: "#control-flow"
211
- },
212
- {
213
- include: "#control-using"
214
- },
215
- {
216
- include: "#control-import"
217
- },
218
- {
219
- include: "#control-pragma"
220
- },
221
- {
222
- include: "#control-underscore"
223
- },
224
- {
225
- include: "#control-unchecked"
226
- },
227
- {
228
- include: "#control-other"
229
- }
230
- ]
231
- },
232
- "control-flow": {
233
- patterns: [
234
- {
235
- match: "\\b(if|else|for|while|do|break|continue|try|catch|finally|throw|return)\\b",
236
- name: "keyword.control.flow"
237
- },
238
- {
239
- begin: "\\b(returns)\\b",
240
- beginCaptures: {
241
- "1": {
242
- name: "keyword.control.flow.return"
243
- }
244
- },
245
- end: "(?=\\))",
246
- patterns: [
247
- {
248
- include: "#declaration-function-parameters"
249
- }
250
- ]
251
- }
252
- ]
253
- },
254
- "control-using": {
255
- patterns: [
256
- {
257
- match: "\\b(using)\\b\\s+\\b([A-Za-z\\d_]+)\\b\\s+\\b(for)\\b\\s+\\b([A-Za-z\\d_]+)",
258
- captures: {
259
- "1": {
260
- name: "keyword.control.using"
261
- },
262
- "2": {
263
- name: "entity.name.type.library"
264
- },
265
- "3": {
266
- name: "keyword.control.for"
267
- },
268
- "4": {
269
- name: "entity.name.type"
270
- }
271
- }
272
- },
273
- {
274
- match: "\\b(using)\\b",
275
- name: "keyword.control.using"
276
- }
277
- ]
278
- },
279
- "control-import": {
280
- patterns: [
281
- {
282
- begin: "\\b(import)\\b",
283
- beginCaptures: {
284
- "1": {
285
- name: "keyword.control.import"
286
- }
287
- },
288
- end: "(?=\\;)",
289
- patterns: [
290
- {
291
- begin: "((?=\\{))",
292
- end: "((?=\\}))",
293
- patterns: [
294
- {
295
- match: "\\b(\\w+)\\b",
296
- name: "entity.name.type.interface"
297
- }
298
- ]
299
- },
300
- {
301
- match: "\\b(from)\\b",
302
- name: "keyword.control.import.from"
303
- },
304
- {
305
- include: "#string"
306
- },
307
- {
308
- include: "#punctuation"
309
- }
310
- ]
311
- },
312
- {
313
- match: "\\b(import)\\b",
314
- name: "keyword.control.import"
315
- }
316
- ]
317
- },
318
- "control-unchecked": {
319
- match: "\\b(unchecked)\\b",
320
- name: "keyword.control.unchecked"
321
- },
322
- "control-pragma": {
323
- match: "\\b(pragma)(?:\\s+([A-Za-z_]\\w+)\\s+([^\\s]+))?\\b",
324
- captures: {
325
- "1": {
326
- name: "keyword.control.pragma"
327
- },
328
- "2": {
329
- name: "entity.name.tag.pragma"
330
- },
331
- "3": {
332
- name: "constant.other.pragma"
333
- }
334
- }
335
- },
336
- "control-underscore": {
337
- match: "\\b(_)\\b",
338
- name: "constant.other.underscore"
339
- },
340
- "control-other": {
341
- match: "\\b(new|delete|emit)\\b",
342
- name: "keyword.control"
343
- },
344
- constant: {
345
- patterns: [
346
- {
347
- include: "#constant-boolean"
348
- },
349
- {
350
- include: "#constant-time"
351
- },
352
- {
353
- include: "#constant-currency"
354
- }
355
- ]
356
- },
357
- "constant-boolean": {
358
- match: "\\b(true|false)\\b",
359
- name: "constant.language.boolean"
360
- },
361
- "constant-time": {
362
- match: "\\b(seconds|minutes|hours|days|weeks|years)\\b",
363
- name: "constant.language.time"
364
- },
365
- "constant-currency": {
366
- match: "\\b(ether|wei|gwei|finney|szabo)\\b",
367
- name: "constant.language.currency"
368
- },
369
- number: {
370
- patterns: [
371
- {
372
- include: "#number-decimal"
373
- },
374
- {
375
- include: "#number-hex"
376
- },
377
- {
378
- include: "#number-scientific"
379
- }
380
- ]
381
- },
382
- "number-decimal": {
383
- match: "\\b([0-9_]+(\\.[0-9_]+)?)\\b",
384
- name: "constant.numeric.decimal"
385
- },
386
- "number-hex": {
387
- match: "\\b(0[xX][a-fA-F0-9]+)\\b",
388
- name: "constant.numeric.hexadecimal"
389
- },
390
- "number-scientific": {
391
- match: "\\b(?:0\\.(?:0[1-9]|[1-9][0-9_]?)|[1-9][0-9_]*(?:\\.\\d{1,2})?)(?:e[+-]?[0-9_]+)?",
392
- name: "constant.numeric.scientific"
393
- },
394
- string: {
395
- patterns: [
396
- {
397
- match: "\\\".*?\\\"",
398
- name: "string.quoted.double"
399
- },
400
- {
401
- match: "\\'.*?\\'",
402
- name: "string.quoted.single"
403
- }
404
- ]
405
- },
406
- primitive: {
407
- patterns: [
408
- {
409
- include: "#number-decimal"
410
- },
411
- {
412
- include: "#number-hex"
413
- },
414
- {
415
- include: "#number-scientific"
416
- },
417
- {
418
- include: "#string"
419
- }
420
- ]
421
- },
422
- "type-primitive": {
423
- patterns: [
424
- {
425
- begin: "\\b(address|string\\d*|bytes\\d*|int\\d*|uint\\d*|bool|hash\\d*)\\b(?:\\[\\])(\\()",
426
- beginCaptures: {
427
- "1": {
428
- name: "support.type.primitive"
429
- }
430
- },
431
- end: "(\\))",
432
- patterns: [
433
- {
434
- include: "#primitive"
435
- },
436
- {
437
- include: "#punctuation"
438
- },
439
- {
440
- include: "#global"
441
- },
442
- {
443
- include: "#variable"
444
- }
445
- ]
446
- },
447
- {
448
- match: "\\b(address|string\\d*|bytes\\d*|int\\d*|uint\\d*|bool|hash\\d*)\\b",
449
- name: "support.type.primitive"
450
- }
451
- ]
452
- },
453
- global: {
454
- patterns: [
455
- {
456
- include: "#global-variables"
457
- },
458
- {
459
- include: "#global-functions"
460
- }
461
- ]
462
- },
463
- "global-variables": {
464
- patterns: [
465
- {
466
- match: "\\b(this)\\b",
467
- name: "variable.language.this"
468
- },
469
- {
470
- match: "\\b(super)\\b",
471
- name: "variable.language.super"
472
- },
473
- {
474
- match: "\\b(abi)\\b",
475
- name: "variable.language.builtin.abi"
476
- },
477
- {
478
- match: "\\b(msg\\.sender|msg|block|tx|now)\\b",
479
- name: "variable.language.transaction"
480
- },
481
- {
482
- match: "\\b(tx\\.origin|tx\\.gasprice|msg\\.data|msg\\.sig|msg\\.value)\\b",
483
- name: "variable.language.transaction"
484
- }
485
- ]
486
- },
487
- "global-functions": {
488
- patterns: [
489
- {
490
- match: "\\b(require|assert|revert)\\b",
491
- name: "keyword.control.exceptions"
492
- },
493
- {
494
- match: "\\b(selfdestruct|suicide)\\b",
495
- name: "keyword.control.contract"
496
- },
497
- {
498
- match: "\\b(addmod|mulmod|keccak256|sha256|sha3|ripemd160|ecrecover)\\b",
499
- name: "support.function.math"
500
- },
501
- {
502
- match: "\\b(unicode)\\b",
503
- name: "support.function.string"
504
- },
505
- {
506
- match: "\\b(blockhash|gasleft)\\b",
507
- name: "variable.language.transaction"
508
- },
509
- {
510
- match: "\\b(type)\\b",
511
- name: "variable.language.type"
512
- }
513
- ]
514
- },
515
- "type-modifier-access": {
516
- match: "\\b(internal|external|private|public)\\b",
517
- name: "storage.type.modifier.access"
518
- },
519
- "type-modifier-payable": {
520
- match: "\\b(nonpayable|payable)\\b",
521
- name: "storage.type.modifier.payable"
522
- },
523
- "type-modifier-constant": {
524
- match: "\\b(constant)\\b",
525
- name: "storage.type.modifier.readonly"
526
- },
527
- "type-modifier-immutable": {
528
- match: "\\b(immutable)\\b",
529
- name: "storage.type.modifier.readonly"
530
- },
531
- "type-modifier-extended-scope": {
532
- match: "\\b(pure|view|inherited|indexed|storage|memory|virtual|calldata|override|abstract)\\b",
533
- name: "storage.type.modifier.extendedscope"
534
- },
535
- variable: {
536
- patterns: [
537
- {
538
- match: "\\b(\\_\\w+)\\b",
539
- captures: {
540
- "1": {
541
- name: "variable.parameter.function"
542
- }
543
- }
544
- },
545
- {
546
- match: "(?:\\.)(\\w+)\\b",
547
- captures: {
548
- "1": {
549
- name: "support.variable.property"
550
- }
551
- }
552
- },
553
- {
554
- match: "\\b(\\w+)\\b",
555
- captures: {
556
- "1": {
557
- name: "variable.parameter.other"
558
- }
559
- }
560
- }
561
- ]
562
- },
563
- "modifier-call": {
564
- patterns: [
565
- {
566
- include: "#function-call"
567
- },
568
- {
569
- match: "\\b(\\w+)\\b",
570
- name: "entity.name.function.modifier"
571
- }
572
- ]
573
- },
574
- declaration: {
575
- patterns: [
576
- {
577
- include: "#declaration-contract"
578
- },
579
- {
580
- include: "#declaration-interface"
581
- },
582
- {
583
- include: "#declaration-library"
584
- },
585
- {
586
- include: "#declaration-function"
587
- },
588
- {
589
- include: "#declaration-modifier"
590
- },
591
- {
592
- include: "#declaration-constructor"
593
- },
594
- {
595
- include: "#declaration-event"
596
- },
597
- {
598
- include: "#declaration-storage"
599
- },
600
- {
601
- include: "#declaration-error"
602
- }
603
- ]
604
- },
605
- "declaration-storage-field": {
606
- patterns: [
607
- {
608
- include: "#comment"
609
- },
610
- {
611
- include: "#control"
612
- },
613
- {
614
- include: "#type-primitive"
615
- },
616
- {
617
- include: "#type-modifier-access"
618
- },
619
- {
620
- include: "#type-modifier-immutable"
621
- },
622
- {
623
- include: "#type-modifier-extend-scope"
624
- },
625
- {
626
- include: "#type-modifier-payable"
627
- },
628
- {
629
- include: "#type-modifier-constant"
630
- },
631
- {
632
- include: "#primitive"
633
- },
634
- {
635
- include: "#constant"
636
- },
637
- {
638
- include: "#operator"
639
- },
640
- {
641
- include: "#punctuation"
642
- }
643
- ]
644
- },
645
- "declaration-storage": {
646
- patterns: [
647
- {
648
- include: "#declaration-storage-mapping"
649
- },
650
- {
651
- include: "#declaration-struct"
652
- },
653
- {
654
- include: "#declaration-enum"
655
- },
656
- {
657
- include: "#declaration-storage-field"
658
- }
659
- ]
660
- },
661
- "declaration-contract": {
662
- patterns: [
663
- {
664
- begin: "\\b(contract)\\b\\s+(\\w+)\\b\\s+\\b(is)\\b\\s+",
665
- end: "(?=\\{)",
666
- beginCaptures: {
667
- "1": {
668
- name: "storage.type.contract"
669
- },
670
- "2": {
671
- name: "entity.name.type.contract"
672
- },
673
- "3": {
674
- name: "storage.modifier.is"
675
- }
676
- },
677
- patterns: [
678
- {
679
- match: "\\b(\\w+)\\b",
680
- name: "entity.name.type.contract.extend"
681
- }
682
- ]
683
- },
684
- {
685
- match: "\\b(contract)(\\s+([A-Za-z_]\\w*))?\\b",
686
- captures: {
687
- "1": {
688
- name: "storage.type.contract"
689
- },
690
- "2": {
691
- name: "entity.name.type.contract"
692
- }
693
- }
694
- }
695
- ]
696
- },
697
- "declaration-interface": {
698
- patterns: [
699
- {
700
- begin: "\\b(interface)\\b\\s+(\\w+)\\b\\s+\\b(is)\\b\\s+",
701
- end: "(?=\\{)",
702
- beginCaptures: {
703
- "1": {
704
- name: "storage.type.interface"
705
- },
706
- "2": {
707
- name: "entity.name.type.interface"
708
- },
709
- "3": {
710
- name: "storage.modifier.is"
711
- }
712
- },
713
- patterns: [
714
- {
715
- match: "\\b(\\w+)\\b",
716
- name: "entity.name.type.interface.extend"
717
- }
718
- ]
719
- },
720
- {
721
- match: "\\b(interface)(\\s+([A-Za-z_]\\w*))?\\b",
722
- captures: {
723
- "1": {
724
- name: "storage.type.interface"
725
- },
726
- "2": {
727
- name: "entity.name.type.interface"
728
- }
729
- }
730
- }
731
- ]
732
- },
733
- "declaration-library": {
734
- match: "\\b(library)(\\s+([A-Za-z_]\\w*))?\\b",
735
- captures: {
736
- "1": {
737
- name: "storage.type.library"
738
- },
739
- "3": {
740
- name: "entity.name.type.library"
741
- }
742
- }
743
- },
744
- "declaration-struct": {
745
- patterns: [
746
- {
747
- match: "\\b(struct)(\\s+([A-Za-z_]\\w*))?\\b",
748
- captures: {
749
- "1": {
750
- name: "storage.type.struct"
751
- },
752
- "3": {
753
- name: "entity.name.type.struct"
754
- }
755
- }
756
- },
757
- {
758
- begin: "\\b(struct)\\b\\s*(\\w+)?\\b\\s*(?=\\{)",
759
- beginCaptures: {
760
- "1": {
761
- name: "storage.type.struct"
762
- },
763
- "2": {
764
- name: "entity.name.type.struct"
765
- }
766
- },
767
- end: "(?=\\})",
768
- patterns: [
769
- {
770
- include: "#type-primitive"
771
- },
772
- {
773
- include: "#variable"
774
- },
775
- {
776
- include: "#punctuation"
777
- },
778
- {
779
- include: "#comment"
780
- }
781
- ]
782
- }
783
- ]
784
- },
785
- "declaration-event": {
786
- patterns: [
787
- {
788
- begin: "\\b(event)\\b(?:\\s+(\\w+)\\b)?",
789
- end: "(?=\\))",
790
- beginCaptures: {
791
- "1": {
792
- name: "storage.type.event"
793
- },
794
- "2": {
795
- name: "entity.name.type.event"
796
- }
797
- },
798
- patterns: [
799
- {
800
- include: "#type-primitive"
801
- },
802
- {
803
- match: "\\b(?:(indexed)\\s)?(\\w+)(?:,\\s*|)",
804
- captures: {
805
- "1": {
806
- name: "storage.type.modifier.indexed"
807
- },
808
- "2": {
809
- name: "variable.parameter.event"
810
- }
811
- }
812
- },
813
- {
814
- include: "#punctuation"
815
- }
816
- ]
817
- },
818
- {
819
- match: "\\b(event)(\\s+([A-Za-z_]\\w*))?\\b",
820
- captures: {
821
- "1": {
822
- name: "storage.type.event"
823
- },
824
- "3": {
825
- name: "entity.name.type.event"
826
- }
827
- }
828
- }
829
- ]
830
- },
831
- "declaration-constructor": {
832
- patterns: [
833
- {
834
- begin: "\\b(constructor)\\b",
835
- beginCaptures: {
836
- "1": {
837
- name: "storage.type.constructor"
838
- }
839
- },
840
- end: "(?=\\{)",
841
- patterns: [
842
- {
843
- begin: "\\G\\s*(?=\\()",
844
- end: "(?=\\))",
845
- patterns: [
846
- {
847
- include: "#declaration-function-parameters"
848
- }
849
- ]
850
- },
851
- {
852
- begin: "(?<=\\))",
853
- end: "(?=\\{)",
854
- patterns: [
855
- {
856
- include: "#type-modifier-access"
857
- },
858
- {
859
- include: "#function-call"
860
- }
861
- ]
862
- }
863
- ]
864
- },
865
- {
866
- match: "\\b(constructor)\\b",
867
- captures: {
868
- "1": {
869
- name: "storage.type.constructor"
870
- }
871
- }
872
- }
873
- ]
874
- },
875
- "declaration-enum": {
876
- patterns: [
877
- {
878
- begin: "\\b(enum)\\s+(\\w+)\\b",
879
- beginCaptures: {
880
- "1": {
881
- name: "storage.type.enum"
882
- },
883
- "2": {
884
- name: "entity.name.type.enum"
885
- }
886
- },
887
- end: "(?=\\})",
888
- patterns: [
889
- {
890
- match: "\\b(\\w+)\\b",
891
- name: "variable.other.enummember"
892
- },
893
- {
894
- include: "#punctuation"
895
- }
896
- ]
897
- },
898
- {
899
- match: "\\b(enum)(\\s+([A-Za-z_]\\w*))?\\b",
900
- captures: {
901
- "1": {
902
- name: "storage.type.enum"
903
- },
904
- "3": {
905
- name: "entity.name.type.enum"
906
- }
907
- }
908
- }
909
- ]
910
- },
911
- "declaration-function-parameters": {
912
- begin: "\\G\\s*(?=\\()",
913
- end: "(?=\\))",
914
- patterns: [
915
- {
916
- include: "#type-primitive"
917
- },
918
- {
919
- include: "#type-modifier-extended-scope"
920
- },
921
- {
922
- match: "\\b([A-Z]\\w*)\\b",
923
- captures: {
924
- "1": {
925
- name: "storage.type.struct"
926
- }
927
- }
928
- },
929
- {
930
- include: "#variable"
931
- },
932
- {
933
- include: "#punctuation"
934
- },
935
- {
936
- include: "#comment"
937
- }
938
- ]
939
- },
940
- "declaration-function": {
941
- patterns: [
942
- {
943
- begin: "\\b(function)\\s+(\\w+)\\b",
944
- beginCaptures: {
945
- "1": {
946
- name: "storage.type.function"
947
- },
948
- "2": {
949
- name: "entity.name.function"
950
- }
951
- },
952
- end: "(?=\\{|;)",
953
- patterns: [
954
- {
955
- include: "#natspec"
956
- },
957
- {
958
- include: "#global"
959
- },
960
- {
961
- include: "#declaration-function-parameters"
962
- },
963
- {
964
- include: "#type-modifier-access"
965
- },
966
- {
967
- include: "#type-modifier-payable"
968
- },
969
- {
970
- include: "#type-modifier-immutable"
971
- },
972
- {
973
- include: "#type-modifier-extended-scope"
974
- },
975
- {
976
- include: "#control-flow"
977
- },
978
- {
979
- include: "#function-call"
980
- },
981
- {
982
- include: "#modifier-call"
983
- },
984
- {
985
- include: "#punctuation"
986
- }
987
- ]
988
- },
989
- {
990
- match: "\\b(function)\\s+([A-Za-z_]\\w*)\\b",
991
- captures: {
992
- "1": {
993
- name: "storage.type.function"
994
- },
995
- "2": {
996
- name: "entity.name.function"
997
- }
998
- }
999
- }
1000
- ]
1001
- },
1002
- "declaration-modifier": {
1003
- patterns: [
1004
- {
1005
- begin: "\\b(modifier)\\b\\s*(\\w+)",
1006
- beginCaptures: {
1007
- "1": {
1008
- name: "storage.type.function.modifier"
1009
- },
1010
- "2": {
1011
- name: "entity.name.function.modifier"
1012
- }
1013
- },
1014
- end: "(?=\\{)",
1015
- patterns: [
1016
- {
1017
- include: "#declaration-function-parameters"
1018
- },
1019
- {
1020
- begin: "(?<=\\))",
1021
- end: "(?=\\{)",
1022
- patterns: [
1023
- {
1024
- include: "#declaration-function-parameters"
1025
- },
1026
- {
1027
- include: "#type-modifier-access"
1028
- },
1029
- {
1030
- include: "#type-modifier-payable"
1031
- },
1032
- {
1033
- include: "#type-modifier-immutable"
1034
- },
1035
- {
1036
- include: "#type-modifier-extended-scope"
1037
- },
1038
- {
1039
- include: "#function-call"
1040
- },
1041
- {
1042
- include: "#modifier-call"
1043
- },
1044
- {
1045
- include: "#control-flow"
1046
- }
1047
- ]
1048
- }
1049
- ]
1050
- },
1051
- {
1052
- match: "\\b(modifier)(\\s+([A-Za-z_]\\w*))?\\b",
1053
- captures: {
1054
- "1": {
1055
- name: "storage.type.modifier"
1056
- },
1057
- "3": {
1058
- name: "entity.name.function"
1059
- }
1060
- }
1061
- }
1062
- ]
1063
- },
1064
- "declaration-storage-mapping": {
1065
- patterns: [
1066
- {
1067
- begin: "\\b(mapping)\\b",
1068
- beginCaptures: {
1069
- "1": {
1070
- name: "storage.type.mapping"
1071
- }
1072
- },
1073
- end: "(?=\\))",
1074
- patterns: [
1075
- {
1076
- include: "#declaration-storage-mapping"
1077
- },
1078
- {
1079
- include: "#type-primitive"
1080
- },
1081
- {
1082
- include: "#punctuation"
1083
- },
1084
- {
1085
- include: "#operator"
1086
- }
1087
- ]
1088
- },
1089
- {
1090
- match: "\\b(mapping)\\b",
1091
- name: "storage.type.mapping"
1092
- }
1093
- ]
1094
- },
1095
- "declaration-error": {
1096
- match: "\\b(error)(\\s+([A-Za-z_]\\w*))?\\b",
1097
- captures: {
1098
- "1": {
1099
- name: "storage.type.error"
1100
- },
1101
- "3": {
1102
- name: "entity.name.type.error"
1103
- }
1104
- }
1105
- },
1106
- "function-call": {
1107
- match: "\\b([A-Za-z_]\\w*)\\s*(\\()",
1108
- captures: {
1109
- "1": {
1110
- name: "entity.name.function"
1111
- },
1112
- "2": {
1113
- name: "punctuation.parameters.begin"
1114
- }
1115
- }
1116
- },
1117
- assembly: {
1118
- patterns: [
1119
- {
1120
- match: "\\b(assembly)\\b",
1121
- name: "keyword.control.assembly"
1122
- },
1123
- {
1124
- match: "\\b(let)\\b",
1125
- name: "storage.type.assembly"
1126
- }
1127
- ]
1128
- },
1129
- punctuation: {
1130
- patterns: [
1131
- {
1132
- match: ";",
1133
- name: "punctuation.terminator.statement"
1134
- },
1135
- {
1136
- match: "\\.",
1137
- name: "punctuation.accessor"
1138
- },
1139
- {
1140
- match: ",",
1141
- name: "punctuation.separator"
1142
- },
1143
- {
1144
- match: "\\{",
1145
- name: "punctuation.brace.curly.begin"
1146
- },
1147
- {
1148
- match: "\\}",
1149
- name: "punctuation.brace.curly.end"
1150
- },
1151
- {
1152
- match: "\\[",
1153
- name: "punctuation.brace.square.begin"
1154
- },
1155
- {
1156
- match: "\\]",
1157
- name: "punctuation.brace.square.end"
1158
- },
1159
- {
1160
- match: "\\(",
1161
- name: "punctuation.parameters.begin"
1162
- },
1163
- {
1164
- match: "\\)",
1165
- name: "punctuation.parameters.end"
1166
- }
1167
- ]
43
+ var surroundingPairs = [
44
+ [
45
+ "{",
46
+ "}"
47
+ ],
48
+ [
49
+ "[",
50
+ "]"
51
+ ],
52
+ [
53
+ "(",
54
+ ")"
55
+ ]
56
+ ];
57
+ var folding = {
58
+ markers: {
59
+ start: "^\\s*//\\s*#?region\\b",
60
+ end: "^\\s*//\\s*#?endregion\\b"
1168
61
  }
1169
62
  };
1170
- var scopeName = "source.solidity";
1171
- var uuid = "ad87d2cd-8575-4afe-984e-9421a3788933";
1172
- var information_for_contributors = [
1173
- "This file has been converted from https://github.com/juanfranblanco/vscode-solidity/blob/master/",
1174
- "If you want to provide a fix or improvement, please create a pull request against the original repository.",
1175
- "Once accepted there, we are happy to receive an update request."
1176
- ];
1177
63
  var solidity = {
1178
- fileTypes: fileTypes,
1179
- name: name,
1180
- patterns: patterns,
1181
- repository: repository,
1182
- scopeName: scopeName,
1183
- uuid: uuid,
1184
- information_for_contributors: information_for_contributors
64
+ comments: comments,
65
+ brackets: brackets,
66
+ autoClosingPairs: autoClosingPairs,
67
+ surroundingPairs: surroundingPairs,
68
+ folding: folding
1185
69
  };
1186
70
 
1187
- export { solidity as default, fileTypes, information_for_contributors, name, patterns, repository, scopeName, uuid };
71
+ export { autoClosingPairs, brackets, comments, solidity as default, folding, surroundingPairs };