@codingame/monaco-languageclient-wrapper 1.0.5 → 1.0.9

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 (164) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/main.js +18 -33
  3. package/package.json +3 -2
  4. package/stats.html +1 -1
  5. package/dist/BSV.tmLanguage.js +0 -299
  6. package/dist/COBOL Copybook.js +0 -2017
  7. package/dist/COBOL.js +0 -2017
  8. package/dist/COBOL.tmLanguage.js +0 -149
  9. package/dist/CodinGameMonacoWorkspace.d.ts +0 -13
  10. package/dist/Configuration.d.ts +0 -15
  11. package/dist/Erlang.plist.js +0 -1752
  12. package/dist/JSON.tmLanguage.js +0 -221
  13. package/dist/JSONC.tmLanguage.js +0 -221
  14. package/dist/JavaScript.tmLanguage.js +0 -5894
  15. package/dist/Kotlin.tmLanguage.js +0 -724
  16. package/dist/MagicPython.tmLanguage.js +0 -5340
  17. package/dist/MagicRegExp.tmLanguage.js +0 -505
  18. package/dist/Regular Expressions (JavaScript).tmLanguage.js +0 -166
  19. package/dist/SQL.plist.js +0 -482
  20. package/dist/Scala.tmLanguage.js +0 -1255
  21. package/dist/TypeScript.tmLanguage.js +0 -5641
  22. package/dist/WatchableConsoleWindow.d.ts +0 -22
  23. package/dist/_rollupPluginBabelHelpers.js +0 -54
  24. package/dist/asp-vb-net.tmlanguage.js +0 -247
  25. package/dist/bsv.js +0 -49
  26. package/dist/c.js +0 -18
  27. package/dist/c.tmLanguage.js +0 -3347
  28. package/dist/cabal.tmLanguage.js +0 -66
  29. package/dist/clojure.tmLanguage.js +0 -443
  30. package/dist/codeblock-cabal.js +0 -42
  31. package/dist/codeblock-haskell.js +0 -42
  32. package/dist/codeblock-literate-haskell.js +0 -42
  33. package/dist/codeblock.js +0 -36
  34. package/dist/codeblock2.js +0 -95
  35. package/dist/coffeescript.js +0 -18
  36. package/dist/coffeescript.tmLanguage.js +0 -1324
  37. package/dist/configuration/index.d.ts +0 -5
  38. package/dist/cpp.js +0 -18
  39. package/dist/cpp.tmLanguage.js +0 -19996
  40. package/dist/csharp.js +0 -18
  41. package/dist/csharp.tmLanguage.js +0 -4750
  42. package/dist/css.tmLanguage.js +0 -1873
  43. package/dist/css.worker.js +0 -6
  44. package/dist/cssContribution.js +0 -10
  45. package/dist/cuda-cpp.tmLanguage.js +0 -19993
  46. package/dist/d.js +0 -3159
  47. package/dist/dart.js +0 -530
  48. package/dist/diet.js +0 -758
  49. package/dist/diet2.js +0 -92
  50. package/dist/dml.js +0 -169
  51. package/dist/eex.js +0 -55
  52. package/dist/elixir.js +0 -2341
  53. package/dist/elixir2.js +0 -184
  54. package/dist/erlang.js +0 -195
  55. package/dist/expression.js +0 -846
  56. package/dist/extensions/autofold.d.ts +0 -2
  57. package/dist/extensions/cobol.d.ts +0 -2
  58. package/dist/extensions/index.d.ts +0 -2
  59. package/dist/features/cssContribution.d.ts +0 -1
  60. package/dist/features/htmlContribution.d.ts +0 -1
  61. package/dist/features/jsonContribution.d.ts +0 -1
  62. package/dist/features/typescriptContribution.d.ts +0 -1
  63. package/dist/fsharp.js +0 -18
  64. package/dist/fsharp.tmLanguage.js +0 -1811
  65. package/dist/go.tmLanguage.js +0 -1025
  66. package/dist/groovy.js +0 -229
  67. package/dist/groovy.tmLanguage.js +0 -1391
  68. package/dist/haskell.tmLanguage.js +0 -629
  69. package/dist/html (eex).js +0 -31
  70. package/dist/html-derivative.tmLanguage.js +0 -57
  71. package/dist/html.tmLanguage.js +0 -2652
  72. package/dist/html.tmLanguage2.js +0 -97
  73. package/dist/html.worker.js +0 -6
  74. package/dist/htmlContribution.js +0 -10
  75. package/dist/inline-styles.js +0 -104
  76. package/dist/inline-template.js +0 -88
  77. package/dist/java.js +0 -18
  78. package/dist/java.tmLanguage.js +0 -1863
  79. package/dist/javascript.js +0 -196
  80. package/dist/javascriptreact.js +0 -196
  81. package/dist/jsdoc.js.injection.tmLanguage.js +0 -32
  82. package/dist/jsdoc.ts.injection.tmLanguage.js +0 -32
  83. package/dist/json.worker.js +0 -6
  84. package/dist/jsonContribution.js +0 -78
  85. package/dist/keybindings/index.d.ts +0 -2
  86. package/dist/keybindings/keybindingHelper.d.ts +0 -2
  87. package/dist/keybindings/vim.d.ts +0 -3
  88. package/dist/kotlin.js +0 -117
  89. package/dist/kotlinscript.js +0 -117
  90. package/dist/languages/extensions/grammarLoader.d.ts +0 -91037
  91. package/dist/languages/extensions/snippetLoader.d.ts +0 -4578
  92. package/dist/languages/index.d.ts +0 -3
  93. package/dist/languages/monarch/index.d.ts +0 -7
  94. package/dist/languages/monarch/list.d.ts +0 -7
  95. package/dist/languages/monarch/stub-generator.d.ts +0 -2
  96. package/dist/languages/snippets/index.d.ts +0 -1
  97. package/dist/languages/textMate/CGTMGrammarFactory.d.ts +0 -5
  98. package/dist/languages/textMate/TextMateTokensProvider.d.ts +0 -11
  99. package/dist/languages/textMate/index.d.ts +0 -2
  100. package/dist/literateHaskell.tmLanguage.js +0 -70
  101. package/dist/lua.tmLanguage.js +0 -289
  102. package/dist/markdown.js +0 -103
  103. package/dist/markdown.tmLanguage.js +0 -2784
  104. package/dist/merlin.js +0 -111
  105. package/dist/monaco.d.ts +0 -8
  106. package/dist/objective-c.tmLanguage.js +0 -3618
  107. package/dist/ocaml-hover-info.js +0 -34
  108. package/dist/ocaml-hover-type.js +0 -24
  109. package/dist/ocaml-markdown-codeblock.js +0 -42
  110. package/dist/ocaml.js +0 -2979
  111. package/dist/ocamlbuild.js +0 -239
  112. package/dist/opam.js +0 -149
  113. package/dist/pascal.js +0 -382
  114. package/dist/pascal.tmLanguage.js +0 -169
  115. package/dist/perl.tmLanguage.js +0 -2986
  116. package/dist/perl6.tmLanguage.js +0 -323
  117. package/dist/pgsql.tmLanguage.js +0 -284
  118. package/dist/php.js +0 -265
  119. package/dist/php.tmLanguage.js +0 -3791
  120. package/dist/platform.tmLanguage.js +0 -1135
  121. package/dist/powershell.js +0 -18
  122. package/dist/powershell.tmLanguage.js +0 -1037
  123. package/dist/r.tmLanguage.js +0 -551
  124. package/dist/reason-hover-info.js +0 -34
  125. package/dist/reason-hover-signature.js +0 -21
  126. package/dist/reason-hover-type.js +0 -21
  127. package/dist/reason-markdown-codeblock.js +0 -42
  128. package/dist/reason.js +0 -100
  129. package/dist/ruby.tmLanguage.js +0 -2784
  130. package/dist/rust.tmLanguage.js +0 -1178
  131. package/dist/sassdoc.tmLanguage.js +0 -362
  132. package/dist/scss.tmLanguage.js +0 -1887
  133. package/dist/sdc.tmLanguage.js +0 -712
  134. package/dist/sdl.js +0 -162
  135. package/dist/services/EditorModelResolverService.d.ts +0 -8
  136. package/dist/services/MultiEditorStandaloneCodeEditorService.d.ts +0 -7
  137. package/dist/shell-unix-bash.tmLanguage.js +0 -1291
  138. package/dist/sql.js +0 -21
  139. package/dist/stub-generator.js +0 -15
  140. package/dist/swift.js +0 -183
  141. package/dist/swift.tmLanguage.js +0 -3288
  142. package/dist/systemverilog.js +0 -208
  143. package/dist/systemverilog.tmLanguage.js +0 -1067
  144. package/dist/tcl.js +0 -151
  145. package/dist/tcl.tmlanguage.yaml.js +0 -5484
  146. package/dist/template.js +0 -207
  147. package/dist/theme/index.d.ts +0 -3
  148. package/dist/theme/registry.d.ts +0 -4
  149. package/dist/theme/semanticHighlight.d.ts +0 -1
  150. package/dist/theme/tools.d.ts +0 -13
  151. package/dist/tools.d.ts +0 -3
  152. package/dist/ts.worker.js +0 -6
  153. package/dist/typescript.js +0 -312
  154. package/dist/typescriptContribution.js +0 -36
  155. package/dist/typescriptreact.js +0 -312
  156. package/dist/ucf.tmLanguage.js +0 -36
  157. package/dist/vb.js +0 -88
  158. package/dist/verilog.js +0 -432
  159. package/dist/verilog.tmLanguage.js +0 -321
  160. package/dist/worker.d.ts +0 -6
  161. package/dist/worker.js +0 -54
  162. package/dist/xml.tmLanguage.js +0 -395
  163. package/dist/xsl.tmLanguage.js +0 -102
  164. package/dist/yaml.tmLanguage.js +0 -629
@@ -1,1811 +0,0 @@
1
- var information_for_contributors = [
2
- "This file has been converted from https://github.com/microsoft/vscode/blob/master/extensions/fsharp/",
3
- "If you want to provide a fix or improvement, please create a pull request against the original repository.",
4
- "Once accepted there, we are happy to receive an update request."
5
- ];
6
- var version = "https://github.com/ionide/ionide-fsgrammar/commit/fc4cac6d9bc1787f54ce48bbc77bcbb1de8160ff";
7
- var name = "fsharp";
8
- var scopeName = "source.fsharp";
9
- var patterns = [
10
- {
11
- include: "#compiler_directives"
12
- },
13
- {
14
- include: "#comments"
15
- },
16
- {
17
- include: "#constants"
18
- },
19
- {
20
- include: "#strings"
21
- },
22
- {
23
- include: "#chars"
24
- },
25
- {
26
- include: "#double_tick"
27
- },
28
- {
29
- include: "#definition"
30
- },
31
- {
32
- include: "#abstract_definition"
33
- },
34
- {
35
- include: "#attributes"
36
- },
37
- {
38
- include: "#modules"
39
- },
40
- {
41
- include: "#anonymous_functions"
42
- },
43
- {
44
- include: "#du_declaration"
45
- },
46
- {
47
- include: "#record_declaration"
48
- },
49
- {
50
- include: "#records"
51
- },
52
- {
53
- include: "#strp_inlined"
54
- },
55
- {
56
- include: "#keywords"
57
- },
58
- {
59
- include: "#cexprs"
60
- },
61
- {
62
- include: "#text"
63
- }
64
- ];
65
- var repository = {
66
- strp_inlined_body: {
67
- patterns: [
68
- {
69
- include: "#comments"
70
- },
71
- {
72
- include: "#anonymous_functions"
73
- },
74
- {
75
- match: "(\\^[[:alpha:]0-9'._]+)",
76
- captures: {
77
- "1": {
78
- name: "entity.name.type.fsharp"
79
- }
80
- }
81
- },
82
- {
83
- name: "keyword.fsharp",
84
- match: "\\b(and|when|or)\\b"
85
- },
86
- {
87
- begin: "(\\()",
88
- beginCaptures: {
89
- "1": {
90
- name: "keyword.symbol.fsharp"
91
- }
92
- },
93
- end: "(\\))",
94
- endCaptures: {
95
- "1": {
96
- name: "keyword.symbol.fsharp"
97
- }
98
- },
99
- patterns: [
100
- {
101
- include: "#strp_inlined_body"
102
- }
103
- ]
104
- },
105
- {
106
- match: "(static member|member)\\s*([[:alpha:]0-9'`<>^._]+|``[[:alpha:]0-9' <>^._]+``)\\s*(:)",
107
- captures: {
108
- "1": {
109
- name: "keyword.fsharp"
110
- },
111
- "2": {
112
- name: "variable.fsharp"
113
- },
114
- "3": {
115
- name: "keyword.symbol.fsharp"
116
- }
117
- }
118
- },
119
- {
120
- include: "#compiler_directives"
121
- },
122
- {
123
- include: "#constants"
124
- },
125
- {
126
- include: "#strings"
127
- },
128
- {
129
- include: "#chars"
130
- },
131
- {
132
- include: "#double_tick"
133
- },
134
- {
135
- include: "#keywords"
136
- },
137
- {
138
- include: "#text"
139
- },
140
- {
141
- include: "#definition"
142
- },
143
- {
144
- include: "#attributes"
145
- },
146
- {
147
- include: "#keywords"
148
- },
149
- {
150
- include: "#cexprs"
151
- },
152
- {
153
- include: "#text"
154
- }
155
- ]
156
- },
157
- strp_inlined: {
158
- patterns: [
159
- {
160
- begin: "(\\()",
161
- beginCaptures: {
162
- "1": {
163
- name: "keyword.symbol.fsharp"
164
- }
165
- },
166
- end: "(\\))",
167
- endCaptures: {
168
- "1": {
169
- name: "keyword.symbol.fsharp"
170
- }
171
- },
172
- patterns: [
173
- {
174
- include: "#strp_inlined_body"
175
- }
176
- ]
177
- }
178
- ]
179
- },
180
- generic_declaration: {
181
- patterns: [
182
- {
183
- comments: "SRTP syntax support",
184
- begin: "(:)\\s*(\\()\\s*(static member|member)",
185
- beginCaptures: {
186
- "1": {
187
- name: "keyword.symbol.fsharp"
188
- },
189
- "2": {
190
- name: "keyword.symbol.fsharp"
191
- },
192
- "3": {
193
- name: "keyword.fsharp"
194
- }
195
- },
196
- end: "(\\))",
197
- endCaptures: {
198
- "1": {
199
- name: "keyword.symbol.fsharp"
200
- }
201
- },
202
- patterns: [
203
- {
204
- begin: "(\\()",
205
- beginCaptures: {
206
- "1": {
207
- name: "keyword.symbol.fsharp"
208
- }
209
- },
210
- end: "(\\))",
211
- endCaptures: {
212
- "1": {
213
- name: "keyword.symbol.fsharp"
214
- }
215
- },
216
- patterns: [
217
- {
218
- include: "#member_declaration"
219
- }
220
- ]
221
- },
222
- {
223
- match: "(('|\\^)[[:alpha:]0-9'._]+)",
224
- captures: {
225
- "1": {
226
- name: "entity.name.type.fsharp"
227
- }
228
- }
229
- },
230
- {
231
- include: "#variables"
232
- },
233
- {
234
- include: "#keywords"
235
- }
236
- ]
237
- },
238
- {
239
- name: "keyword.fsharp",
240
- match: "\\b(private|to|public|internal|function|yield!|yield|class|exception|match|delegate|of|new|in|as|if|then|else|elif|for|begin|end|inherit|do|let\\!|return\\!|return|interface|with|abstract|enum|member|try|finally|and|when|or|use|use\\!|struct|while|mutable|assert|base|done|downcast|downto|extern|fixed|global|lazy|upcast|not)(?!')\\b"
241
- },
242
- {
243
- name: "keyword.fsharp",
244
- match: ":"
245
- },
246
- {
247
- include: "#constants"
248
- },
249
- {
250
- match: "(('|\\^)[[:alpha:]0-9'._]+)",
251
- captures: {
252
- "1": {
253
- name: "entity.name.type.fsharp"
254
- }
255
- }
256
- },
257
- {
258
- begin: "(<)",
259
- end: "(>)",
260
- beginCaptures: {
261
- "1": {
262
- name: "keyword.symbol.fsharp"
263
- }
264
- },
265
- endCaptures: {
266
- "1": {
267
- name: "keyword.symbol.fsharp"
268
- }
269
- },
270
- patterns: [
271
- {
272
- match: "(('|\\^)[[:alpha:]0-9'._]+)",
273
- captures: {
274
- "1": {
275
- name: "entity.name.type.fsharp"
276
- }
277
- }
278
- },
279
- {
280
- include: "#tuple_signature"
281
- },
282
- {
283
- include: "#generic_declaration"
284
- }
285
- ]
286
- },
287
- {
288
- begin: "(\\()",
289
- end: "(\\))",
290
- beginCaptures: {
291
- "1": {
292
- name: "keyword.symbol.fsharp"
293
- }
294
- },
295
- endCaptures: {
296
- "1": {
297
- name: "keyword.symbol.fsharp"
298
- }
299
- },
300
- patterns: [
301
- {
302
- match: "(([?[:alpha:]0-9'`^._ ]+))+",
303
- captures: {
304
- "1": {
305
- name: "entity.name.type.fsharp"
306
- }
307
- }
308
- },
309
- {
310
- include: "#tuple_signature"
311
- }
312
- ]
313
- },
314
- {
315
- match: "(?!when|and|or\\b)\\b([\\w0-9'`^._]+)",
316
- comments: "Here we need the \\w modifier in order to check that the words isn't blacklisted",
317
- captures: {
318
- "1": {
319
- name: "entity.name.type.fsharp"
320
- }
321
- }
322
- },
323
- {
324
- match: "(\\|)",
325
- comments: "Prevent captures of `|>` as a keyword when defining custom operator like `<|>`",
326
- captures: {
327
- "1": {
328
- name: "keyword.symbol.fsharp"
329
- }
330
- }
331
- },
332
- {
333
- include: "#keywords"
334
- }
335
- ]
336
- },
337
- anonymous_record_declaration: {
338
- begin: "(\\{\\|)",
339
- end: "(\\|\\})",
340
- beginCaptures: {
341
- "1": {
342
- name: "keyword.symbol.fsharp"
343
- }
344
- },
345
- endCaptures: {
346
- "1": {
347
- name: "keyword.symbol.fsharp"
348
- }
349
- },
350
- patterns: [
351
- {
352
- match: "[[:alpha:]0-9'`^_ ]+(:)",
353
- captures: {
354
- "1": {
355
- name: "keyword.symbol.fsharp"
356
- }
357
- }
358
- },
359
- {
360
- match: "([[:alpha:]0-9'`^_ ]+)",
361
- captures: {
362
- "1": {
363
- name: "entity.name.type.fsharp"
364
- }
365
- }
366
- },
367
- {
368
- include: "#anonymous_record_declaration"
369
- },
370
- {
371
- include: "#keywords"
372
- }
373
- ]
374
- },
375
- record_signature: {
376
- patterns: [
377
- {
378
- match: "[[:alpha:]0-9'`^_ ]+(=)([[:alpha:]0-9'`^_ ]+)",
379
- captures: {
380
- "1": {
381
- name: "keyword.symbol.fsharp"
382
- },
383
- "2": {
384
- name: "variable.parameter.fsharp"
385
- }
386
- }
387
- },
388
- {
389
- begin: "({)",
390
- end: "(})",
391
- beginCaptures: {
392
- "1": {
393
- name: "keyword.symbol.fsharp"
394
- }
395
- },
396
- endCaptures: {
397
- "1": {
398
- name: "keyword.symbol.fsharp"
399
- }
400
- },
401
- patterns: [
402
- {
403
- match: "[[:alpha:]0-9'`^_ ]+(=)([[:alpha:]0-9'`^_ ]+)",
404
- captures: {
405
- "1": {
406
- name: "keyword.symbol.fsharp"
407
- },
408
- "2": {
409
- name: "variable.parameter.fsharp"
410
- }
411
- }
412
- },
413
- {
414
- include: "#record_signature"
415
- }
416
- ]
417
- },
418
- {
419
- include: "#keywords"
420
- }
421
- ]
422
- },
423
- tuple_signature: {
424
- patterns: [
425
- {
426
- match: "(([?[:alpha:]0-9'`^._ ]+))+",
427
- captures: {
428
- "1": {
429
- name: "entity.name.type.fsharp"
430
- }
431
- }
432
- },
433
- {
434
- begin: "(\\()",
435
- end: "(\\))",
436
- beginCaptures: {
437
- "1": {
438
- name: "keyword.symbol.fsharp"
439
- }
440
- },
441
- endCaptures: {
442
- "1": {
443
- name: "keyword.symbol.fsharp"
444
- }
445
- },
446
- patterns: [
447
- {
448
- match: "(([?[:alpha:]0-9'`^._ ]+))+",
449
- captures: {
450
- "1": {
451
- name: "entity.name.type.fsharp"
452
- }
453
- }
454
- },
455
- {
456
- include: "#tuple_signature"
457
- }
458
- ]
459
- },
460
- {
461
- include: "#keywords"
462
- }
463
- ]
464
- },
465
- anonymous_functions: {
466
- patterns: [
467
- {
468
- name: "function.anonymous",
469
- begin: "\\b(fun)\\b",
470
- end: "(->)",
471
- beginCaptures: {
472
- "1": {
473
- name: "keyword.fsharp"
474
- }
475
- },
476
- endCaptures: {
477
- "1": {
478
- name: "keyword.symbol.arrow.fsharp"
479
- }
480
- },
481
- patterns: [
482
- {
483
- include: "#comments"
484
- },
485
- {
486
- begin: "(\\()",
487
- end: "\\s*(?=(->))",
488
- beginCaptures: {
489
- "1": {
490
- name: "keyword.symbol.arrow.fsharp"
491
- }
492
- },
493
- endCaptures: {
494
- "1": {
495
- name: "keyword.symbol.arrow.fsharp"
496
- }
497
- },
498
- patterns: [
499
- {
500
- include: "#member_declaration"
501
- }
502
- ]
503
- },
504
- {
505
- include: "#variables"
506
- }
507
- ]
508
- }
509
- ]
510
- },
511
- attributes: {
512
- patterns: [
513
- {
514
- name: "support.function.attribute.fsharp",
515
- begin: "\\[\\<",
516
- end: "\\>\\]|\\]",
517
- patterns: [
518
- {
519
- include: "$self"
520
- }
521
- ]
522
- }
523
- ]
524
- },
525
- comments: {
526
- patterns: [
527
- {
528
- name: "comment.block.markdown.fsharp",
529
- begin: "^\\s*(\\(\\*\\*(?!\\)))(?!\\*\\))$",
530
- "while": "^(?!\\s*\\*\\)$)",
531
- beginCaptures: {
532
- "1": {
533
- name: "comment.block.fsharp"
534
- }
535
- },
536
- endCaptures: {
537
- "1": {
538
- name: "comment.block.fsharp"
539
- }
540
- },
541
- patterns: [
542
- {
543
- include: "text.html.markdown"
544
- }
545
- ]
546
- },
547
- {
548
- name: "comment.block.fsharp",
549
- begin: "(\\(\\*(?!\\)))",
550
- end: "(\\*\\))",
551
- beginCaptures: {
552
- "1": {
553
- name: "comment.block.fsharp"
554
- }
555
- },
556
- endCaptures: {
557
- "1": {
558
- name: "comment.block.fsharp"
559
- }
560
- },
561
- patterns: [
562
- {
563
- comments: "Capture // when inside of (* *) like that the rule which capture comments starting by // is not trigger. See https://github.com/ionide/ionide-fsgrammar/issues/155",
564
- name: "fast-capture.comment.line.double-slash.fsharp",
565
- match: "//"
566
- },
567
- {
568
- include: "#comments"
569
- }
570
- ]
571
- },
572
- {
573
- name: "comment.block.markdown.fsharp.end",
574
- match: "(\\*\\))",
575
- captures: {
576
- "1": {
577
- name: "comment.block.fsharp"
578
- }
579
- }
580
- },
581
- {
582
- name: "comment.line.markdown.fsharp",
583
- begin: "///",
584
- "while": "///",
585
- patterns: [
586
- {
587
- include: "text.html.markdown"
588
- }
589
- ]
590
- },
591
- {
592
- name: "comment.line.double-slash.fsharp",
593
- match: "//.*$"
594
- }
595
- ]
596
- },
597
- constants: {
598
- patterns: [
599
- {
600
- name: "constant.language.unit.fsharp",
601
- match: "\\(\\)"
602
- },
603
- {
604
- name: "constant.numeric.float.fsharp",
605
- match: "\\b-?[0-9][0-9_]*((\\.([0-9][0-9_]*([eE][+-]??[0-9][0-9_]*)?)?)|([eE][+-]??[0-9][0-9_]*))"
606
- },
607
- {
608
- name: "constant.numeric.integer.nativeint.fsharp",
609
- match: "\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))"
610
- },
611
- {
612
- name: "constant.other.fsharp",
613
- match: "\\b(true|false|null|unit|void)\\b"
614
- }
615
- ]
616
- },
617
- abstract_definition: {
618
- name: "abstract.definition.fsharp",
619
- begin: "\\b(abstract)\\s+(member)?(\\s+\\[\\<.*\\>\\])?\\s*([_[:alpha:]0-9,\\._`\\s]+)(:)",
620
- end: "\\s*(with)\\b|=|$",
621
- beginCaptures: {
622
- "1": {
623
- name: "keyword.fsharp"
624
- },
625
- "2": {
626
- name: "keyword.fsharp"
627
- },
628
- "3": {
629
- name: "support.function.attribute.fsharp"
630
- },
631
- "5": {
632
- name: "keyword.fsharp"
633
- }
634
- },
635
- endCaptures: {
636
- "1": {
637
- name: "keyword.fsharp"
638
- }
639
- },
640
- patterns: [
641
- {
642
- include: "#comments"
643
- },
644
- {
645
- include: "#common_declaration"
646
- },
647
- {
648
- match: "(\\?{0,1})([[:alpha:]0-9'`^._ ]+)\\s*(:)((?!with\\b)\\b([\\w0-9'`^._ ]+)){0,1}",
649
- captures: {
650
- "1": {
651
- name: "keyword.symbol.fsharp"
652
- },
653
- "2": {
654
- name: "variable.parameter.fsharp"
655
- },
656
- "3": {
657
- name: "keyword.symbol.fsharp"
658
- },
659
- "4": {
660
- name: "entity.name.type.fsharp"
661
- }
662
- }
663
- },
664
- {
665
- match: "(?!with|get|set\\b)\\b([\\w0-9'`^._]+)",
666
- comments: "Here we need the \\w modifier in order to check that the words isn't blacklisted",
667
- captures: {
668
- "1": {
669
- name: "entity.name.type.fsharp"
670
- }
671
- }
672
- },
673
- {
674
- include: "#keywords"
675
- }
676
- ]
677
- },
678
- common_binding_definition: {
679
- patterns: [
680
- {
681
- include: "#comments"
682
- },
683
- {
684
- include: "#attributes"
685
- },
686
- {
687
- comments: "SRTP syntax support",
688
- begin: "(:)\\s*(\\()\\s*(static member|member)",
689
- beginCaptures: {
690
- "1": {
691
- name: "keyword.symbol.fsharp"
692
- },
693
- "2": {
694
- name: "keyword.symbol.fsharp"
695
- },
696
- "3": {
697
- name: "keyword.fsharp"
698
- }
699
- },
700
- end: "(\\))\\s*((?=,)|(?=\\=))",
701
- endCaptures: {
702
- "1": {
703
- name: "keyword.symbol.fsharp"
704
- }
705
- },
706
- patterns: [
707
- {
708
- match: "(\\^[[:alpha:]0-9'._]+)",
709
- captures: {
710
- "1": {
711
- name: "entity.name.type.fsharp"
712
- }
713
- }
714
- },
715
- {
716
- include: "#variables"
717
- },
718
- {
719
- include: "#keywords"
720
- }
721
- ]
722
- },
723
- {
724
- begin: "(:)\\s*(\\()",
725
- beginCaptures: {
726
- "1": {
727
- name: "keyword.symbol.fsharp"
728
- },
729
- "2": {
730
- name: "keyword.symbol.fsharp"
731
- }
732
- },
733
- end: "(\\)\\s*(([?[:alpha:]0-9'`^._ ]*)))",
734
- endCaptures: {
735
- "1": {
736
- name: "keyword.symbol.fsharp"
737
- },
738
- "2": {
739
- name: "entity.name.type.fsharp"
740
- }
741
- },
742
- patterns: [
743
- {
744
- include: "#tuple_signature"
745
- }
746
- ]
747
- },
748
- {
749
- begin: "(:)\\s*(\\^[[:alpha:]0-9'._]+)\\s*(when)",
750
- beginCaptures: {
751
- "1": {
752
- name: "keyword.symbol.fsharp"
753
- },
754
- "2": {
755
- name: "entity.name.type.fsharp"
756
- },
757
- "3": {
758
- name: "keyword.fsharp"
759
- }
760
- },
761
- end: "(?=:)",
762
- endCaptures: {
763
- "1": {
764
- name: "keyword.symbol.fsharp"
765
- }
766
- },
767
- patterns: [
768
- {
769
- name: "keyword.fsharp",
770
- match: "\\b(and|when|or)\\b"
771
- },
772
- {
773
- comment: "Because we first capture the keywords, we can capture what looks like a word and assume it's an entity definition",
774
- match: "([[:alpha:]0-9'^._]+)",
775
- captures: {
776
- "1": {
777
- name: "entity.name.type.fsharp"
778
- }
779
- }
780
- },
781
- {
782
- name: "keyword.symbol.fsharp",
783
- match: "(\\(|\\))"
784
- }
785
- ]
786
- },
787
- {
788
- match: "(:)\\s*([?[:alpha:]0-9'`^._ ]+)",
789
- captures: {
790
- "1": {
791
- name: "keyword.symbol.fsharp"
792
- },
793
- "2": {
794
- name: "entity.name.type.fsharp"
795
- }
796
- }
797
- },
798
- {
799
- match: "(->)\\s*(\\()?\\s*([?[:alpha:]0-9'`^._ ]+)*",
800
- captures: {
801
- "1": {
802
- name: "keyword.symbol.fsharp"
803
- },
804
- "2": {
805
- name: "keyword.symbol.fsharp"
806
- },
807
- "3": {
808
- name: "entity.name.type.fsharp"
809
- }
810
- }
811
- },
812
- {
813
- begin: "(\\*)\\s*(\\()",
814
- beginCaptures: {
815
- "1": {
816
- name: "keyword.symbol.fsharp"
817
- },
818
- "2": {
819
- name: "keyword.symbol.fsharp"
820
- }
821
- },
822
- end: "(\\)\\s*(([?[:alpha:]0-9'`^._ ]+))+)",
823
- endCaptures: {
824
- "1": {
825
- name: "keyword.symbol.fsharp"
826
- },
827
- "2": {
828
- name: "entity.name.type.fsharp"
829
- }
830
- },
831
- patterns: [
832
- {
833
- include: "#tuple_signature"
834
- }
835
- ]
836
- },
837
- {
838
- begin: "(\\*)(\\s*([?[:alpha:]0-9'`^._ ]+))*",
839
- beginCaptures: {
840
- "1": {
841
- name: "keyword.symbol.fsharp"
842
- },
843
- "2": {
844
- name: "entity.name.type.fsharp"
845
- }
846
- },
847
- end: "(?==)|(?=\\))",
848
- endCaptures: {
849
- "1": {
850
- name: "keyword.symbol.fsharp"
851
- }
852
- },
853
- patterns: [
854
- {
855
- include: "#tuple_signature"
856
- }
857
- ]
858
- },
859
- {
860
- begin: "(<+(?![[:space:]]*\\)))",
861
- beginComment: "The group (?![[:space:]]*\\) is for protection against overload operator. static member (<)",
862
- end: "((?<!:)>|\\))",
863
- endComment: "The group (?<!:) prevent us from stopping on :> when using SRTP synthax",
864
- beginCaptures: {
865
- "1": {
866
- name: "keyword.symbol.fsharp"
867
- }
868
- },
869
- endCaptures: {
870
- "1": {
871
- name: "keyword.symbol.fsharp"
872
- }
873
- },
874
- patterns: [
875
- {
876
- include: "#generic_declaration"
877
- }
878
- ]
879
- },
880
- {
881
- include: "#anonymous_record_declaration"
882
- },
883
- {
884
- begin: "({)",
885
- end: "(})",
886
- beginCaptures: {
887
- "1": {
888
- name: "keyword.symbol.fsharp"
889
- }
890
- },
891
- endCaptures: {
892
- "1": {
893
- name: "keyword.symbol.fsharp"
894
- }
895
- },
896
- patterns: [
897
- {
898
- include: "#record_signature"
899
- }
900
- ]
901
- },
902
- {
903
- include: "#definition"
904
- },
905
- {
906
- include: "#variables"
907
- },
908
- {
909
- include: "#keywords"
910
- }
911
- ]
912
- },
913
- definition: {
914
- patterns: [
915
- {
916
- name: "binding.fsharp",
917
- begin: "\\b(let mutable|static let mutable|static let|let inline|let|member val|static member inline|static member|default|member|override|let!)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9\\._`\\s]+|(?<=,)\\s)*)?",
918
- end: "\\s*(with\\b|=|\\n+=|(?<=\\=))",
919
- beginCaptures: {
920
- "1": {
921
- name: "keyword.fsharp"
922
- },
923
- "2": {
924
- name: "keyword.fsharp"
925
- },
926
- "3": {
927
- name: "support.function.attribute.fsharp"
928
- },
929
- "4": {
930
- name: "storage.modifier.fsharp"
931
- },
932
- "5": {
933
- name: "variable.fsharp"
934
- }
935
- },
936
- endCaptures: {
937
- "1": {
938
- name: "keyword.fsharp"
939
- }
940
- },
941
- patterns: [
942
- {
943
- include: "#common_binding_definition"
944
- }
945
- ]
946
- },
947
- {
948
- name: "binding.fsharp",
949
- begin: "(?<=with|and)\\s*\\b((get|set)\\s*(?=\\())(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9\\._`\\s]+|(?<=,)\\s)*)?",
950
- end: "\\s*(=|\\n+=|(?<=\\=))",
951
- beginCaptures: {
952
- "4": {
953
- name: "variable.fsharp"
954
- }
955
- },
956
- endCaptures: {
957
- "1": {
958
- name: "keyword.fsharp"
959
- }
960
- },
961
- patterns: [
962
- {
963
- include: "#common_binding_definition"
964
- }
965
- ]
966
- },
967
- {
968
- name: "binding.fsharp",
969
- begin: "\\b(static val mutable|val mutable|val)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9,\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9,\\._`\\s]+|(?<=,)\\s)*)?",
970
- end: "\\n$",
971
- beginCaptures: {
972
- "1": {
973
- name: "keyword.fsharp"
974
- },
975
- "2": {
976
- name: "keyword.fsharp"
977
- },
978
- "3": {
979
- name: "support.function.attribute.fsharp"
980
- },
981
- "4": {
982
- name: "storage.modifier.fsharp"
983
- },
984
- "5": {
985
- name: "variable.fsharp"
986
- }
987
- },
988
- patterns: [
989
- {
990
- include: "#common_binding_definition"
991
- }
992
- ]
993
- },
994
- {
995
- name: "binding.fsharp",
996
- begin: "\\b(new)\\b\\s+(\\()",
997
- end: "(\\))",
998
- beginCaptures: {
999
- "1": {
1000
- name: "keyword.fsharp"
1001
- },
1002
- "2": {
1003
- name: "keyword.fsharp"
1004
- }
1005
- },
1006
- endCaptures: {
1007
- "1": {
1008
- name: "keyword.fsharp"
1009
- }
1010
- },
1011
- patterns: [
1012
- {
1013
- include: "#common_binding_definition"
1014
- }
1015
- ]
1016
- }
1017
- ]
1018
- },
1019
- du_declaration: {
1020
- patterns: [
1021
- {
1022
- name: "du_declaration.fsharp",
1023
- begin: "\\b(of)\\b",
1024
- end: "$|(\\|)",
1025
- beginCaptures: {
1026
- "1": {
1027
- name: "keyword.fsharp"
1028
- }
1029
- },
1030
- endCaptures: {
1031
- "1": {
1032
- name: "keyword.symbol.fsharp"
1033
- }
1034
- },
1035
- patterns: [
1036
- {
1037
- include: "#comments"
1038
- },
1039
- {
1040
- match: "([[:alpha:]0-9'`<>^._]+|``[[:alpha:]0-9' <>^._]+``)\\s*(:)\\s*([[:alpha:]0-9'`<>^._]+|``[[:alpha:]0-9' <>^._]+``)",
1041
- captures: {
1042
- "1": {
1043
- name: "variable.parameter.fsharp"
1044
- },
1045
- "2": {
1046
- name: "keyword.symbol.fsharp"
1047
- },
1048
- "3": {
1049
- name: "entity.name.type.fsharp"
1050
- }
1051
- }
1052
- },
1053
- {
1054
- match: "(``([[:alpha:]0-9'^._ ]+)``|[[:alpha:]0-9'`^._]+)",
1055
- captures: {
1056
- "1": {
1057
- name: "entity.name.type.fsharp"
1058
- }
1059
- }
1060
- },
1061
- {
1062
- include: "#anonymous_record_declaration"
1063
- },
1064
- {
1065
- include: "#keywords"
1066
- }
1067
- ]
1068
- }
1069
- ]
1070
- },
1071
- keywords: {
1072
- patterns: [
1073
- {
1074
- name: "storage.modifier",
1075
- match: "\\b(private|public|internal)\\b"
1076
- },
1077
- {
1078
- name: "keyword.fsharp",
1079
- match: "\\b(private|to|public|internal|function|class|exception|delegate|of|as|begin|end|inherit|let!|interface|abstract|enum|member|and|when|or|use|use\\!|struct|mutable|assert|base|done|downcast|downto|extern|fixed|global|lazy|upcast|not)(?!')\\b"
1080
- },
1081
- {
1082
- name: "keyword.control",
1083
- match: "\\b(match|yield|yield!|with|if|then|else|elif|for|in|return!|return|try|finally|while|do)(?!')\\b"
1084
- },
1085
- {
1086
- name: "keyword.symbol.new",
1087
- match: "\\b(new)\\b"
1088
- },
1089
- {
1090
- name: "keyword.symbol.fsharp",
1091
- match: "(&&&|\\|\\|\\||\\^\\^\\^|~~~|<<<|>>>|\\|>|\\->|\\<\\-|:>|:\\?>|:|\\[|\\]|\\;|<>|=|@|\\|\\||&&|{|}|\\||_|\\.\\.|\\,|\\+|\\-|\\*|\\/|\\^|\\!|\\>|\\>\\=|\\>\\>|\\<|\\<\\=|\\(|\\)|\\<\\<)"
1092
- }
1093
- ]
1094
- },
1095
- modules: {
1096
- patterns: [
1097
- {
1098
- name: "entity.name.section.fsharp",
1099
- begin: "\\b(namespace global)|\\b(namespace|module)\\s*(public|internal|private|rec)?\\s+([[:alpha:]][[:alpha:]0-9'_. ]*)",
1100
- end: "(\\s?=|\\s|$)",
1101
- beginCaptures: {
1102
- "1": {
1103
- name: "keyword.fsharp"
1104
- },
1105
- "2": {
1106
- name: "keyword.fsharp"
1107
- },
1108
- "3": {
1109
- name: "storage.modifier.fsharp"
1110
- },
1111
- "4": {
1112
- name: "entity.name.section.fsharp"
1113
- }
1114
- },
1115
- endCaptures: {
1116
- "1": {
1117
- name: "keyword.symbol.fsharp"
1118
- }
1119
- },
1120
- patterns: [
1121
- {
1122
- name: "entity.name.section.fsharp",
1123
- match: "(\\.)([A-Z][[:alpha:]0-9'_]*)",
1124
- captures: {
1125
- "1": {
1126
- name: "punctuation.separator.namespace-reference.fsharp"
1127
- },
1128
- "2": {
1129
- name: "entity.name.section.fsharp"
1130
- }
1131
- }
1132
- }
1133
- ]
1134
- },
1135
- {
1136
- name: "namespace.open.fsharp",
1137
- begin: "\\b(open)\\s+([[:alpha:]][[:alpha:]0-9'_]*)(?=(\\.[A-Z][[:alpha:]0-9_]*)*)",
1138
- end: "(\\s|$)",
1139
- beginCaptures: {
1140
- "1": {
1141
- name: "keyword.fsharp"
1142
- },
1143
- "2": {
1144
- name: "entity.name.section.fsharp"
1145
- }
1146
- },
1147
- patterns: [
1148
- {
1149
- name: "entity.name.section.fsharp",
1150
- match: "(\\.)([[:alpha:]][[:alpha:]0-9'_]*)",
1151
- captures: {
1152
- "1": {
1153
- name: "punctuation.separator.namespace-reference.fsharp"
1154
- },
1155
- "2": {
1156
- name: "entity.name.section.fsharp"
1157
- }
1158
- }
1159
- },
1160
- {
1161
- include: "#comments"
1162
- }
1163
- ]
1164
- },
1165
- {
1166
- name: "namespace.alias.fsharp",
1167
- begin: "^\\s*(module)\\s+([A-Z][[:alpha:]0-9'_]*)\\s*(=)\\s*([A-Z][[:alpha:]0-9'_]*)",
1168
- end: "(\\s|$)",
1169
- beginCaptures: {
1170
- "1": {
1171
- name: "keyword.fsharp"
1172
- },
1173
- "2": {
1174
- name: "entity.name.type.namespace.fsharp"
1175
- },
1176
- "3": {
1177
- name: "punctuation.separator.namespace-definition.fsharp"
1178
- },
1179
- "4": {
1180
- name: "entity.name.section.fsharp"
1181
- }
1182
- },
1183
- patterns: [
1184
- {
1185
- name: "entity.name.section.fsharp",
1186
- match: "(\\.)([A-Z][[:alpha:]0-9'_]*)",
1187
- captures: {
1188
- "1": {
1189
- name: "punctuation.separator.namespace-reference.fsharp"
1190
- },
1191
- "2": {
1192
- name: "entity.name.section.fsharp"
1193
- }
1194
- }
1195
- }
1196
- ]
1197
- }
1198
- ]
1199
- },
1200
- strings: {
1201
- patterns: [
1202
- {
1203
- name: "string.quoted.literal.fsharp",
1204
- begin: "(?=[^\\\\])(@\")",
1205
- end: "(\")(?!\")",
1206
- beginCaptures: {
1207
- "1": {
1208
- name: "punctuation.definition.string.begin.fsharp"
1209
- }
1210
- },
1211
- endCaptures: {
1212
- "1": {
1213
- name: "punctuation.definition.string.end.fsharp"
1214
- }
1215
- },
1216
- patterns: [
1217
- {
1218
- name: "constant.character.string.escape.fsharp",
1219
- match: "\"(\")"
1220
- }
1221
- ]
1222
- },
1223
- {
1224
- name: "string.quoted.triple.fsharp",
1225
- begin: "(?=[^\\\\])(\"\"\")",
1226
- end: "(\"\"\")",
1227
- beginCaptures: {
1228
- "1": {
1229
- name: "punctuation.definition.string.begin.fsharp"
1230
- }
1231
- },
1232
- endCaptures: {
1233
- "1": {
1234
- name: "punctuation.definition.string.end.fsharp"
1235
- }
1236
- },
1237
- patterns: [
1238
- {
1239
- include: "#string_formatter"
1240
- }
1241
- ]
1242
- },
1243
- {
1244
- name: "string.quoted.double.fsharp",
1245
- begin: "(?=[^\\\\])(\")",
1246
- end: "(\")",
1247
- beginCaptures: {
1248
- "1": {
1249
- name: "punctuation.definition.string.begin.fsharp"
1250
- }
1251
- },
1252
- endCaptures: {
1253
- "1": {
1254
- name: "punctuation.definition.string.end.fsharp"
1255
- }
1256
- },
1257
- patterns: [
1258
- {
1259
- name: "punctuation.separator.string.ignore-eol.fsharp",
1260
- match: "\\\\$[ \\t]*"
1261
- },
1262
- {
1263
- name: "constant.character.string.escape.fsharp",
1264
- match: "\\\\([\\\\''ntbr]|x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8})"
1265
- },
1266
- {
1267
- name: "invalid.illeagal.character.string.fsharp",
1268
- match: "\\\\(?![\\\\''ntbr]|x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8})."
1269
- },
1270
- {
1271
- include: "#string_formatter"
1272
- }
1273
- ]
1274
- }
1275
- ]
1276
- },
1277
- string_formatter: {
1278
- patterns: [
1279
- {
1280
- name: "entity.name.type.format.specifier.fsharp",
1281
- match: "(%0?-?(\\d+)?((a|t)|(\\.\\d+)?(f|F|e|E|g|G|M)|(b|c|s|d|i|x|X|o|u)|(s|b|O)|(\\+?A)))",
1282
- captures: {
1283
- "1": {
1284
- name: "keyword.format.specifier.fsharp"
1285
- }
1286
- }
1287
- }
1288
- ]
1289
- },
1290
- variables: {
1291
- patterns: [
1292
- {
1293
- name: "constant.language.unit.fsharp",
1294
- match: "\\(\\)"
1295
- },
1296
- {
1297
- match: "(\\?{0,1})(``[[:alpha:]0-9'`^:,._ ]+``|(?!private\\b)\\b[\\w[:alpha:]0-9'`<>^._ ]+)",
1298
- captures: {
1299
- "1": {
1300
- name: "keyword.symbol.fsharp"
1301
- },
1302
- "2": {
1303
- name: "variable.parameter.fsharp"
1304
- }
1305
- }
1306
- }
1307
- ]
1308
- },
1309
- common_declaration: {
1310
- patterns: [
1311
- {
1312
- begin: "\\s*(->)\\s*([[:alpha:]0-9'`^._ ]+)(<)",
1313
- end: "(>)",
1314
- beginCaptures: {
1315
- "1": {
1316
- name: "keyword.symbol.fsharp"
1317
- },
1318
- "2": {
1319
- name: "entity.name.type.fsharp"
1320
- },
1321
- "3": {
1322
- name: "keyword.symbol.fsharp"
1323
- }
1324
- },
1325
- endCaptures: {
1326
- "1": {
1327
- name: "keyword.symbol.fsharp"
1328
- }
1329
- },
1330
- patterns: [
1331
- {
1332
- match: "([[:alpha:]0-9'`^._ ]+)",
1333
- captures: {
1334
- "1": {
1335
- name: "entity.name.type.fsharp"
1336
- }
1337
- }
1338
- },
1339
- {
1340
- include: "#keywords"
1341
- }
1342
- ]
1343
- },
1344
- {
1345
- match: "\\s*(->)\\s*(?!with|get|set\\b)\\b([\\w0-9'`^._]+)",
1346
- captures: {
1347
- "1": {
1348
- name: "keyword.symbol.fsharp"
1349
- },
1350
- "2": {
1351
- name: "entity.name.type.fsharp"
1352
- }
1353
- }
1354
- },
1355
- {
1356
- include: "#anonymous_record_declaration"
1357
- },
1358
- {
1359
- begin: "(\\?{0,1})([[:alpha:]0-9'`^._ ]+)\\s*(:)(\\s*([?[:alpha:]0-9'`^._ ]+)(<))",
1360
- end: "(>)",
1361
- beginCaptures: {
1362
- "1": {
1363
- name: "keyword.symbol.fsharp"
1364
- },
1365
- "2": {
1366
- name: "variable.parameter.fsharp"
1367
- },
1368
- "3": {
1369
- name: "keyword.symbol.fsharp"
1370
- },
1371
- "4": {
1372
- name: "keyword.symbol.fsharp"
1373
- },
1374
- "5": {
1375
- name: "entity.name.type.fsharp"
1376
- }
1377
- },
1378
- endCaptures: {
1379
- "1": {
1380
- name: "keyword.symbol.fsharp"
1381
- }
1382
- },
1383
- patterns: [
1384
- {
1385
- match: "([[:alpha:]0-9'`^._ ]+)",
1386
- captures: {
1387
- "1": {
1388
- name: "entity.name.type.fsharp"
1389
- }
1390
- }
1391
- },
1392
- {
1393
- include: "#keywords"
1394
- }
1395
- ]
1396
- }
1397
- ]
1398
- },
1399
- member_declaration: {
1400
- patterns: [
1401
- {
1402
- include: "#comments"
1403
- },
1404
- {
1405
- include: "#common_declaration"
1406
- },
1407
- {
1408
- comments: "SRTP syntax support",
1409
- begin: "(:)\\s*(\\()\\s*(static member|member)",
1410
- beginCaptures: {
1411
- "1": {
1412
- name: "keyword.symbol.fsharp"
1413
- },
1414
- "2": {
1415
- name: "keyword.symbol.fsharp"
1416
- },
1417
- "3": {
1418
- name: "keyword.fsharp"
1419
- }
1420
- },
1421
- end: "(\\))\\s*((?=,)|(?=\\=))",
1422
- endCaptures: {
1423
- "1": {
1424
- name: "keyword.symbol.fsharp"
1425
- }
1426
- },
1427
- patterns: [
1428
- {
1429
- begin: "(\\()",
1430
- beginCaptures: {
1431
- "1": {
1432
- name: "keyword.symbol.fsharp"
1433
- }
1434
- },
1435
- end: "(\\))",
1436
- endCaptures: {
1437
- "1": {
1438
- name: "keyword.symbol.fsharp"
1439
- }
1440
- },
1441
- patterns: [
1442
- {
1443
- include: "#member_declaration"
1444
- }
1445
- ]
1446
- },
1447
- {
1448
- match: "(\\^[[:alpha:]0-9'._]+)",
1449
- captures: {
1450
- "1": {
1451
- name: "entity.name.type.fsharp"
1452
- }
1453
- }
1454
- },
1455
- {
1456
- include: "#variables"
1457
- },
1458
- {
1459
- include: "#keywords"
1460
- }
1461
- ]
1462
- },
1463
- {
1464
- match: "(\\^[[:alpha:]0-9'._]+)",
1465
- captures: {
1466
- "1": {
1467
- name: "entity.name.type.fsharp"
1468
- }
1469
- }
1470
- },
1471
- {
1472
- name: "keyword.fsharp",
1473
- match: "\\b(and|when|or)\\b"
1474
- },
1475
- {
1476
- name: "keyword.symbol.fsharp",
1477
- match: "(\\(|\\))"
1478
- },
1479
- {
1480
- match: "(\\?{0,1})([[:alpha:]0-9'`^._]+|``[[:alpha:]0-9'`^:,._ ]+``)\\s*(:{0,1})(\\s*([?[:alpha:]0-9'`<>._ ]+)){0,1}",
1481
- captures: {
1482
- "1": {
1483
- name: "keyword.symbol.fsharp"
1484
- },
1485
- "2": {
1486
- name: "variable.parameter.fsharp"
1487
- },
1488
- "3": {
1489
- name: "keyword.symbol.fsharp"
1490
- },
1491
- "4": {
1492
- name: "entity.name.type.fsharp"
1493
- }
1494
- }
1495
- },
1496
- {
1497
- include: "#keywords"
1498
- }
1499
- ]
1500
- },
1501
- double_tick: {
1502
- patterns: [
1503
- {
1504
- name: "variable.other.binding.fsharp",
1505
- match: "(``)([^`]*)(``)",
1506
- captures: {
1507
- "1": {
1508
- name: "string.quoted.single.fsharp"
1509
- },
1510
- "2": {
1511
- name: "variable.other.binding.fsharp"
1512
- },
1513
- "3": {
1514
- name: "string.quoted.single.fsharp"
1515
- }
1516
- }
1517
- }
1518
- ]
1519
- },
1520
- records: {
1521
- patterns: [
1522
- {
1523
- name: "record.fsharp",
1524
- begin: "\\b(type)[\\s]+(private|internal|public)?\\s*",
1525
- end: "\\s*((with)|((as)\\s+([[:alpha:]0-9']+))|(=)|[\\n=]|(\\(\\)))",
1526
- beginCaptures: {
1527
- "1": {
1528
- name: "keyword.fsharp"
1529
- },
1530
- "2": {
1531
- name: "storage.modifier.fsharp"
1532
- }
1533
- },
1534
- endCaptures: {
1535
- "2": {
1536
- name: "keyword.fsharp"
1537
- },
1538
- "3": {
1539
- name: "keyword.fsharp"
1540
- },
1541
- "4": {
1542
- name: "keyword.fsharp"
1543
- },
1544
- "5": {
1545
- name: "variable.parameter.fsharp"
1546
- },
1547
- "6": {
1548
- name: "keyword.symbol.fsharp"
1549
- },
1550
- "7": {
1551
- name: "constant.language.unit.fsharp"
1552
- }
1553
- },
1554
- patterns: [
1555
- {
1556
- include: "#comments"
1557
- },
1558
- {
1559
- include: "#attributes"
1560
- },
1561
- {
1562
- match: "([[:alpha:]0-9'^._]+|``[[:alpha:]0-9'`^:,._ ]+``)",
1563
- captures: {
1564
- "1": {
1565
- name: "entity.name.type.fsharp"
1566
- }
1567
- }
1568
- },
1569
- {
1570
- begin: "(<)",
1571
- end: "((?<!:)>)",
1572
- beginCaptures: {
1573
- "1": {
1574
- name: "keyword.fsharp"
1575
- }
1576
- },
1577
- endCaptures: {
1578
- "1": {
1579
- name: "keyword.fsharp"
1580
- }
1581
- },
1582
- patterns: [
1583
- {
1584
- match: "(('|\\^)``[[:alpha:]0-9`^:,._ ]+``|('|\\^)[[:alpha:]0-9`^:._]+)",
1585
- captures: {
1586
- "1": {
1587
- name: "entity.name.type.fsharp"
1588
- }
1589
- }
1590
- },
1591
- {
1592
- name: "keyword.fsharp",
1593
- match: "\\b(interface|with|abstract|and|when|or|not|struct|equality|comparison|unmanaged|delegate|enum)\\b"
1594
- },
1595
- {
1596
- begin: "(\\()",
1597
- end: "(\\))",
1598
- beginCaptures: {
1599
- "1": {
1600
- name: "keyword.symbol.fsharp"
1601
- }
1602
- },
1603
- endCaptures: {
1604
- "1": {
1605
- name: "keyword.symbol.fsharp"
1606
- }
1607
- },
1608
- patterns: [
1609
- {
1610
- match: "(static member|member|new)",
1611
- captures: {
1612
- "1": {
1613
- name: "keyword.fsharp"
1614
- }
1615
- }
1616
- },
1617
- {
1618
- include: "#common_binding_definition"
1619
- }
1620
- ]
1621
- },
1622
- {
1623
- match: "([\\w0-9'`^._]+)",
1624
- comments: "Here we need the \\w modifier in order to check that the words isn't blacklisted",
1625
- captures: {
1626
- "1": {
1627
- name: "entity.name.type.fsharp"
1628
- }
1629
- }
1630
- },
1631
- {
1632
- include: "#keywords"
1633
- }
1634
- ]
1635
- },
1636
- {
1637
- match: "\\s*(private|internal|public)",
1638
- captures: {
1639
- "1": {
1640
- name: "keyword.symbol.fsharp"
1641
- },
1642
- "2": {
1643
- name: "storage.modifier.fsharp"
1644
- }
1645
- }
1646
- },
1647
- {
1648
- begin: "(\\()",
1649
- end: "\\s*(?=(=)|[\\n=]|(\\(\\))|(as))",
1650
- beginCaptures: {
1651
- "1": {
1652
- name: "keyword.symbol.fsharp"
1653
- }
1654
- },
1655
- endCaptures: {
1656
- "1": {
1657
- name: "keyword.symbol.fsharp"
1658
- }
1659
- },
1660
- patterns: [
1661
- {
1662
- include: "#member_declaration"
1663
- }
1664
- ]
1665
- },
1666
- {
1667
- include: "#keywords"
1668
- }
1669
- ]
1670
- }
1671
- ]
1672
- },
1673
- record_declaration: {
1674
- patterns: [
1675
- {
1676
- begin: "(\\{)",
1677
- beginCaptures: {
1678
- "1": {
1679
- name: "keyword.symbol.fsharp"
1680
- }
1681
- },
1682
- end: "(?<=\\})",
1683
- patterns: [
1684
- {
1685
- include: "#comments"
1686
- },
1687
- {
1688
- begin: "(((mutable)\\s[[:alpha:]]+)|[[:alpha:]0-9'`<>^._]*)\\s*((?<!:):(?!:))\\s*",
1689
- beginCaptures: {
1690
- "3": {
1691
- name: "keyword.fsharp"
1692
- },
1693
- "4": {
1694
- name: "keyword.symbol.fsharp"
1695
- }
1696
- },
1697
- end: "$|(;|\\})",
1698
- endCaptures: {
1699
- "1": {
1700
- name: "keyword.symbol.fsharp"
1701
- }
1702
- },
1703
- patterns: [
1704
- {
1705
- include: "#comments"
1706
- },
1707
- {
1708
- match: "([[:alpha:]0-9'`^_ ]+)",
1709
- captures: {
1710
- "1": {
1711
- name: "entity.name.type.fsharp"
1712
- }
1713
- }
1714
- },
1715
- {
1716
- include: "#keywords"
1717
- }
1718
- ]
1719
- },
1720
- {
1721
- include: "#compiler_directives"
1722
- },
1723
- {
1724
- include: "#constants"
1725
- },
1726
- {
1727
- include: "#strings"
1728
- },
1729
- {
1730
- include: "#chars"
1731
- },
1732
- {
1733
- include: "#double_tick"
1734
- },
1735
- {
1736
- include: "#definition"
1737
- },
1738
- {
1739
- include: "#attributes"
1740
- },
1741
- {
1742
- include: "#anonymous_functions"
1743
- },
1744
- {
1745
- include: "#keywords"
1746
- },
1747
- {
1748
- include: "#cexprs"
1749
- },
1750
- {
1751
- include: "#text"
1752
- }
1753
- ]
1754
- }
1755
- ]
1756
- },
1757
- cexprs: {
1758
- patterns: [
1759
- {
1760
- name: "cexpr.fsharp",
1761
- match: "\\b(async|seq|promise|task|maybe|asyncMaybe|controller|scope|application|pipeline)\\s*\\{",
1762
- captures: {
1763
- "0": {
1764
- name: "keyword.fsharp"
1765
- }
1766
- }
1767
- }
1768
- ]
1769
- },
1770
- chars: {
1771
- patterns: [
1772
- {
1773
- name: "char.fsharp",
1774
- match: "('\\\\?.')",
1775
- captures: {
1776
- "1": {
1777
- name: "string.quoted.single.fsharp"
1778
- }
1779
- }
1780
- }
1781
- ]
1782
- },
1783
- text: {
1784
- patterns: [
1785
- {
1786
- name: "text.fsharp",
1787
- match: "\\\\"
1788
- }
1789
- ]
1790
- },
1791
- compiler_directives: {
1792
- patterns: [
1793
- {
1794
- name: "keyword.control.directive.fsharp",
1795
- match: "\\s?(#if|#elif|#elseif|#else|#endif|#light|#nowarn)",
1796
- captures: {
1797
- }
1798
- }
1799
- ]
1800
- }
1801
- };
1802
- var fsharp_tmLanguage = {
1803
- information_for_contributors: information_for_contributors,
1804
- version: version,
1805
- name: name,
1806
- scopeName: scopeName,
1807
- patterns: patterns,
1808
- repository: repository
1809
- };
1810
-
1811
- export { fsharp_tmLanguage as default, information_for_contributors, name, patterns, repository, scopeName, version };