Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/fsharp/syntaxes/fsharp.tmLanguage.json
4772 views
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/0cb968a4b8fdb2e0656b95342cdffbeff04a1248",
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.block.markdown.fsharp",
530
"begin": "^\\s*(\\(\\*\\*(?!\\)))((?!\\*\\)).)*$",
531
"while": "^(?!\\s*(\\*)+\\)\\s*$)",
532
"beginCaptures": {
533
"1": {
534
"name": "comment.block.fsharp"
535
}
536
},
537
"whileCaptures": {
538
"1": {
539
"name": "comment.block.fsharp"
540
}
541
},
542
"patterns": [
543
{
544
"include": "text.html.markdown"
545
}
546
]
547
},
548
{
549
"name": "comment.block.fsharp",
550
"begin": "(\\(\\*(?!\\)))",
551
"end": "(\\*+\\))",
552
"beginCaptures": {
553
"1": {
554
"name": "comment.block.fsharp"
555
}
556
},
557
"endCaptures": {
558
"1": {
559
"name": "comment.block.fsharp"
560
}
561
},
562
"patterns": [
563
{
564
"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",
565
"name": "fast-capture.comment.line.double-slash.fsharp",
566
"match": "//"
567
},
568
{
569
"comments": "Capture (*) when inside of (* *) so that it doesn't prematurely end the comment block.",
570
"name": "fast-capture.comment.line.mul-operator.fsharp",
571
"match": "\\(\\*\\)"
572
},
573
{
574
"include": "#comments"
575
}
576
]
577
},
578
{
579
"name": "comment.block.markdown.fsharp.end",
580
"match": "((?<!\\()(\\*)+\\))",
581
"captures": {
582
"1": {
583
"name": "comment.block.fsharp"
584
}
585
}
586
},
587
{
588
"name": "comment.line.markdown.fsharp",
589
"begin": "(?<![!%&+-.<=>?@^|/])///(?!/)",
590
"while": "(?<![!%&+-.<=>?@^|/])///(?!/)",
591
"patterns": [
592
{
593
"include": "text.html.markdown"
594
}
595
]
596
},
597
{
598
"name": "comment.line.double-slash.fsharp",
599
"match": "(?<![!%&+-.<=>?@^|/])//(.*$)"
600
}
601
]
602
},
603
"constants": {
604
"patterns": [
605
{
606
"name": "keyword.symbol.fsharp",
607
"match": "\\(\\)"
608
},
609
{
610
"name": "constant.numeric.float.fsharp",
611
"match": "\\b-?[0-9][0-9_]*((\\.(?!\\.)([0-9][0-9_]*([eE][+-]??[0-9][0-9_]*)?)?)|([eE][+-]??[0-9][0-9_]*))"
612
},
613
{
614
"name": "constant.numeric.integer.nativeint.fsharp",
615
"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_]*)))"
616
},
617
{
618
"name": "constant.language.boolean.fsharp",
619
"match": "\\b(true|false)\\b"
620
},
621
{
622
"name": "constant.other.fsharp",
623
"match": "\\b(null|void)\\b"
624
}
625
]
626
},
627
"abstract_definition": {
628
"name": "abstract.definition.fsharp",
629
"begin": "\\b(static\\s+)?(abstract)\\s+(member)?(\\s+\\[\\<.*\\>\\])?\\s*([_[:alpha:]0-9,\\._`\\s]+)(<)?",
630
"end": "\\s*(with)\\b|=|$",
631
"beginCaptures": {
632
"1": {
633
"name": "keyword.fsharp"
634
},
635
"2": {
636
"name": "keyword.fsharp"
637
},
638
"3": {
639
"name": "keyword.fsharp"
640
},
641
"4": {
642
"name": "support.function.attribute.fsharp"
643
},
644
"5": {
645
"name": "keyword.symbol.fsharp"
646
}
647
},
648
"endCaptures": {
649
"1": {
650
"name": "keyword.fsharp"
651
}
652
},
653
"patterns": [
654
{
655
"include": "#comments"
656
},
657
{
658
"include": "#common_declaration"
659
},
660
{
661
"match": "(\\?{0,1})([[:alpha:]0-9'`^._ ]+)\\s*(:)((?!with\\b)\\b([\\w0-9'`^._ ]+)){0,1}",
662
"captures": {
663
"1": {
664
"name": "keyword.symbol.fsharp"
665
},
666
"2": {
667
"name": "variable.parameter.fsharp"
668
},
669
"3": {
670
"name": "keyword.symbol.fsharp"
671
},
672
"4": {
673
"name": "entity.name.type.fsharp"
674
}
675
}
676
},
677
{
678
"match": "(?!with|get|set\\b)\\s*([\\w0-9'`^._]+)",
679
"comments": "Here we need the \\w modifier in order to check that the words isn't blacklisted",
680
"captures": {
681
"1": {
682
"name": "entity.name.type.fsharp"
683
}
684
}
685
},
686
{
687
"include": "#keywords"
688
}
689
]
690
},
691
"common_binding_definition": {
692
"patterns": [
693
{
694
"include": "#comments"
695
},
696
{
697
"include": "#attributes"
698
},
699
{
700
"comments": "SRTP syntax support",
701
"begin": "(:)\\s*(\\()\\s*(static member|member)",
702
"beginCaptures": {
703
"1": {
704
"name": "keyword.symbol.fsharp"
705
},
706
"2": {
707
"name": "keyword.symbol.fsharp"
708
},
709
"3": {
710
"name": "keyword.fsharp"
711
}
712
},
713
"end": "(\\))\\s*((?=,)|(?=\\=))",
714
"endCaptures": {
715
"1": {
716
"name": "keyword.symbol.fsharp"
717
}
718
},
719
"patterns": [
720
{
721
"match": "(\\^[[:alpha:]0-9'._]+)",
722
"captures": {
723
"1": {
724
"name": "entity.name.type.fsharp"
725
}
726
}
727
},
728
{
729
"include": "#variables"
730
},
731
{
732
"include": "#keywords"
733
}
734
]
735
},
736
{
737
"begin": "(:)\\s*(\\()",
738
"beginCaptures": {
739
"1": {
740
"name": "keyword.symbol.fsharp"
741
},
742
"2": {
743
"name": "keyword.symbol.fsharp"
744
}
745
},
746
"end": "(\\)\\s*(([?[:alpha:]0-9'`^._ ]*)))",
747
"endCaptures": {
748
"1": {
749
"name": "keyword.symbol.fsharp"
750
},
751
"2": {
752
"name": "entity.name.type.fsharp"
753
}
754
},
755
"patterns": [
756
{
757
"include": "#tuple_signature"
758
}
759
]
760
},
761
{
762
"begin": "(:)\\s*(\\^[[:alpha:]0-9'._]+)\\s*(when)",
763
"beginCaptures": {
764
"1": {
765
"name": "keyword.symbol.fsharp"
766
},
767
"2": {
768
"name": "entity.name.type.fsharp"
769
},
770
"3": {
771
"name": "keyword.fsharp"
772
}
773
},
774
"end": "(?=:)",
775
"endCaptures": {
776
"1": {
777
"name": "keyword.symbol.fsharp"
778
}
779
},
780
"patterns": [
781
{
782
"name": "keyword.fsharp",
783
"match": "\\b(and|when|or)\\b"
784
},
785
{
786
"comment": "Because we first capture the keywords, we can capture what looks like a word and assume it's an entity definition",
787
"match": "([[:alpha:]0-9'^._]+)",
788
"captures": {
789
"1": {
790
"name": "entity.name.type.fsharp"
791
}
792
}
793
},
794
{
795
"name": "keyword.symbol.fsharp",
796
"match": "(\\(|\\))"
797
}
798
]
799
},
800
{
801
"match": "(:)\\s*([?[:alpha:]0-9'`^._ ]+)(\\|\\s*(null))?",
802
"captures": {
803
"1": {
804
"name": "keyword.symbol.fsharp"
805
},
806
"2": {
807
"name": "entity.name.type.fsharp"
808
},
809
"4": {
810
"name": "entity.name.type.fsharp"
811
}
812
}
813
},
814
{
815
"match": "(->)\\s*(\\()?\\s*([?[:alpha:]0-9'`^._ ]+)*",
816
"captures": {
817
"1": {
818
"name": "keyword.symbol.arrow.fsharp"
819
},
820
"2": {
821
"name": "keyword.symbol.fsharp"
822
},
823
"3": {
824
"name": "entity.name.type.fsharp"
825
}
826
}
827
},
828
{
829
"begin": "(\\*)\\s*(\\()",
830
"beginCaptures": {
831
"1": {
832
"name": "keyword.symbol.fsharp"
833
},
834
"2": {
835
"name": "keyword.symbol.fsharp"
836
}
837
},
838
"end": "(\\)\\s*(([?[:alpha:]0-9'`^._ ]+))*)",
839
"endCaptures": {
840
"1": {
841
"name": "keyword.symbol.fsharp"
842
},
843
"2": {
844
"name": "entity.name.type.fsharp"
845
}
846
},
847
"patterns": [
848
{
849
"include": "#tuple_signature"
850
}
851
]
852
},
853
{
854
"begin": "(\\*)(\\s*([?[:alpha:]0-9'`^._ ]+))*",
855
"beginCaptures": {
856
"1": {
857
"name": "keyword.symbol.fsharp"
858
},
859
"2": {
860
"name": "entity.name.type.fsharp"
861
}
862
},
863
"end": "(?==)|(?=\\))",
864
"endCaptures": {
865
"1": {
866
"name": "keyword.symbol.fsharp"
867
}
868
},
869
"patterns": [
870
{
871
"include": "#tuple_signature"
872
}
873
]
874
},
875
{
876
"begin": "(<+(?![[:space:]]*\\)))",
877
"beginComment": "The group (?![[:space:]]*\\) is for protection against overload operator. static member (<)",
878
"end": "((?<!:)>|\\))",
879
"endComment": "The group (?<!:) prevent us from stopping on :> when using SRTP synthax",
880
"beginCaptures": {
881
"1": {
882
"name": "keyword.symbol.fsharp"
883
}
884
},
885
"endCaptures": {
886
"1": {
887
"name": "keyword.symbol.fsharp"
888
}
889
},
890
"patterns": [
891
{
892
"include": "#generic_declaration"
893
}
894
]
895
},
896
{
897
"include": "#anonymous_record_declaration"
898
},
899
{
900
"begin": "({)",
901
"end": "(})",
902
"beginCaptures": {
903
"1": {
904
"name": "keyword.symbol.fsharp"
905
}
906
},
907
"endCaptures": {
908
"1": {
909
"name": "keyword.symbol.fsharp"
910
}
911
},
912
"patterns": [
913
{
914
"include": "#record_signature"
915
}
916
]
917
},
918
{
919
"include": "#definition"
920
},
921
{
922
"include": "#variables"
923
},
924
{
925
"include": "#keywords"
926
}
927
]
928
},
929
"definition": {
930
"patterns": [
931
{
932
"name": "binding.fsharp",
933
"begin": "\\b(let mutable|static let mutable|static let|let inline|let|and inline|and|member val|member inline|static member inline|static member val|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)*)?",
934
"end": "\\s*((with inline|with)\\b|(=|\\n+=|(?<=\\=)))",
935
"beginCaptures": {
936
"1": {
937
"name": "keyword.fsharp"
938
},
939
"2": {
940
"name": "keyword.fsharp"
941
},
942
"3": {
943
"name": "support.function.attribute.fsharp"
944
},
945
"4": {
946
"name": "storage.modifier.fsharp"
947
},
948
"5": {
949
"name": "variable.fsharp"
950
}
951
},
952
"endCaptures": {
953
"2": {
954
"name": "keyword.fsharp"
955
},
956
"3": {
957
"name": "keyword.symbol.fsharp"
958
}
959
},
960
"patterns": [
961
{
962
"include": "#common_binding_definition"
963
}
964
]
965
},
966
{
967
"name": "binding.fsharp",
968
"begin": "\\b(use|use!|and|and!)\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9\\._`\\s]+|(?<=,)\\s)*)?",
969
"end": "\\s*(=)",
970
"beginCaptures": {
971
"1": {
972
"name": "keyword.fsharp"
973
}
974
},
975
"endCaptures": {
976
"1": {
977
"name": "keyword.symbol.fsharp"
978
}
979
},
980
"patterns": [
981
{
982
"include": "#common_binding_definition"
983
}
984
]
985
},
986
{
987
"name": "binding.fsharp",
988
"begin": "(?<=with|and)\\s*\\b((get|set)\\s*(?=\\())(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9\\._`\\s]+|(?<=,)\\s)*)?",
989
"end": "\\s*(=|\\n+=|(?<=\\=))",
990
"beginCaptures": {
991
"4": {
992
"name": "variable.fsharp"
993
}
994
},
995
"endCaptures": {
996
"1": {
997
"name": "keyword.symbol.fsharp"
998
}
999
},
1000
"patterns": [
1001
{
1002
"include": "#common_binding_definition"
1003
}
1004
]
1005
},
1006
{
1007
"name": "binding.fsharp",
1008
"begin": "\\b(static val mutable|val mutable|val inline|val)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9,\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9,\\._`\\s]+|(?<=,)\\s)*)?",
1009
"end": "\\n$",
1010
"beginCaptures": {
1011
"1": {
1012
"name": "keyword.fsharp"
1013
},
1014
"2": {
1015
"name": "keyword.fsharp"
1016
},
1017
"3": {
1018
"name": "support.function.attribute.fsharp"
1019
},
1020
"4": {
1021
"name": "storage.modifier.fsharp"
1022
},
1023
"5": {
1024
"name": "variable.fsharp"
1025
}
1026
},
1027
"patterns": [
1028
{
1029
"include": "#common_binding_definition"
1030
}
1031
]
1032
},
1033
{
1034
"name": "binding.fsharp",
1035
"begin": "\\b(new)\\b\\s+(\\()",
1036
"end": "(\\))",
1037
"beginCaptures": {
1038
"1": {
1039
"name": "keyword.fsharp"
1040
},
1041
"2": {
1042
"name": "keyword.symbol.fsharp"
1043
}
1044
},
1045
"endCaptures": {
1046
"1": {
1047
"name": "keyword.symbol.fsharp"
1048
}
1049
},
1050
"patterns": [
1051
{
1052
"include": "#common_binding_definition"
1053
}
1054
]
1055
}
1056
]
1057
},
1058
"du_declaration": {
1059
"patterns": [
1060
{
1061
"name": "du_declaration.fsharp",
1062
"begin": "\\b(of)\\b",
1063
"end": "$|(\\|)",
1064
"beginCaptures": {
1065
"1": {
1066
"name": "keyword.fsharp"
1067
}
1068
},
1069
"endCaptures": {
1070
"1": {
1071
"name": "keyword.symbol.fsharp"
1072
}
1073
},
1074
"patterns": [
1075
{
1076
"include": "#comments"
1077
},
1078
{
1079
"match": "([[:alpha:]0-9'`<>^._]+|``[[:alpha:]0-9' <>^._]+``)\\s*(:)\\s*([[:alpha:]0-9'`<>^._]+|``[[:alpha:]0-9' <>^._]+``)",
1080
"captures": {
1081
"1": {
1082
"name": "variable.parameter.fsharp"
1083
},
1084
"2": {
1085
"name": "keyword.symbol.fsharp"
1086
},
1087
"3": {
1088
"name": "entity.name.type.fsharp"
1089
}
1090
}
1091
},
1092
{
1093
"match": "(``([[:alpha:]0-9'^._ ]+)``|[[:alpha:]0-9'`^._]+)",
1094
"captures": {
1095
"1": {
1096
"name": "entity.name.type.fsharp"
1097
}
1098
}
1099
},
1100
{
1101
"include": "#anonymous_record_declaration"
1102
},
1103
{
1104
"include": "#keywords"
1105
}
1106
]
1107
}
1108
]
1109
},
1110
"keywords": {
1111
"patterns": [
1112
{
1113
"name": "storage.modifier",
1114
"match": "\\b(private|public|internal)\\b"
1115
},
1116
{
1117
"name": "keyword.fsharp",
1118
"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"
1119
},
1120
{
1121
"name": "keyword.control",
1122
"match": "\\b(match|yield|yield!|with|if|then|else|elif|for|in|return!|return|try|finally|while|do)(?!')\\b"
1123
},
1124
{
1125
"name": "keyword.symbol.arrow.fsharp",
1126
"match": "(\\->|\\<\\-)"
1127
},
1128
{
1129
"name": "keyword.symbol.fsharp",
1130
"match": "[.?]*(&&&|\\|\\|\\||\\^\\^\\^|~~~|~\\+|~\\-|<<<|>>>|\\|>|:>|:\\?>|:|\\[|\\]|\\;|<>|=|@|\\|\\||&&|&|%|{|}|\\||_|\\.\\.|\\,|\\+|\\-|\\*|\\/|\\^|\\!|\\>|\\>\\=|\\>\\>|\\<|\\<\\=|\\(|\\)|\\<\\<)[.?]*"
1131
}
1132
]
1133
},
1134
"modules": {
1135
"patterns": [
1136
{
1137
"name": "entity.name.section.fsharp",
1138
"begin": "\\b(namespace global)|\\b(namespace|module)\\s*(public|internal|private|rec)?\\s+([[:alpha:]|``][[:alpha:]0-9'_. ]*)",
1139
"end": "(\\s?=|\\s|$)",
1140
"beginCaptures": {
1141
"1": {
1142
"name": "keyword.fsharp"
1143
},
1144
"2": {
1145
"name": "keyword.fsharp"
1146
},
1147
"3": {
1148
"name": "storage.modifier.fsharp"
1149
},
1150
"4": {
1151
"name": "entity.name.section.fsharp"
1152
}
1153
},
1154
"endCaptures": {
1155
"1": {
1156
"name": "keyword.symbol.fsharp"
1157
}
1158
},
1159
"patterns": [
1160
{
1161
"name": "entity.name.section.fsharp",
1162
"match": "(\\.)([A-Z][[:alpha:]0-9'_]*)",
1163
"captures": {
1164
"1": {
1165
"name": "punctuation.separator.namespace-reference.fsharp"
1166
},
1167
"2": {
1168
"name": "entity.name.section.fsharp"
1169
}
1170
}
1171
}
1172
]
1173
},
1174
{
1175
"name": "namespace.open.fsharp",
1176
"begin": "\\b(open type|open)\\s+([[:alpha:]|``][[:alpha:]0-9'_]*)(?=(\\.[A-Z][[:alpha:]0-9_]*)*)",
1177
"end": "(\\s|$)",
1178
"beginCaptures": {
1179
"1": {
1180
"name": "keyword.fsharp"
1181
},
1182
"2": {
1183
"name": "entity.name.section.fsharp"
1184
}
1185
},
1186
"patterns": [
1187
{
1188
"name": "entity.name.section.fsharp",
1189
"match": "(\\.)([[:alpha:]][[:alpha:]0-9'_]*)",
1190
"captures": {
1191
"1": {
1192
"name": "punctuation.separator.namespace-reference.fsharp"
1193
},
1194
"2": {
1195
"name": "entity.name.section.fsharp"
1196
}
1197
}
1198
},
1199
{
1200
"include": "#comments"
1201
}
1202
]
1203
},
1204
{
1205
"name": "namespace.alias.fsharp",
1206
"begin": "^\\s*(module)\\s+([A-Z][[:alpha:]0-9'_]*)\\s*(=)\\s*([A-Z][[:alpha:]0-9'_]*)",
1207
"end": "(\\s|$)",
1208
"beginCaptures": {
1209
"1": {
1210
"name": "keyword.fsharp"
1211
},
1212
"2": {
1213
"name": "entity.name.type.namespace.fsharp"
1214
},
1215
"3": {
1216
"name": "keyword.symbol.fsharp"
1217
},
1218
"4": {
1219
"name": "entity.name.section.fsharp"
1220
}
1221
},
1222
"patterns": [
1223
{
1224
"name": "entity.name.section.fsharp",
1225
"match": "(\\.)([A-Z][[:alpha:]0-9'_]*)",
1226
"captures": {
1227
"1": {
1228
"name": "punctuation.separator.namespace-reference.fsharp"
1229
},
1230
"2": {
1231
"name": "entity.name.section.fsharp"
1232
}
1233
}
1234
}
1235
]
1236
}
1237
]
1238
},
1239
"strings": {
1240
"patterns": [
1241
{
1242
"name": "string.quoted.literal.fsharp",
1243
"begin": "(?=[^\\\\])(@\")",
1244
"end": "(\")(?!\")",
1245
"beginCaptures": {
1246
"1": {
1247
"name": "punctuation.definition.string.begin.fsharp"
1248
}
1249
},
1250
"endCaptures": {
1251
"1": {
1252
"name": "punctuation.definition.string.end.fsharp"
1253
}
1254
},
1255
"patterns": [
1256
{
1257
"name": "constant.character.string.escape.fsharp",
1258
"match": "\"(\")"
1259
}
1260
]
1261
},
1262
{
1263
"name": "string.quoted.triple.fsharp",
1264
"begin": "(?=[^\\\\])(\"\"\")",
1265
"end": "(\"\"\")",
1266
"beginCaptures": {
1267
"1": {
1268
"name": "punctuation.definition.string.begin.fsharp"
1269
}
1270
},
1271
"endCaptures": {
1272
"1": {
1273
"name": "punctuation.definition.string.end.fsharp"
1274
}
1275
},
1276
"patterns": [
1277
{
1278
"include": "#string_formatter"
1279
}
1280
]
1281
},
1282
{
1283
"name": "string.quoted.double.fsharp",
1284
"begin": "(?=[^\\\\])(\")",
1285
"end": "(\")",
1286
"beginCaptures": {
1287
"1": {
1288
"name": "punctuation.definition.string.begin.fsharp"
1289
}
1290
},
1291
"endCaptures": {
1292
"1": {
1293
"name": "punctuation.definition.string.end.fsharp"
1294
}
1295
},
1296
"patterns": [
1297
{
1298
"name": "punctuation.separator.string.ignore-eol.fsharp",
1299
"match": "\\\\$[ \\t]*"
1300
},
1301
{
1302
"name": "constant.character.string.escape.fsharp",
1303
"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}))"
1304
},
1305
{
1306
"name": "invalid.illegal.character.string.fsharp",
1307
"match": "\\\\(([0-9]{1,3})|(x[^\\s]{0,2})|(u[^\\s]{0,4})|(U[^\\s]{0,8})|[^\\s])"
1308
},
1309
{
1310
"include": "#string_formatter"
1311
}
1312
]
1313
}
1314
]
1315
},
1316
"string_formatter": {
1317
"patterns": [
1318
{
1319
"name": "entity.name.type.format.specifier.fsharp",
1320
"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)))",
1321
"captures": {
1322
"1": {
1323
"name": "keyword.format.specifier.fsharp"
1324
}
1325
}
1326
}
1327
]
1328
},
1329
"variables": {
1330
"patterns": [
1331
{
1332
"name": "keyword.symbol.fsharp",
1333
"match": "\\(\\)"
1334
},
1335
{
1336
"match": "(\\?{0,1})(``[[:alpha:]0-9'`^:,._ ]+``|(?!private|struct\\b)\\b[\\w[:alpha:]0-9'`<>^._ ]+)",
1337
"captures": {
1338
"1": {
1339
"name": "keyword.symbol.fsharp"
1340
},
1341
"2": {
1342
"name": "variable.parameter.fsharp"
1343
}
1344
}
1345
}
1346
]
1347
},
1348
"common_declaration": {
1349
"patterns": [
1350
{
1351
"begin": "\\s*(->)\\s*([[:alpha:]0-9'`^._ ]+)(<)",
1352
"end": "(>)",
1353
"beginCaptures": {
1354
"1": {
1355
"name": "keyword.symbol.arrow.fsharp"
1356
},
1357
"2": {
1358
"name": "entity.name.type.fsharp"
1359
},
1360
"3": {
1361
"name": "keyword.symbol.fsharp"
1362
}
1363
},
1364
"endCaptures": {
1365
"1": {
1366
"name": "keyword.symbol.fsharp"
1367
}
1368
},
1369
"patterns": [
1370
{
1371
"match": "([[:alpha:]0-9'`^._ ]+)",
1372
"captures": {
1373
"1": {
1374
"name": "entity.name.type.fsharp"
1375
}
1376
}
1377
},
1378
{
1379
"include": "#keywords"
1380
}
1381
]
1382
},
1383
{
1384
"match": "\\s*(->)\\s*(?!with|get|set\\b)\\b([\\w0-9'`^._]+)",
1385
"captures": {
1386
"1": {
1387
"name": "keyword.symbol.arrow.fsharp"
1388
},
1389
"2": {
1390
"name": "entity.name.type.fsharp"
1391
}
1392
}
1393
},
1394
{
1395
"include": "#anonymous_record_declaration"
1396
},
1397
{
1398
"begin": "(\\?{0,1})([[:alpha:]0-9'`^._ ]+)\\s*(:)(\\s*([?[:alpha:]0-9'`^._ ]+)(<))",
1399
"end": "(>)",
1400
"beginCaptures": {
1401
"1": {
1402
"name": "keyword.symbol.fsharp"
1403
},
1404
"2": {
1405
"name": "variable.parameter.fsharp"
1406
},
1407
"3": {
1408
"name": "keyword.symbol.fsharp"
1409
},
1410
"4": {
1411
"name": "keyword.symbol.fsharp"
1412
},
1413
"5": {
1414
"name": "entity.name.type.fsharp"
1415
}
1416
},
1417
"endCaptures": {
1418
"1": {
1419
"name": "keyword.symbol.fsharp"
1420
}
1421
},
1422
"patterns": [
1423
{
1424
"match": "([[:alpha:]0-9'`^._ ]+)",
1425
"captures": {
1426
"1": {
1427
"name": "entity.name.type.fsharp"
1428
}
1429
}
1430
},
1431
{
1432
"include": "#keywords"
1433
}
1434
]
1435
}
1436
]
1437
},
1438
"member_declaration": {
1439
"patterns": [
1440
{
1441
"include": "#comments"
1442
},
1443
{
1444
"include": "#common_declaration"
1445
},
1446
{
1447
"comments": "SRTP syntax support",
1448
"begin": "(:)\\s*(\\()\\s*(static member|member)",
1449
"beginCaptures": {
1450
"1": {
1451
"name": "keyword.symbol.fsharp"
1452
},
1453
"2": {
1454
"name": "keyword.symbol.fsharp"
1455
},
1456
"3": {
1457
"name": "keyword.fsharp"
1458
}
1459
},
1460
"end": "(\\))\\s*((?=,)|(?=\\=))",
1461
"endCaptures": {
1462
"1": {
1463
"name": "keyword.symbol.fsharp"
1464
}
1465
},
1466
"patterns": [
1467
{
1468
"begin": "(\\()",
1469
"beginCaptures": {
1470
"1": {
1471
"name": "keyword.symbol.fsharp"
1472
}
1473
},
1474
"end": "(\\))",
1475
"endCaptures": {
1476
"1": {
1477
"name": "keyword.symbol.fsharp"
1478
}
1479
},
1480
"patterns": [
1481
{
1482
"include": "#member_declaration"
1483
}
1484
]
1485
},
1486
{
1487
"match": "(\\^[[:alpha:]0-9'._]+)",
1488
"captures": {
1489
"1": {
1490
"name": "entity.name.type.fsharp"
1491
}
1492
}
1493
},
1494
{
1495
"include": "#variables"
1496
},
1497
{
1498
"include": "#keywords"
1499
}
1500
]
1501
},
1502
{
1503
"match": "(\\^[[:alpha:]0-9'._]+)",
1504
"captures": {
1505
"1": {
1506
"name": "entity.name.type.fsharp"
1507
}
1508
}
1509
},
1510
{
1511
"name": "keyword.fsharp",
1512
"match": "\\b(and|when|or)\\b"
1513
},
1514
{
1515
"name": "keyword.symbol.fsharp",
1516
"match": "(\\(|\\))"
1517
},
1518
{
1519
"match": "(\\?{0,1})([[:alpha:]0-9'`^._]+|``[[:alpha:]0-9'`^:,._ ]+``)\\s*(:{0,1})(\\s*([?[:alpha:]0-9'`<>._ ]+)){0,1}(\\|\\s*(null))?",
1520
"captures": {
1521
"1": {
1522
"name": "keyword.symbol.fsharp"
1523
},
1524
"2": {
1525
"name": "variable.parameter.fsharp"
1526
},
1527
"3": {
1528
"name": "keyword.symbol.fsharp"
1529
},
1530
"4": {
1531
"name": "entity.name.type.fsharp"
1532
},
1533
"7": {
1534
"name": "entity.name.type.fsharp"
1535
}
1536
}
1537
},
1538
{
1539
"include": "#keywords"
1540
}
1541
]
1542
},
1543
"double_tick": {
1544
"patterns": [
1545
{
1546
"name": "variable.other.binding.fsharp",
1547
"match": "(``)([^`]*)(``)",
1548
"captures": {
1549
"1": {
1550
"name": "string.quoted.single.fsharp"
1551
},
1552
"2": {
1553
"name": "variable.other.binding.fsharp"
1554
},
1555
"3": {
1556
"name": "string.quoted.single.fsharp"
1557
}
1558
}
1559
}
1560
]
1561
},
1562
"records": {
1563
"patterns": [
1564
{
1565
"name": "record.fsharp",
1566
"begin": "\\b(type)[\\s]+(private|internal|public)?\\s*",
1567
"end": "\\s*((with)|((as)\\s+([[:alpha:]0-9']+))|(=)|[\\n=]|(\\(\\)))",
1568
"beginCaptures": {
1569
"1": {
1570
"name": "keyword.fsharp"
1571
},
1572
"2": {
1573
"name": "storage.modifier.fsharp"
1574
}
1575
},
1576
"endCaptures": {
1577
"2": {
1578
"name": "keyword.fsharp"
1579
},
1580
"3": {
1581
"name": "keyword.fsharp"
1582
},
1583
"4": {
1584
"name": "keyword.fsharp"
1585
},
1586
"5": {
1587
"name": "variable.parameter.fsharp"
1588
},
1589
"6": {
1590
"name": "keyword.symbol.fsharp"
1591
},
1592
"7": {
1593
"name": "keyword.symbol.fsharp"
1594
}
1595
},
1596
"patterns": [
1597
{
1598
"include": "#comments"
1599
},
1600
{
1601
"include": "#attributes"
1602
},
1603
{
1604
"match": "([[:alpha:]0-9'^._]+|``[[:alpha:]0-9'`^:,._ ]+``)",
1605
"captures": {
1606
"1": {
1607
"name": "entity.name.type.fsharp"
1608
}
1609
}
1610
},
1611
{
1612
"begin": "(<)",
1613
"end": "((?<!:)>)",
1614
"beginCaptures": {
1615
"1": {
1616
"name": "keyword.symbol.fsharp"
1617
}
1618
},
1619
"endCaptures": {
1620
"1": {
1621
"name": "keyword.symbol.fsharp"
1622
}
1623
},
1624
"patterns": [
1625
{
1626
"match": "(('|\\^)``[[:alpha:]0-9`^:,._ ]+``|('|\\^)[[:alpha:]0-9`^:._]+)",
1627
"captures": {
1628
"1": {
1629
"name": "entity.name.type.fsharp"
1630
}
1631
}
1632
},
1633
{
1634
"name": "keyword.fsharp",
1635
"match": "\\b(interface|with|abstract|and|when|or|not|struct|equality|comparison|unmanaged|delegate|enum)\\b"
1636
},
1637
{
1638
"begin": "(\\()",
1639
"end": "(\\))",
1640
"beginCaptures": {
1641
"1": {
1642
"name": "keyword.symbol.fsharp"
1643
}
1644
},
1645
"endCaptures": {
1646
"1": {
1647
"name": "keyword.symbol.fsharp"
1648
}
1649
},
1650
"patterns": [
1651
{
1652
"match": "(static member|member|new)",
1653
"captures": {
1654
"1": {
1655
"name": "keyword.fsharp"
1656
}
1657
}
1658
},
1659
{
1660
"include": "#common_binding_definition"
1661
}
1662
]
1663
},
1664
{
1665
"match": "([\\w0-9'`^._]+)",
1666
"comments": "Here we need the \\w modifier in order to check that the words isn't blacklisted",
1667
"captures": {
1668
"1": {
1669
"name": "entity.name.type.fsharp"
1670
}
1671
}
1672
},
1673
{
1674
"include": "#keywords"
1675
}
1676
]
1677
},
1678
{
1679
"match": "\\s*(private|internal|public)",
1680
"captures": {
1681
"1": {
1682
"name": "storage.modifier.fsharp"
1683
}
1684
}
1685
},
1686
{
1687
"begin": "(\\()",
1688
"end": "\\s*(?=(=)|[\\n=]|(\\(\\))|(as))",
1689
"beginCaptures": {
1690
"1": {
1691
"name": "keyword.symbol.fsharp"
1692
}
1693
},
1694
"endCaptures": {
1695
"1": {
1696
"name": "keyword.symbol.fsharp"
1697
}
1698
},
1699
"patterns": [
1700
{
1701
"include": "#member_declaration"
1702
}
1703
]
1704
},
1705
{
1706
"include": "#keywords"
1707
}
1708
]
1709
}
1710
]
1711
},
1712
"record_declaration": {
1713
"patterns": [
1714
{
1715
"begin": "(\\{)",
1716
"beginCaptures": {
1717
"1": {
1718
"name": "keyword.symbol.fsharp"
1719
}
1720
},
1721
"end": "(?<=\\})",
1722
"patterns": [
1723
{
1724
"include": "#comments"
1725
},
1726
{
1727
"begin": "(((mutable)\\s[[:alpha:]]+)|[[:alpha:]0-9'`<>^._]*)\\s*((?<!:):(?!:))\\s*",
1728
"beginCaptures": {
1729
"3": {
1730
"name": "keyword.fsharp"
1731
},
1732
"4": {
1733
"name": "keyword.symbol.fsharp"
1734
}
1735
},
1736
"end": "$|(;|\\})",
1737
"endCaptures": {
1738
"1": {
1739
"name": "keyword.symbol.fsharp"
1740
}
1741
},
1742
"patterns": [
1743
{
1744
"include": "#comments"
1745
},
1746
{
1747
"match": "([[:alpha:]0-9'`^_ ]+)",
1748
"captures": {
1749
"1": {
1750
"name": "entity.name.type.fsharp"
1751
}
1752
}
1753
},
1754
{
1755
"include": "#keywords"
1756
}
1757
]
1758
},
1759
{
1760
"include": "#compiler_directives"
1761
},
1762
{
1763
"include": "#constants"
1764
},
1765
{
1766
"include": "#strings"
1767
},
1768
{
1769
"include": "#chars"
1770
},
1771
{
1772
"include": "#double_tick"
1773
},
1774
{
1775
"include": "#definition"
1776
},
1777
{
1778
"include": "#attributes"
1779
},
1780
{
1781
"include": "#anonymous_functions"
1782
},
1783
{
1784
"include": "#keywords"
1785
},
1786
{
1787
"include": "#cexprs"
1788
},
1789
{
1790
"include": "#text"
1791
}
1792
]
1793
}
1794
]
1795
},
1796
"cexprs": {
1797
"patterns": [
1798
{
1799
"name": "cexpr.fsharp",
1800
"match": "\\b(async|seq|promise|task|maybe|asyncMaybe|controller|scope|application|pipeline)(?=\\s*\\{)",
1801
"captures": {
1802
"0": {
1803
"name": "keyword.fsharp"
1804
}
1805
}
1806
}
1807
]
1808
},
1809
"chars": {
1810
"patterns": [
1811
{
1812
"name": "char.fsharp",
1813
"match": "('\\\\?.')",
1814
"captures": {
1815
"1": {
1816
"name": "string.quoted.single.fsharp"
1817
}
1818
}
1819
}
1820
]
1821
},
1822
"text": {
1823
"patterns": [
1824
{
1825
"name": "text.fsharp",
1826
"match": "\\\\"
1827
}
1828
]
1829
},
1830
"compiler_directives": {
1831
"patterns": [
1832
{
1833
"name": "keyword.control.directive.fsharp",
1834
"match": "\\s?(#if|#elif|#elseif|#else|#endif|#light|#nowarn|#warnon)",
1835
"captures": {}
1836
}
1837
]
1838
}
1839
}
1840
}
1841