@codingame/monaco-vscode-fsharp-default-extension 1.85.2 → 1.85.4

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