[OCaml] Mobile-friendly clone of cgit.
1
{
2
"comment":"The recognition of function definitions and compiler directives (such as module, record and macro definitions) requires that each of the aforementioned constructs must be the first string inside a line (except for whitespace). Also, the function/module/record/macro names must be given unquoted. -- desp",
3
"fileTypes":[
4
"erl",
5
"escript",
6
"hrl",
7
"xrl",
8
"yrl"
9
],
10
"keyEquivalent":"^~E",
11
"name":"Erlang",
12
"patterns":[
13
{
14
"include":"#module-directive"
15
},
16
{
17
"include":"#import-export-directive"
18
},
19
{
20
"include":"#behaviour-directive"
21
},
22
{
23
"include":"#record-directive"
24
},
25
{
26
"include":"#define-directive"
27
},
28
{
29
"include":"#macro-directive"
30
},
31
{
32
"include":"#doc-directive"
33
},
34
{
35
"include":"#directive"
36
},
37
{
38
"include":"#function"
39
},
40
{
41
"include":"#everything-else"
42
}
43
],
44
"repository":{
45
"atom":{
46
"patterns":[
47
{
48
"begin":"(')",
49
"beginCaptures":{
50
"1":{
51
"name":"punctuation.definition.symbol.begin.erlang"
52
}
53
},
54
"end":"(')",
55
"endCaptures":{
56
"1":{
57
"name":"punctuation.definition.symbol.end.erlang"
58
}
59
},
60
"name":"constant.other.symbol.quoted.single.erlang",
61
"patterns":[
62
{
63
"captures":{
64
"1":{
65
"name":"punctuation.definition.escape.erlang"
66
},
67
"3":{
68
"name":"punctuation.definition.escape.erlang"
69
}
70
},
71
"match":"(\\\\)([bdefnrstv\\\\'\"]|(\\^)[@-_a-z]|[0-7]{1,3}|x[\\da-fA-F]{2})",
72
"name":"constant.other.symbol.escape.erlang"
73
},
74
{
75
"match":"\\\\\\^?.?",
76
"name":"invalid.illegal.atom.erlang"
77
}
78
]
79
},
80
{
81
"match":"[a-z][a-zA-Z\\d@_]*+",
82
"name":"constant.other.symbol.unquoted.erlang"
83
}
84
]
85
},
86
"behaviour-directive":{
87
"captures":{
88
"1":{
89
"name":"punctuation.section.directive.begin.erlang"
90
},
91
"2":{
92
"name":"keyword.control.directive.behaviour.erlang"
93
},
94
"3":{
95
"name":"punctuation.definition.parameters.begin.erlang"
96
},
97
"4":{
98
"name":"entity.name.type.class.behaviour.definition.erlang"
99
},
100
"5":{
101
"name":"punctuation.definition.parameters.end.erlang"
102
},
103
"6":{
104
"name":"punctuation.section.directive.end.erlang"
105
}
106
},
107
"match":"^\\s*+(-)\\s*+(behaviour)\\s*+(\\()\\s*+([a-z][a-zA-Z\\d@_]*+)\\s*+(\\))\\s*+(\\.)",
108
"name":"meta.directive.behaviour.erlang"
109
},
110
"binary":{
111
"begin":"(<<)",
112
"beginCaptures":{
113
"1":{
114
"name":"punctuation.definition.binary.begin.erlang"
115
}
116
},
117
"end":"(>>)",
118
"endCaptures":{
119
"1":{
120
"name":"punctuation.definition.binary.end.erlang"
121
}
122
},
123
"name":"meta.structure.binary.erlang",
124
"patterns":[
125
{
126
"captures":{
127
"1":{
128
"name":"punctuation.separator.binary.erlang"
129
},
130
"2":{
131
"name":"punctuation.separator.value-size.erlang"
132
}
133
},
134
"match":"(,)|(:)"
135
},
136
{
137
"include":"#internal-type-specifiers"
138
},
139
{
140
"include":"#everything-else"
141
}
142
]
143
},
144
"character":{
145
"patterns":[
146
{
147
"captures":{
148
"1":{
149
"name":"punctuation.definition.character.erlang"
150
},
151
"2":{
152
"name":"constant.character.escape.erlang"
153
},
154
"3":{
155
"name":"punctuation.definition.escape.erlang"
156
},
157
"5":{
158
"name":"punctuation.definition.escape.erlang"
159
}
160
},
161
"match":"(\\$)((\\\\)([bdefnrstv\\\\'\"]|(\\^)[@-_a-z]|[0-7]{1,3}|x[\\da-fA-F]{2}))",
162
"name":"constant.character.erlang"
163
},
164
{
165
"match":"\\$\\\\\\^?.?",
166
"name":"invalid.illegal.character.erlang"
167
},
168
{
169
"captures":{
170
"1":{
171
"name":"punctuation.definition.character.erlang"
172
}
173
},
174
"match":"(\\$)[ \\S]",
175
"name":"constant.character.erlang"
176
},
177
{
178
"match":"\\$.?",
179
"name":"invalid.illegal.character.erlang"
180
}
181
]
182
},
183
"comment":{
184
"begin":"(^[ \\t]+)?(?=%)",
185
"beginCaptures":{
186
"1":{
187
"name":"punctuation.whitespace.comment.leading.erlang"
188
}
189
},
190
"end":"(?!\\G)",
191
"patterns":[
192
{
193
"begin":"%",
194
"beginCaptures":{
195
"0":{
196
"name":"punctuation.definition.comment.erlang"
197
}
198
},
199
"end":"\\n",
200
"name":"comment.line.percentage.erlang"
201
}
202
]
203
},
204
"define-directive":{
205
"patterns":[
206
{
207
"begin":"^\\s*+(-)\\s*+(define)\\s*+(\\()\\s*+([a-zA-Z\\d@_]++)\\s*+",
208
"beginCaptures":{
209
"1":{
210
"name":"punctuation.section.directive.begin.erlang"
211
},
212
"2":{
213
"name":"keyword.control.directive.define.erlang"
214
},
215
"3":{
216
"name":"punctuation.definition.parameters.begin.erlang"
217
},
218
"4":{
219
"name":"entity.name.function.macro.definition.erlang"
220
}
221
},
222
"end":"(\\))\\s*+(\\.)",
223
"endCaptures":{
224
"1":{
225
"name":"punctuation.definition.parameters.end.erlang"
226
},
227
"2":{
228
"name":"punctuation.section.directive.end.erlang"
229
}
230
},
231
"name":"meta.directive.define.erlang",
232
"patterns":[
233
{
234
"include":"#everything-else"
235
}
236
]
237
},
238
{
239
"begin":"(?=^\\s*+-\\s*+define\\s*+\\(\\s*+[a-zA-Z\\d@_]++\\s*+\\()",
240
"end":"(\\))\\s*+(\\.)",
241
"endCaptures":{
242
"1":{
243
"name":"punctuation.definition.parameters.end.erlang"
244
},
245
"2":{
246
"name":"punctuation.section.directive.end.erlang"
247
}
248
},
249
"name":"meta.directive.define.erlang",
250
"patterns":[
251
{
252
"begin":"^\\s*+(-)\\s*+(define)\\s*+(\\()\\s*+([a-zA-Z\\d@_]++)\\s*+(\\()",
253
"beginCaptures":{
254
"1":{
255
"name":"punctuation.section.directive.begin.erlang"
256
},
257
"2":{
258
"name":"keyword.control.directive.define.erlang"
259
},
260
"3":{
261
"name":"punctuation.definition.parameters.begin.erlang"
262
},
263
"4":{
264
"name":"entity.name.function.macro.definition.erlang"
265
},
266
"5":{
267
"name":"punctuation.definition.parameters.begin.erlang"
268
}
269
},
270
"end":"(\\))\\s*(,)",
271
"endCaptures":{
272
"1":{
273
"name":"punctuation.definition.parameters.end.erlang"
274
},
275
"2":{
276
"name":"punctuation.separator.parameters.erlang"
277
}
278
},
279
"patterns":[
280
{
281
"match":",",
282
"name":"punctuation.separator.parameters.erlang"
283
},
284
{
285
"include":"#everything-else"
286
}
287
]
288
},
289
{
290
"match":"\\|\\||\\||:|;|,|\\.|->",
291
"name":"punctuation.separator.define.erlang"
292
},
293
{
294
"include":"#everything-else"
295
}
296
]
297
}
298
]
299
},
300
"directive":{
301
"patterns":[
302
{
303
"begin":"^\\s*+(-)\\s*+([a-z][a-zA-Z\\d@_]*+)\\s*+(\\(?)",
304
"beginCaptures":{
305
"1":{
306
"name":"punctuation.section.directive.begin.erlang"
307
},
308
"2":{
309
"name":"keyword.control.directive.erlang"
310
},
311
"3":{
312
"name":"punctuation.definition.parameters.begin.erlang"
313
}
314
},
315
"end":"(\\)?)\\s*+(\\.)",
316
"endCaptures":{
317
"1":{
318
"name":"punctuation.definition.parameters.end.erlang"
319
},
320
"2":{
321
"name":"punctuation.section.directive.end.erlang"
322
}
323
},
324
"name":"meta.directive.erlang",
325
"patterns":[
326
{
327
"include":"#everything-else"
328
}
329
]
330
},
331
{
332
"captures":{
333
"1":{
334
"name":"punctuation.section.directive.begin.erlang"
335
},
336
"2":{
337
"name":"keyword.control.directive.erlang"
338
},
339
"3":{
340
"name":"punctuation.section.directive.end.erlang"
341
}
342
},
343
"match":"^\\s*+(-)\\s*+([a-z][a-zA-Z\\d@_]*+)\\s*+(\\.)",
344
"name":"meta.directive.erlang"
345
}
346
]
347
},
348
"doc-directive":{
349
"begin":"^\\s*+(-)\\s*+((module)?doc)\\s*([(]\\s*)?(~[bBsS]?)?(([\"]{3,})\\s*)(\\S.*)?$",
350
"beginCaptures":{
351
"1":{
352
"name":"punctuation.section.directive.begin.erlang"
353
},
354
"2":{
355
"name":"keyword.control.directive.doc.erlang"
356
},
357
"4":{
358
"name":"punctuation.definition.parameters.begin.erlang"
359
},
360
"5":{
361
"name":"storage.type.string.erlang"
362
},
363
"6":{
364
"name":"comment.block.documentation.erlang"
365
},
366
"7":{
367
"name":"punctuation.definition.string.begin.erlang"
368
},
369
"8":{
370
"name":"invalid.illegal.string.erlang"
371
}
372
},
373
"end":"^(\\s*(\\7))\\s*([)]\\s*)?(\\.)",
374
"endCaptures":{
375
"1":{
376
"name":"comment.block.documentation.erlang"
377
},
378
"2":{
379
"name":"punctuation.definition.string.end.erlang"
380
},
381
"3":{
382
"name":"punctuation.section.directive.end.Erlang"
383
}
384
},
385
"name":"meta.directive.doc.erlang",
386
"contentName":"meta.embedded.block.markdown",
387
"patterns":[
388
{
389
"include":"text.html.markdown"
390
}
391
]
392
},
393
"docstring":{
394
"begin":"(?<!\")(([\"]{3,})\\s*)(\\S.*)?$",
395
"beginCaptures":{
396
"1":{
397
"name":"meta.string.quoted.triple.begin.erlang"
398
},
399
"2":{
400
"name":"punctuation.definition.string.begin.erlang"
401
},
402
"3":{
403
"name":"invalid.illegal.string.erlang"
404
}
405
},
406
"comment":"Only whitespace characters are allowed after the beggining and before the closing sequences and those cannot be in the same line",
407
"end":"^(\\s*(\\2))(?!\")",
408
"endCaptures":{
409
"1":{
410
"name":"meta.string.quoted.triple.end.erlang"
411
},
412
"2":{
413
"name":"punctuation.definition.string.end.erlang"
414
}
415
},
416
"name":"string.quoted.triple.erlang",
417
"patterns":[
418
{
419
"include":"#internal-string-body-verbatim"
420
}
421
]
422
},
423
"everything-else":{
424
"patterns":[
425
{
426
"include":"#comment"
427
},
428
{
429
"include":"#record-usage"
430
},
431
{
432
"include":"#macro-usage"
433
},
434
{
435
"include":"#expression"
436
},
437
{
438
"include":"#keyword"
439
},
440
{
441
"include":"#textual-operator"
442
},
443
{
444
"include":"#language-constant"
445
},
446
{
447
"include":"#function-call"
448
},
449
{
450
"include":"#tuple"
451
},
452
{
453
"include":"#list"
454
},
455
{
456
"include":"#binary"
457
},
458
{
459
"include":"#parenthesized-expression"
460
},
461
{
462
"include":"#character"
463
},
464
{
465
"include":"#number"
466
},
467
{
468
"include":"#atom"
469
},
470
{
471
"include":"#sigil-docstring"
472
},
473
{
474
"include":"#sigil-docstring-verbatim"
475
},
476
{
477
"include":"#sigil-string"
478
},
479
{
480
"include":"#docstring"
481
},
482
{
483
"include":"#string"
484
},
485
{
486
"include":"#symbolic-operator"
487
},
488
{
489
"include":"#variable"
490
}
491
]
492
},
493
"expression":{
494
"patterns":[
495
{
496
"begin":"\\b(if)\\b",
497
"beginCaptures":{
498
"1":{
499
"name":"keyword.control.if.erlang"
500
}
501
},
502
"end":"\\b(end)\\b",
503
"endCaptures":{
504
"1":{
505
"name":"keyword.control.end.erlang"
506
}
507
},
508
"name":"meta.expression.if.erlang",
509
"patterns":[
510
{
511
"include":"#internal-expression-punctuation"
512
},
513
{
514
"include":"#everything-else"
515
}
516
]
517
},
518
{
519
"begin":"\\b(case)\\b",
520
"beginCaptures":{
521
"1":{
522
"name":"keyword.control.case.erlang"
523
}
524
},
525
"end":"\\b(end)\\b",
526
"endCaptures":{
527
"1":{
528
"name":"keyword.control.end.erlang"
529
}
530
},
531
"name":"meta.expression.case.erlang",
532
"patterns":[
533
{
534
"include":"#internal-expression-punctuation"
535
},
536
{
537
"include":"#everything-else"
538
}
539
]
540
},
541
{
542
"begin":"\\b(receive)\\b",
543
"beginCaptures":{
544
"1":{
545
"name":"keyword.control.receive.erlang"
546
}
547
},
548
"end":"\\b(end)\\b",
549
"endCaptures":{
550
"1":{
551
"name":"keyword.control.end.erlang"
552
}
553
},
554
"name":"meta.expression.receive.erlang",
555
"patterns":[
556
{
557
"include":"#internal-expression-punctuation"
558
},
559
{
560
"include":"#everything-else"
561
}
562
]
563
},
564
{
565
"captures":{
566
"1":{
567
"name":"keyword.control.fun.erlang"
568
},
569
"10":{
570
"name":"punctuation.separator.function-arity.erlang"
571
},
572
"4":{
573
"name":"entity.name.type.class.module.erlang"
574
},
575
"5":{
576
"name":"variable.other.erlang"
577
},
578
"6":{
579
"name":"punctuation.separator.module-function.erlang"
580
},
581
"8":{
582
"name":"entity.name.function.erlang"
583
},
584
"9":{
585
"name":"variable.other.erlang"
586
}
587
},
588
"comment":"Implicit function expression with optional module qualifier when both module and function can be atom or variable",
589
"match":"\\b(fun)\\s+((([a-z][a-zA-Z\\d@_]*+)|(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+))\\s*+(:)\\s*+)?(([a-z][a-zA-Z\\d@_]*+|'[^']*+')|(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+))\\s*(/)",
590
"name":"meta.expression.fun.implicit.erlang"
591
},
592
{
593
"begin":"\\b(fun)\\s+(([a-z][a-zA-Z\\d@_]*+)|(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+))\\s*+(:)",
594
"beginCaptures":{
595
"1":{
596
"name":"keyword.control.fun.erlang"
597
},
598
"3":{
599
"name":"entity.name.type.class.module.erlang"
600
},
601
"4":{
602
"name":"variable.other.erlang"
603
},
604
"5":{
605
"name":"punctuation.separator.module-function.erlang"
606
}
607
},
608
"comment":"Implicit function expression with module qualifier when module can be atom or variable and function can by anything",
609
"end":"(/)",
610
"endCaptures":{
611
"1":{
612
"name":"punctuation.separator.function-arity.erlang"
613
}
614
},
615
"name":"meta.expression.fun.implicit.erlang",
616
"patterns":[
617
{
618
"include":"#everything-else"
619
}
620
]
621
},
622
{
623
"begin":"\\b(fun)\\s+(?!\\()",
624
"beginCaptures":{
625
"1":{
626
"name":"keyword.control.fun.erlang"
627
}
628
},
629
"comment":"Implicit function expression when both module and function can by anything",
630
"end":"(/)",
631
"endCaptures":{
632
"1":{
633
"name":"punctuation.separator.function-arity.erlang"
634
}
635
},
636
"name":"meta.expression.fun.implicit.erlang",
637
"patterns":[
638
{
639
"include":"#everything-else"
640
}
641
]
642
},
643
{
644
"begin":"\\b(fun)\\s*+(\\()(?=(\\s*+\\()|(\\)))",
645
"beginCaptures":{
646
"1":{
647
"name":"entity.name.function.erlang"
648
},
649
"2":{
650
"name":"punctuation.definition.parameters.begin.erlang"
651
}
652
},
653
"comment":"Function type in type specification",
654
"end":"(\\))",
655
"endCaptures":{
656
"1":{
657
"name":"punctuation.definition.parameters.end.erlang"
658
}
659
},
660
"patterns":[
661
{
662
"include":"#everything-else"
663
}
664
]
665
},
666
{
667
"begin":"\\b(fun)\\b",
668
"beginCaptures":{
669
"1":{
670
"name":"keyword.control.fun.erlang"
671
}
672
},
673
"comment":"Explicit function expression",
674
"end":"\\b(end)\\b",
675
"endCaptures":{
676
"1":{
677
"name":"keyword.control.end.erlang"
678
}
679
},
680
"name":"meta.expression.fun.erlang",
681
"patterns":[
682
{
683
"begin":"(?=\\()",
684
"end":"(;)|(?=\\bend\\b)",
685
"endCaptures":{
686
"1":{
687
"name":"punctuation.separator.clauses.erlang"
688
}
689
},
690
"patterns":[
691
{
692
"include":"#internal-function-parts"
693
}
694
]
695
},
696
{
697
"include":"#everything-else"
698
}
699
]
700
},
701
{
702
"begin":"\\b(try)\\b",
703
"beginCaptures":{
704
"1":{
705
"name":"keyword.control.try.erlang"
706
}
707
},
708
"end":"\\b(end)\\b",
709
"endCaptures":{
710
"1":{
711
"name":"keyword.control.end.erlang"
712
}
713
},
714
"name":"meta.expression.try.erlang",
715
"patterns":[
716
{
717
"include":"#internal-expression-punctuation"
718
},
719
{
720
"include":"#everything-else"
721
}
722
]
723
},
724
{
725
"begin":"\\b(begin)\\b",
726
"beginCaptures":{
727
"1":{
728
"name":"keyword.control.begin.erlang"
729
}
730
},
731
"end":"\\b(end)\\b",
732
"endCaptures":{
733
"1":{
734
"name":"keyword.control.end.erlang"
735
}
736
},
737
"name":"meta.expression.begin.erlang",
738
"patterns":[
739
{
740
"include":"#internal-expression-punctuation"
741
},
742
{
743
"include":"#everything-else"
744
}
745
]
746
},
747
{
748
"begin":"\\b(maybe)\\b",
749
"beginCaptures":{
750
"1":{
751
"name":"keyword.control.maybe.erlang"
752
}
753
},
754
"end":"\\b(end)\\b",
755
"endCaptures":{
756
"1":{
757
"name":"keyword.control.end.erlang"
758
}
759
},
760
"name":"meta.expression.maybe.erlang",
761
"patterns":[
762
{
763
"include":"#internal-expression-punctuation"
764
},
765
{
766
"include":"#everything-else"
767
}
768
]
769
}
770
]
771
},
772
"function":{
773
"begin":"^\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(?=\\()",
774
"beginCaptures":{
775
"1":{
776
"name":"entity.name.function.definition.erlang"
777
}
778
},
779
"end":"(\\.)",
780
"endCaptures":{
781
"1":{
782
"name":"punctuation.terminator.function.erlang"
783
}
784
},
785
"name":"meta.function.erlang",
786
"patterns":[
787
{
788
"captures":{
789
"1":{
790
"name":"entity.name.function.erlang"
791
}
792
},
793
"match":"^\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(?=\\()"
794
},
795
{
796
"begin":"(?=\\()",
797
"end":"(;)|(?=\\.)",
798
"endCaptures":{
799
"1":{
800
"name":"punctuation.separator.clauses.erlang"
801
}
802
},
803
"patterns":[
804
{
805
"include":"#parenthesized-expression"
806
},
807
{
808
"include":"#internal-function-parts"
809
}
810
]
811
},
812
{
813
"include":"#everything-else"
814
}
815
]
816
},
817
"function-call":{
818
"begin":"(?=([a-z][a-zA-Z\\d@_]*+|'[^']*+'|_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+)\\s*+(\\(|:\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+'|_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+)\\s*+\\())",
819
"end":"(\\))",
820
"endCaptures":{
821
"1":{
822
"name":"punctuation.definition.parameters.end.erlang"
823
}
824
},
825
"name":"meta.function-call.erlang",
826
"patterns":[
827
{
828
"begin":"((erlang)\\s*+(:)\\s*+)?(is_atom|is_binary|is_constant|is_float|is_function|is_integer|is_list|is_number|is_pid|is_port|is_reference|is_tuple|is_record|abs|element|hd|length|node|round|self|size|tl|trunc)\\s*+(\\()",
829
"beginCaptures":{
830
"2":{
831
"name":"entity.name.type.class.module.erlang"
832
},
833
"3":{
834
"name":"punctuation.separator.module-function.erlang"
835
},
836
"4":{
837
"name":"entity.name.function.guard.erlang"
838
},
839
"5":{
840
"name":"punctuation.definition.parameters.begin.erlang"
841
}
842
},
843
"end":"(?=\\))",
844
"patterns":[
845
{
846
"match":",",
847
"name":"punctuation.separator.parameters.erlang"
848
},
849
{
850
"include":"#everything-else"
851
}
852
]
853
},
854
{
855
"begin":"((([a-z][a-zA-Z\\d@_]*+|'[^']*+')|(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+))\\s*+(:)\\s*+)?(([a-z][a-zA-Z\\d@_]*+|'[^']*+')|(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+))\\s*+(\\()",
856
"beginCaptures":{
857
"3":{
858
"name":"entity.name.type.class.module.erlang"
859
},
860
"4":{
861
"name":"variable.other.erlang"
862
},
863
"5":{
864
"name":"punctuation.separator.module-function.erlang"
865
},
866
"7":{
867
"name":"entity.name.function.erlang"
868
},
869
"8":{
870
"name":"variable.other.erlang"
871
},
872
"9":{
873
"name":"punctuation.definition.parameters.begin.erlang"
874
}
875
},
876
"end":"(?=\\))",
877
"patterns":[
878
{
879
"match":",",
880
"name":"punctuation.separator.parameters.erlang"
881
},
882
{
883
"include":"#everything-else"
884
}
885
]
886
}
887
]
888
},
889
"import-export-directive":{
890
"patterns":[
891
{
892
"begin":"^\\s*+(-)\\s*+(import)\\s*+(\\()\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(,)",
893
"beginCaptures":{
894
"1":{
895
"name":"punctuation.section.directive.begin.erlang"
896
},
897
"2":{
898
"name":"keyword.control.directive.import.erlang"
899
},
900
"3":{
901
"name":"punctuation.definition.parameters.begin.erlang"
902
},
903
"4":{
904
"name":"entity.name.type.class.module.erlang"
905
},
906
"5":{
907
"name":"punctuation.separator.parameters.erlang"
908
}
909
},
910
"end":"(\\))\\s*+(\\.)",
911
"endCaptures":{
912
"1":{
913
"name":"punctuation.definition.parameters.end.erlang"
914
},
915
"2":{
916
"name":"punctuation.section.directive.end.erlang"
917
}
918
},
919
"name":"meta.directive.import.erlang",
920
"patterns":[
921
{
922
"include":"#internal-function-list"
923
}
924
]
925
},
926
{
927
"begin":"^\\s*+(-)\\s*+(export)\\s*+(\\()",
928
"beginCaptures":{
929
"1":{
930
"name":"punctuation.section.directive.begin.erlang"
931
},
932
"2":{
933
"name":"keyword.control.directive.export.erlang"
934
},
935
"3":{
936
"name":"punctuation.definition.parameters.begin.erlang"
937
}
938
},
939
"end":"(\\))\\s*+(\\.)",
940
"endCaptures":{
941
"1":{
942
"name":"punctuation.definition.parameters.end.erlang"
943
},
944
"2":{
945
"name":"punctuation.section.directive.end.erlang"
946
}
947
},
948
"name":"meta.directive.export.erlang",
949
"patterns":[
950
{
951
"include":"#internal-function-list"
952
}
953
]
954
}
955
]
956
},
957
"internal-expression-punctuation":{
958
"captures":{
959
"1":{
960
"name":"punctuation.separator.clause-head-body.erlang"
961
},
962
"2":{
963
"name":"punctuation.separator.clauses.erlang"
964
},
965
"3":{
966
"name":"punctuation.separator.expressions.erlang"
967
}
968
},
969
"match":"(->)|(;)|(,)"
970
},
971
"internal-function-list":{
972
"begin":"(\\[)",
973
"beginCaptures":{
974
"1":{
975
"name":"punctuation.definition.list.begin.erlang"
976
}
977
},
978
"end":"(\\])",
979
"endCaptures":{
980
"1":{
981
"name":"punctuation.definition.list.end.erlang"
982
}
983
},
984
"name":"meta.structure.list.function.erlang",
985
"patterns":[
986
{
987
"begin":"([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(/)",
988
"beginCaptures":{
989
"1":{
990
"name":"entity.name.function.erlang"
991
},
992
"2":{
993
"name":"punctuation.separator.function-arity.erlang"
994
}
995
},
996
"end":"(,)|(?=\\])",
997
"endCaptures":{
998
"1":{
999
"name":"punctuation.separator.list.erlang"
1000
}
1001
},
1002
"patterns":[
1003
{
1004
"include":"#everything-else"
1005
}
1006
]
1007
},
1008
{
1009
"include":"#everything-else"
1010
}
1011
]
1012
},
1013
"internal-function-parts":{
1014
"patterns":[
1015
{
1016
"begin":"(?=\\()",
1017
"end":"(->)",
1018
"endCaptures":{
1019
"1":{
1020
"name":"punctuation.separator.clause-head-body.erlang"
1021
}
1022
},
1023
"patterns":[
1024
{
1025
"begin":"(\\()",
1026
"beginCaptures":{
1027
"1":{
1028
"name":"punctuation.definition.parameters.begin.erlang"
1029
}
1030
},
1031
"end":"(\\))",
1032
"endCaptures":{
1033
"1":{
1034
"name":"punctuation.definition.parameters.end.erlang"
1035
}
1036
},
1037
"patterns":[
1038
{
1039
"match":",",
1040
"name":"punctuation.separator.parameters.erlang"
1041
},
1042
{
1043
"include":"#everything-else"
1044
}
1045
]
1046
},
1047
{
1048
"match":",|;",
1049
"name":"punctuation.separator.guards.erlang"
1050
},
1051
{
1052
"include":"#everything-else"
1053
}
1054
]
1055
},
1056
{
1057
"match":",",
1058
"name":"punctuation.separator.expressions.erlang"
1059
},
1060
{
1061
"include":"#everything-else"
1062
}
1063
]
1064
},
1065
"internal-record-body":{
1066
"begin":"(\\{)",
1067
"beginCaptures":{
1068
"1":{
1069
"name":"punctuation.definition.class.record.begin.erlang"
1070
}
1071
},
1072
"end":"(\\})",
1073
"endCaptures":{
1074
"1":{
1075
"name":"punctuation.definition.class.record.end.erlang"
1076
}
1077
},
1078
"name":"meta.structure.record.erlang",
1079
"patterns":[
1080
{
1081
"begin":"(([a-z][a-zA-Z\\d@_]*+|'[^']*+')|(_))",
1082
"beginCaptures":{
1083
"2":{
1084
"name":"variable.other.field.erlang"
1085
},
1086
"3":{
1087
"name":"variable.language.omitted.field.erlang"
1088
}
1089
},
1090
"end":"(,)|(?=\\})",
1091
"endCaptures":{
1092
"1":{
1093
"name":"punctuation.separator.class.record.erlang"
1094
}
1095
},
1096
"patterns":[
1097
{
1098
"include":"#everything-else"
1099
}
1100
]
1101
},
1102
{
1103
"include":"#everything-else"
1104
}
1105
]
1106
},
1107
"internal-string-body":{
1108
"patterns":[
1109
{
1110
"captures":{
1111
"1":{
1112
"name":"punctuation.definition.escape.erlang"
1113
},
1114
"3":{
1115
"name":"punctuation.definition.escape.erlang"
1116
}
1117
},
1118
"comment":"escape sequence",
1119
"match":"(\\\\)([bdefnrstv\\\\'\"]|(\\^)[@-_a-z]|[0-7]{1,3}|x[\\da-fA-F]{2})",
1120
"name":"constant.character.escape.erlang"
1121
},
1122
{
1123
"match":"\\\\\\^?.?",
1124
"name":"invalid.illegal.string.erlang"
1125
},
1126
{
1127
"include":"#internal-string-body-verbatim"
1128
}
1129
]
1130
},
1131
"internal-string-body-verbatim":{
1132
"patterns":[
1133
{
1134
"captures":{
1135
"1":{
1136
"name":"punctuation.definition.placeholder.erlang"
1137
},
1138
"10":{
1139
"name":"punctuation.separator.placeholder-parts.erlang"
1140
},
1141
"6":{
1142
"name":"punctuation.separator.placeholder-parts.erlang"
1143
}
1144
},
1145
"comment":"io:fwrite format control sequence",
1146
"match":"(~)((\\-)?\\d++|(\\*))?((\\.)(\\d++|(\\*))?((\\.)((\\*)|.))?)?[tlkK]*[~cfegswpWPBX#bx\\+ni]",
1147
"name":"constant.character.format.placeholder.other.erlang"
1148
},
1149
{
1150
"captures":{
1151
"1":{
1152
"name":"punctuation.definition.placeholder.erlang"
1153
}
1154
},
1155
"comment":"io:fread format control sequence",
1156
"match":"(~)(\\*)?(\\d++)?(t)?[~du\\-#fsacl]",
1157
"name":"constant.character.format.placeholder.other.erlang"
1158
},
1159
{
1160
"match":"~[^\"]?",
1161
"name":"invalid.illegal.string.erlang"
1162
}
1163
]
1164
},
1165
"internal-type-specifiers":{
1166
"begin":"(/)",
1167
"beginCaptures":{
1168
"1":{
1169
"name":"punctuation.separator.value-type.erlang"
1170
}
1171
},
1172
"end":"(?=,|:|>>)",
1173
"patterns":[
1174
{
1175
"captures":{
1176
"1":{
1177
"name":"storage.type.erlang"
1178
},
1179
"2":{
1180
"name":"storage.modifier.signedness.erlang"
1181
},
1182
"3":{
1183
"name":"storage.modifier.endianness.erlang"
1184
},
1185
"4":{
1186
"name":"storage.modifier.unit.erlang"
1187
},
1188
"5":{
1189
"name":"punctuation.separator.unit-specifiers.erlang"
1190
},
1191
"6":{
1192
"name":"constant.numeric.integer.decimal.erlang"
1193
},
1194
"7":{
1195
"name":"punctuation.separator.type-specifiers.erlang"
1196
}
1197
},
1198
"match":"(integer|float|binary|bytes|bitstring|bits|utf8|utf16|utf32)|(signed|unsigned)|(big|little|native)|(unit)(:)(\\d++)|(-)"
1199
}
1200
]
1201
},
1202
"keyword":{
1203
"match":"\\b(after|begin|case|catch|cond|end|fun|if|let|of|try|receive|when|maybe|else)\\b",
1204
"name":"keyword.control.erlang"
1205
},
1206
"language-constant":{
1207
"match":"\\b(false|true|undefined)\\b",
1208
"name":"constant.language"
1209
},
1210
"list":{
1211
"begin":"(\\[)",
1212
"beginCaptures":{
1213
"1":{
1214
"name":"punctuation.definition.list.begin.erlang"
1215
}
1216
},
1217
"end":"(\\])",
1218
"endCaptures":{
1219
"1":{
1220
"name":"punctuation.definition.list.end.erlang"
1221
}
1222
},
1223
"name":"meta.structure.list.erlang",
1224
"patterns":[
1225
{
1226
"match":"\\||\\|\\||,",
1227
"name":"punctuation.separator.list.erlang"
1228
},
1229
{
1230
"include":"#everything-else"
1231
}
1232
]
1233
},
1234
"macro-directive":{
1235
"patterns":[
1236
{
1237
"captures":{
1238
"1":{
1239
"name":"punctuation.section.directive.begin.erlang"
1240
},
1241
"2":{
1242
"name":"keyword.control.directive.ifdef.erlang"
1243
},
1244
"3":{
1245
"name":"punctuation.definition.parameters.begin.erlang"
1246
},
1247
"4":{
1248
"name":"entity.name.function.macro.erlang"
1249
},
1250
"5":{
1251
"name":"punctuation.definition.parameters.end.erlang"
1252
},
1253
"6":{
1254
"name":"punctuation.section.directive.end.erlang"
1255
}
1256
},
1257
"match":"^\\s*+(-)\\s*+(ifdef)\\s*+(\\()\\s*+([a-zA-z\\d@_]++)\\s*+(\\))\\s*+(\\.)",
1258
"name":"meta.directive.ifdef.erlang"
1259
},
1260
{
1261
"captures":{
1262
"1":{
1263
"name":"punctuation.section.directive.begin.erlang"
1264
},
1265
"2":{
1266
"name":"keyword.control.directive.ifndef.erlang"
1267
},
1268
"3":{
1269
"name":"punctuation.definition.parameters.begin.erlang"
1270
},
1271
"4":{
1272
"name":"entity.name.function.macro.erlang"
1273
},
1274
"5":{
1275
"name":"punctuation.definition.parameters.end.erlang"
1276
},
1277
"6":{
1278
"name":"punctuation.section.directive.end.erlang"
1279
}
1280
},
1281
"match":"^\\s*+(-)\\s*+(ifndef)\\s*+(\\()\\s*+([a-zA-z\\d@_]++)\\s*+(\\))\\s*+(\\.)",
1282
"name":"meta.directive.ifndef.erlang"
1283
},
1284
{
1285
"captures":{
1286
"1":{
1287
"name":"punctuation.section.directive.begin.erlang"
1288
},
1289
"2":{
1290
"name":"keyword.control.directive.undef.erlang"
1291
},
1292
"3":{
1293
"name":"punctuation.definition.parameters.begin.erlang"
1294
},
1295
"4":{
1296
"name":"entity.name.function.macro.erlang"
1297
},
1298
"5":{
1299
"name":"punctuation.definition.parameters.end.erlang"
1300
},
1301
"6":{
1302
"name":"punctuation.section.directive.end.erlang"
1303
}
1304
},
1305
"match":"^\\s*+(-)\\s*+(undef)\\s*+(\\()\\s*+([a-zA-z\\d@_]++)\\s*+(\\))\\s*+(\\.)",
1306
"name":"meta.directive.undef.erlang"
1307
}
1308
]
1309
},
1310
"macro-usage":{
1311
"captures":{
1312
"1":{
1313
"name":"keyword.operator.macro.erlang"
1314
},
1315
"2":{
1316
"name":"entity.name.function.macro.erlang"
1317
}
1318
},
1319
"match":"(\\?\\??)\\s*+([a-zA-Z\\d@_]++)",
1320
"name":"meta.macro-usage.erlang"
1321
},
1322
"module-directive":{
1323
"captures":{
1324
"1":{
1325
"name":"punctuation.section.directive.begin.erlang"
1326
},
1327
"2":{
1328
"name":"keyword.control.directive.module.erlang"
1329
},
1330
"3":{
1331
"name":"punctuation.definition.parameters.begin.erlang"
1332
},
1333
"4":{
1334
"name":"entity.name.type.class.module.definition.erlang"
1335
},
1336
"5":{
1337
"name":"punctuation.definition.parameters.end.erlang"
1338
},
1339
"6":{
1340
"name":"punctuation.section.directive.end.erlang"
1341
}
1342
},
1343
"match":"^\\s*+(-)\\s*+(module)\\s*+(\\()\\s*+([a-z][a-zA-Z\\d@_]*+)\\s*+(\\))\\s*+(\\.)",
1344
"name":"meta.directive.module.erlang"
1345
},
1346
"number":{
1347
"begin":"(?=\\d)",
1348
"end":"(?!\\d)",
1349
"patterns":[
1350
{
1351
"captures":{
1352
"1":{
1353
"name":"punctuation.separator.integer-float.erlang"
1354
},
1355
"2":{
1356
"name":"punctuation.separator.float-exponent.erlang"
1357
}
1358
},
1359
"match":"\\d++(\\.)\\d++([eE][\\+\\-]?\\d++)?",
1360
"name":"constant.numeric.float.erlang"
1361
},
1362
{
1363
"captures":{
1364
"1":{
1365
"name":"punctuation.separator.base-integer.erlang"
1366
}
1367
},
1368
"match":"2(#)([0-1]++_)*[0-1]++",
1369
"name":"constant.numeric.integer.binary.erlang"
1370
},
1371
{
1372
"captures":{
1373
"1":{
1374
"name":"punctuation.separator.base-integer.erlang"
1375
}
1376
},
1377
"match":"3(#)([0-2]++_)*[0-2]++",
1378
"name":"constant.numeric.integer.base-3.erlang"
1379
},
1380
{
1381
"captures":{
1382
"1":{
1383
"name":"punctuation.separator.base-integer.erlang"
1384
}
1385
},
1386
"match":"4(#)([0-3]++_)*[0-3]++",
1387
"name":"constant.numeric.integer.base-4.erlang"
1388
},
1389
{
1390
"captures":{
1391
"1":{
1392
"name":"punctuation.separator.base-integer.erlang"
1393
}
1394
},
1395
"match":"5(#)([0-4]++_)*[0-4]++",
1396
"name":"constant.numeric.integer.base-5.erlang"
1397
},
1398
{
1399
"captures":{
1400
"1":{
1401
"name":"punctuation.separator.base-integer.erlang"
1402
}
1403
},
1404
"match":"6(#)([0-5]++_)*[0-5]++",
1405
"name":"constant.numeric.integer.base-6.erlang"
1406
},
1407
{
1408
"captures":{
1409
"1":{
1410
"name":"punctuation.separator.base-integer.erlang"
1411
}
1412
},
1413
"match":"7(#)([0-6]++_)*[0-6]++",
1414
"name":"constant.numeric.integer.base-7.erlang"
1415
},
1416
{
1417
"captures":{
1418
"1":{
1419
"name":"punctuation.separator.base-integer.erlang"
1420
}
1421
},
1422
"match":"8(#)([0-7]++_)*[0-7]++",
1423
"name":"constant.numeric.integer.octal.erlang"
1424
},
1425
{
1426
"captures":{
1427
"1":{
1428
"name":"punctuation.separator.base-integer.erlang"
1429
}
1430
},
1431
"match":"9(#)([0-8]++_)*[0-8]++",
1432
"name":"constant.numeric.integer.base-9.erlang"
1433
},
1434
{
1435
"captures":{
1436
"1":{
1437
"name":"punctuation.separator.base-integer.erlang"
1438
}
1439
},
1440
"match":"10(#)(\\d++_)*\\d++",
1441
"name":"constant.numeric.integer.decimal.erlang"
1442
},
1443
{
1444
"captures":{
1445
"1":{
1446
"name":"punctuation.separator.base-integer.erlang"
1447
}
1448
},
1449
"match":"11(#)([\\daA]++_)*[\\daA]++",
1450
"name":"constant.numeric.integer.base-11.erlang"
1451
},
1452
{
1453
"captures":{
1454
"1":{
1455
"name":"punctuation.separator.base-integer.erlang"
1456
}
1457
},
1458
"match":"12(#)([\\da-bA-B]++_)*[\\da-bA-B]++",
1459
"name":"constant.numeric.integer.base-12.erlang"
1460
},
1461
{
1462
"captures":{
1463
"1":{
1464
"name":"punctuation.separator.base-integer.erlang"
1465
}
1466
},
1467
"match":"13(#)([\\da-cA-C]++_)*[\\da-cA-C]++",
1468
"name":"constant.numeric.integer.base-13.erlang"
1469
},
1470
{
1471
"captures":{
1472
"1":{
1473
"name":"punctuation.separator.base-integer.erlang"
1474
}
1475
},
1476
"match":"14(#)([\\da-dA-D]++_)*[\\da-dA-D]++",
1477
"name":"constant.numeric.integer.base-14.erlang"
1478
},
1479
{
1480
"captures":{
1481
"1":{
1482
"name":"punctuation.separator.base-integer.erlang"
1483
}
1484
},
1485
"match":"15(#)([\\da-eA-E]++_)*[\\da-eA-E]++",
1486
"name":"constant.numeric.integer.base-15.erlang"
1487
},
1488
{
1489
"captures":{
1490
"1":{
1491
"name":"punctuation.separator.base-integer.erlang"
1492
}
1493
},
1494
"match":"16(#)([\\da-fA-F]++_)*[\\da-fA-F]++",
1495
"name":"constant.numeric.integer.hexadecimal.erlang"
1496
},
1497
{
1498
"captures":{
1499
"1":{
1500
"name":"punctuation.separator.base-integer.erlang"
1501
}
1502
},
1503
"match":"17(#)([\\da-gA-G]++_)*[\\da-gA-G]++",
1504
"name":"constant.numeric.integer.base-17.erlang"
1505
},
1506
{
1507
"captures":{
1508
"1":{
1509
"name":"punctuation.separator.base-integer.erlang"
1510
}
1511
},
1512
"match":"18(#)([\\da-hA-H]++_)*[\\da-hA-H]++",
1513
"name":"constant.numeric.integer.base-18.erlang"
1514
},
1515
{
1516
"captures":{
1517
"1":{
1518
"name":"punctuation.separator.base-integer.erlang"
1519
}
1520
},
1521
"match":"19(#)([\\da-iA-I]++_)*[\\da-iA-I]++",
1522
"name":"constant.numeric.integer.base-19.erlang"
1523
},
1524
{
1525
"captures":{
1526
"1":{
1527
"name":"punctuation.separator.base-integer.erlang"
1528
}
1529
},
1530
"match":"20(#)([\\da-jA-J]++_)*[\\da-jA-J]++",
1531
"name":"constant.numeric.integer.base-20.erlang"
1532
},
1533
{
1534
"captures":{
1535
"1":{
1536
"name":"punctuation.separator.base-integer.erlang"
1537
}
1538
},
1539
"match":"21(#)([\\da-kA-K]++_)*[\\da-kA-K]++",
1540
"name":"constant.numeric.integer.base-21.erlang"
1541
},
1542
{
1543
"captures":{
1544
"1":{
1545
"name":"punctuation.separator.base-integer.erlang"
1546
}
1547
},
1548
"match":"22(#)([\\da-lA-L]++_)*[\\da-lA-L]++",
1549
"name":"constant.numeric.integer.base-22.erlang"
1550
},
1551
{
1552
"captures":{
1553
"1":{
1554
"name":"punctuation.separator.base-integer.erlang"
1555
}
1556
},
1557
"match":"23(#)([\\da-mA-M]++_)*[\\da-mA-M]++",
1558
"name":"constant.numeric.integer.base-23.erlang"
1559
},
1560
{
1561
"captures":{
1562
"1":{
1563
"name":"punctuation.separator.base-integer.erlang"
1564
}
1565
},
1566
"match":"24(#)([\\da-nA-N]++_)*[\\da-nA-N]++",
1567
"name":"constant.numeric.integer.base-24.erlang"
1568
},
1569
{
1570
"captures":{
1571
"1":{
1572
"name":"punctuation.separator.base-integer.erlang"
1573
}
1574
},
1575
"match":"25(#)([\\da-oA-O]++_)*[\\da-oA-O]++",
1576
"name":"constant.numeric.integer.base-25.erlang"
1577
},
1578
{
1579
"captures":{
1580
"1":{
1581
"name":"punctuation.separator.base-integer.erlang"
1582
}
1583
},
1584
"match":"26(#)([\\da-pA-P]++_)*[\\da-pA-P]++",
1585
"name":"constant.numeric.integer.base-26.erlang"
1586
},
1587
{
1588
"captures":{
1589
"1":{
1590
"name":"punctuation.separator.base-integer.erlang"
1591
}
1592
},
1593
"match":"27(#)([\\da-qA-Q]++_)*[\\da-qA-Q]++",
1594
"name":"constant.numeric.integer.base-27.erlang"
1595
},
1596
{
1597
"captures":{
1598
"1":{
1599
"name":"punctuation.separator.base-integer.erlang"
1600
}
1601
},
1602
"match":"28(#)([\\da-rA-R]++_)*[\\da-rA-R]++",
1603
"name":"constant.numeric.integer.base-28.erlang"
1604
},
1605
{
1606
"captures":{
1607
"1":{
1608
"name":"punctuation.separator.base-integer.erlang"
1609
}
1610
},
1611
"match":"29(#)([\\da-sA-S]++_)*[\\da-sA-S]++",
1612
"name":"constant.numeric.integer.base-29.erlang"
1613
},
1614
{
1615
"captures":{
1616
"1":{
1617
"name":"punctuation.separator.base-integer.erlang"
1618
}
1619
},
1620
"match":"30(#)([\\da-tA-T]++_)*[\\da-tA-T]++",
1621
"name":"constant.numeric.integer.base-30.erlang"
1622
},
1623
{
1624
"captures":{
1625
"1":{
1626
"name":"punctuation.separator.base-integer.erlang"
1627
}
1628
},
1629
"match":"31(#)([\\da-uA-U]++_)*[\\da-uA-U]++",
1630
"name":"constant.numeric.integer.base-31.erlang"
1631
},
1632
{
1633
"captures":{
1634
"1":{
1635
"name":"punctuation.separator.base-integer.erlang"
1636
}
1637
},
1638
"match":"32(#)([\\da-vA-V]++_)*[\\da-vA-V]++",
1639
"name":"constant.numeric.integer.base-32.erlang"
1640
},
1641
{
1642
"captures":{
1643
"1":{
1644
"name":"punctuation.separator.base-integer.erlang"
1645
}
1646
},
1647
"match":"33(#)([\\da-wA-W]++_)*[\\da-wA-W]++",
1648
"name":"constant.numeric.integer.base-33.erlang"
1649
},
1650
{
1651
"captures":{
1652
"1":{
1653
"name":"punctuation.separator.base-integer.erlang"
1654
}
1655
},
1656
"match":"34(#)([\\da-xA-X]++_)*[\\da-xA-X]++",
1657
"name":"constant.numeric.integer.base-34.erlang"
1658
},
1659
{
1660
"captures":{
1661
"1":{
1662
"name":"punctuation.separator.base-integer.erlang"
1663
}
1664
},
1665
"match":"35(#)([\\da-yA-Y]++_)*[\\da-yA-Y]++",
1666
"name":"constant.numeric.integer.base-35.erlang"
1667
},
1668
{
1669
"captures":{
1670
"1":{
1671
"name":"punctuation.separator.base-integer.erlang"
1672
}
1673
},
1674
"match":"36(#)([\\da-zA-Z]++_)*[\\da-zA-Z]++",
1675
"name":"constant.numeric.integer.base-36.erlang"
1676
},
1677
{
1678
"match":"\\d++#([\\da-zA-Z]++_)*[\\da-zA-Z]++",
1679
"name":"invalid.illegal.integer.erlang"
1680
},
1681
{
1682
"match":"(\\d++_)*\\d++",
1683
"name":"constant.numeric.integer.decimal.erlang"
1684
}
1685
]
1686
},
1687
"parenthesized-expression":{
1688
"begin":"(\\()",
1689
"beginCaptures":{
1690
"1":{
1691
"name":"punctuation.section.expression.begin.erlang"
1692
}
1693
},
1694
"end":"(\\))",
1695
"endCaptures":{
1696
"1":{
1697
"name":"punctuation.section.expression.end.erlang"
1698
}
1699
},
1700
"name":"meta.expression.parenthesized",
1701
"patterns":[
1702
{
1703
"include":"#everything-else"
1704
}
1705
]
1706
},
1707
"record-directive":{
1708
"begin":"^\\s*+(-)\\s*+(record)\\s*+(\\()\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(,)",
1709
"beginCaptures":{
1710
"1":{
1711
"name":"punctuation.section.directive.begin.erlang"
1712
},
1713
"2":{
1714
"name":"keyword.control.directive.import.erlang"
1715
},
1716
"3":{
1717
"name":"punctuation.definition.parameters.begin.erlang"
1718
},
1719
"4":{
1720
"name":"entity.name.type.class.record.definition.erlang"
1721
},
1722
"5":{
1723
"name":"punctuation.separator.parameters.erlang"
1724
}
1725
},
1726
"end":"(\\))\\s*+(\\.)",
1727
"endCaptures":{
1728
"1":{
1729
"name":"punctuation.definition.parameters.end.erlang"
1730
},
1731
"2":{
1732
"name":"punctuation.section.directive.end.erlang"
1733
}
1734
},
1735
"name":"meta.directive.record.erlang",
1736
"patterns":[
1737
{
1738
"include":"#internal-record-body"
1739
},
1740
{
1741
"include":"#comment"
1742
}
1743
]
1744
},
1745
"record-usage":{
1746
"patterns":[
1747
{
1748
"captures":{
1749
"1":{
1750
"name":"keyword.operator.record.erlang"
1751
},
1752
"2":{
1753
"name":"entity.name.type.class.record.erlang"
1754
},
1755
"3":{
1756
"name":"punctuation.separator.record-field.erlang"
1757
},
1758
"4":{
1759
"name":"variable.other.field.erlang"
1760
}
1761
},
1762
"match":"(#)\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(\\.)\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')",
1763
"name":"meta.record-usage.erlang"
1764
},
1765
{
1766
"begin":"(#)\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')",
1767
"beginCaptures":{
1768
"1":{
1769
"name":"keyword.operator.record.erlang"
1770
},
1771
"2":{
1772
"name":"entity.name.type.class.record.erlang"
1773
}
1774
},
1775
"end":"(?<=\\})",
1776
"name":"meta.record-usage.erlang",
1777
"patterns":[
1778
{
1779
"include":"#internal-record-body"
1780
}
1781
]
1782
}
1783
]
1784
},
1785
"sigil-docstring":{
1786
"begin":"(~[bs])(([\"]{3,})\\s*)(\\S.*)?$",
1787
"beginCaptures":{
1788
"1":{
1789
"name":"storage.type.string.erlang"
1790
},
1791
"2":{
1792
"name":"meta.string.quoted.triple.begin.erlang"
1793
},
1794
"3":{
1795
"name":"punctuation.definition.string.begin.erlang"
1796
},
1797
"4":{
1798
"name":"invalid.illegal.string.erlang"
1799
}
1800
},
1801
"comment":"Only whitespace characters are allowed after the beggining and before the closing sequences and those cannot be in the same line",
1802
"end":"^(\\s*(\\3))(?!\")",
1803
"endCaptures":{
1804
"1":{
1805
"name":"meta.string.quoted.triple.end.erlang"
1806
},
1807
"2":{
1808
"name":"punctuation.definition.string.end.erlang"
1809
}
1810
},
1811
"name":"string.quoted.tripple.sigil.erlang",
1812
"patterns":[
1813
{
1814
"include":"#internal-string-body"
1815
}
1816
]
1817
},
1818
"sigil-docstring-verbatim":{
1819
"begin":"(~[BS]?)(([\"]{3,})\\s*)(\\S.*)?$",
1820
"beginCaptures":{
1821
"1":{
1822
"name":"storage.type.string.erlang"
1823
},
1824
"2":{
1825
"name":"meta.string.quoted.triple.begin.erlang"
1826
},
1827
"3":{
1828
"name":"punctuation.definition.string.begin.erlang"
1829
},
1830
"4":{
1831
"name":"invalid.illegal.string.erlang"
1832
}
1833
},
1834
"comment":"Only whitespace characters are allowed after the beggining and before the closing sequences and those cannot be in the same line",
1835
"end":"^(\\s*(\\3))(?!\")",
1836
"endCaptures":{
1837
"1":{
1838
"name":"meta.string.quoted.triple.end.erlang"
1839
},
1840
"2":{
1841
"name":"punctuation.definition.string.end.erlang"
1842
}
1843
},
1844
"name":"string.quoted.tripple.sigil.erlang",
1845
"patterns":[
1846
{
1847
"include":"#internal-string-body-verbatim"
1848
}
1849
]
1850
},
1851
"sigil-string":{
1852
"patterns":[
1853
{
1854
"include":"#sigil-string-parenthesis"
1855
},
1856
{
1857
"include":"#sigil-string-parenthesis-verbatim"
1858
},
1859
{
1860
"include":"#sigil-string-curly-brackets"
1861
},
1862
{
1863
"include":"#sigil-string-curly-brackets-verbatim"
1864
},
1865
{
1866
"include":"#sigil-string-square-brackets"
1867
},
1868
{
1869
"include":"#sigil-string-square-brackets-verbatim"
1870
},
1871
{
1872
"include":"#sigil-string-less-greater"
1873
},
1874
{
1875
"include":"#sigil-string-less-greater-verbatim"
1876
},
1877
{
1878
"include":"#sigil-string-single-character"
1879
},
1880
{
1881
"include":"#sigil-string-single-character-verbatim"
1882
},
1883
{
1884
"include":"#sigil-string-single-quote"
1885
},
1886
{
1887
"include":"#sigil-string-single-quote-verbatim"
1888
},
1889
{
1890
"include":"#sigil-string-double-quote"
1891
},
1892
{
1893
"include":"#sigil-string-double-quote-verbatim"
1894
}
1895
]
1896
},
1897
"sigil-string-curly-brackets":{
1898
"begin":"(~[bs]?)([{])",
1899
"beginCaptures":{
1900
"1":{
1901
"name":"storage.type.string.erlang"
1902
},
1903
"2":{
1904
"name":"punctuation.definition.string.begin.erlang"
1905
}
1906
},
1907
"end":"([}])",
1908
"endCaptures":{
1909
"1":{
1910
"name":"punctuation.definition.string.end.erlang"
1911
}
1912
},
1913
"name":"string.quoted.curly-brackets.sigil.erlang",
1914
"patterns":[
1915
{
1916
"include":"#internal-string-body"
1917
}
1918
]
1919
},
1920
"sigil-string-curly-brackets-verbatim":{
1921
"begin":"(~[BS])([{])",
1922
"beginCaptures":{
1923
"1":{
1924
"name":"storage.type.string.erlang"
1925
},
1926
"2":{
1927
"name":"punctuation.definition.string.begin.erlang"
1928
}
1929
},
1930
"end":"([}])",
1931
"endCaptures":{
1932
"1":{
1933
"name":"punctuation.definition.string.end.erlang"
1934
}
1935
},
1936
"name":"string.quoted.curly-brackets.sigil.erlang",
1937
"patterns":[
1938
{
1939
"include":"#internal-string-body-verbatim"
1940
}
1941
]
1942
},
1943
"sigil-string-double-quote":{
1944
"begin":"(~[bs]?)(\")",
1945
"beginCaptures":{
1946
"1":{
1947
"name":"storage.type.string.erlang"
1948
},
1949
"2":{
1950
"name":"punctuation.definition.string.begin.erlang"
1951
}
1952
},
1953
"end":"(\\2)",
1954
"endCaptures":{
1955
"1":{
1956
"name":"punctuation.definition.string.end.erlang"
1957
}
1958
},
1959
"name":"string.quoted.double.sigil.erlang",
1960
"patterns":[
1961
{
1962
"include":"#internal-string-body"
1963
}
1964
]
1965
},
1966
"sigil-string-double-quote-verbatim":{
1967
"begin":"(~[BS])(\")",
1968
"beginCaptures":{
1969
"1":{
1970
"name":"storage.type.string.erlang"
1971
},
1972
"2":{
1973
"name":"punctuation.definition.string.begin.erlang"
1974
}
1975
},
1976
"end":"(\\2)",
1977
"endCaptures":{
1978
"1":{
1979
"name":"punctuation.definition.string.end.erlang"
1980
}
1981
},
1982
"name":"string.quoted.double.sigil.erlang",
1983
"patterns":[
1984
{
1985
"include":"#internal-string-body-verbatim"
1986
}
1987
]
1988
},
1989
"sigil-string-less-greater":{
1990
"begin":"(~[bs]?)(<)",
1991
"beginCaptures":{
1992
"1":{
1993
"name":"storage.type.string.erlang"
1994
},
1995
"2":{
1996
"name":"punctuation.definition.string.begin.erlang"
1997
}
1998
},
1999
"end":"(>)",
2000
"endCaptures":{
2001
"1":{
2002
"name":"punctuation.definition.string.end.erlang"
2003
}
2004
},
2005
"name":"string.quoted.less-greater.sigil.erlang",
2006
"patterns":[
2007
{
2008
"include":"#internal-string-body"
2009
}
2010
]
2011
},
2012
"sigil-string-less-greater-verbatim":{
2013
"begin":"(~[BS])(<)",
2014
"beginCaptures":{
2015
"1":{
2016
"name":"storage.type.string.erlang"
2017
},
2018
"2":{
2019
"name":"punctuation.definition.string.begin.erlang"
2020
}
2021
},
2022
"end":"(>)",
2023
"endCaptures":{
2024
"1":{
2025
"name":"punctuation.definition.string.end.erlang"
2026
}
2027
},
2028
"name":"string.quoted.less-greater.sigil.erlang",
2029
"patterns":[
2030
{
2031
"include":"#internal-string-body-verbatim"
2032
}
2033
]
2034
},
2035
"sigil-string-parenthesis":{
2036
"begin":"(~[bs]?)([(])",
2037
"beginCaptures":{
2038
"1":{
2039
"name":"storage.type.string.erlang"
2040
},
2041
"2":{
2042
"name":"punctuation.definition.string.begin.erlang"
2043
}
2044
},
2045
"end":"([)])",
2046
"endCaptures":{
2047
"1":{
2048
"name":"punctuation.definition.string.end.erlang"
2049
}
2050
},
2051
"name":"string.quoted.parenthesis.sigil.erlang",
2052
"patterns":[
2053
{
2054
"include":"#internal-string-body"
2055
}
2056
]
2057
},
2058
"sigil-string-parenthesis-verbatim":{
2059
"begin":"(~[BS])([(])",
2060
"beginCaptures":{
2061
"1":{
2062
"name":"storage.type.string.erlang"
2063
},
2064
"2":{
2065
"name":"punctuation.definition.string.begin.erlang"
2066
}
2067
},
2068
"end":"([)])",
2069
"endCaptures":{
2070
"1":{
2071
"name":"punctuation.definition.string.end.erlang"
2072
}
2073
},
2074
"name":"string.quoted.parenthesis.sigil.erlang",
2075
"patterns":[
2076
{
2077
"include":"#internal-string-body-verbatim"
2078
}
2079
]
2080
},
2081
"sigil-string-single-character":{
2082
"begin":"(~[bs]?)([/\\|`#])",
2083
"beginCaptures":{
2084
"1":{
2085
"name":"storage.type.string.erlang"
2086
},
2087
"2":{
2088
"name":"punctuation.definition.string.begin.erlang"
2089
}
2090
},
2091
"end":"(\\2)",
2092
"endCaptures":{
2093
"1":{
2094
"name":"punctuation.definition.string.end.erlang"
2095
}
2096
},
2097
"name":"string.quoted.other.sigil.erlang",
2098
"patterns":[
2099
{
2100
"include":"#internal-string-body"
2101
}
2102
]
2103
},
2104
"sigil-string-single-character-verbatim":{
2105
"begin":"(~[BS])([/\\|`#])",
2106
"beginCaptures":{
2107
"1":{
2108
"name":"storage.type.string.erlang"
2109
},
2110
"2":{
2111
"name":"punctuation.definition.string.begin.erlang"
2112
}
2113
},
2114
"end":"(\\2)",
2115
"endCaptures":{
2116
"1":{
2117
"name":"punctuation.definition.string.end.erlang"
2118
}
2119
},
2120
"name":"string.quoted.other.sigil.erlang",
2121
"patterns":[
2122
{
2123
"include":"#internal-string-body-verbatim"
2124
}
2125
]
2126
},
2127
"sigil-string-single-quote":{
2128
"begin":"(~[bs]?)(')",
2129
"beginCaptures":{
2130
"1":{
2131
"name":"storage.type.string.erlang"
2132
},
2133
"2":{
2134
"name":"punctuation.definition.string.begin.erlang"
2135
}
2136
},
2137
"end":"(\\2)",
2138
"endCaptures":{
2139
"1":{
2140
"name":"punctuation.definition.string.end.erlang"
2141
}
2142
},
2143
"name":"string.quoted.single.sigil.erlang",
2144
"patterns":[
2145
{
2146
"include":"#internal-string-body"
2147
}
2148
]
2149
},
2150
"sigil-string-single-quote-verbatim":{
2151
"begin":"(~[BS])(')",
2152
"beginCaptures":{
2153
"1":{
2154
"name":"storage.type.string.erlang"
2155
},
2156
"2":{
2157
"name":"punctuation.definition.string.begin.erlang"
2158
}
2159
},
2160
"end":"(\\2)",
2161
"endCaptures":{
2162
"1":{
2163
"name":"punctuation.definition.string.end.erlang"
2164
}
2165
},
2166
"name":"string.quoted.single.sigil.erlang",
2167
"patterns":[
2168
{
2169
"include":"#internal-string-body-verbatim"
2170
}
2171
]
2172
},
2173
"sigil-string-square-brackets":{
2174
"begin":"(~[bs]?)([\\[])",
2175
"beginCaptures":{
2176
"1":{
2177
"name":"storage.type.string.erlang"
2178
},
2179
"2":{
2180
"name":"punctuation.definition.string.begin.erlang"
2181
}
2182
},
2183
"end":"([\\]])",
2184
"endCaptures":{
2185
"1":{
2186
"name":"punctuation.definition.string.end.erlang"
2187
}
2188
},
2189
"name":"string.quoted.square-brackets.sigil.erlang",
2190
"patterns":[
2191
{
2192
"include":"#internal-string-body"
2193
}
2194
]
2195
},
2196
"sigil-string-square-brackets-verbatim":{
2197
"begin":"(~[BS])([\\[])",
2198
"beginCaptures":{
2199
"1":{
2200
"name":"storage.type.string.erlang"
2201
},
2202
"2":{
2203
"name":"punctuation.definition.string.begin.erlang"
2204
}
2205
},
2206
"end":"([\\]])",
2207
"endCaptures":{
2208
"1":{
2209
"name":"punctuation.definition.string.end.erlang"
2210
}
2211
},
2212
"name":"string.quoted.square-brackets.sigil.erlang",
2213
"patterns":[
2214
{
2215
"include":"#internal-string-body-verbatim"
2216
}
2217
]
2218
},
2219
"string":{
2220
"begin":"(\")",
2221
"beginCaptures":{
2222
"1":{
2223
"name":"punctuation.definition.string.begin.erlang"
2224
}
2225
},
2226
"end":"(\")",
2227
"endCaptures":{
2228
"1":{
2229
"name":"punctuation.definition.string.end.erlang"
2230
}
2231
},
2232
"name":"string.quoted.double.erlang",
2233
"patterns":[
2234
{
2235
"include":"#internal-string-body"
2236
}
2237
]
2238
},
2239
"symbolic-operator":{
2240
"match":"\\+\\+|\\+|--|-|\\*|/=|/|=/=|=:=|==|=<|=|<-|<|>=|>|!|::|\\?=",
2241
"name":"keyword.operator.symbolic.erlang"
2242
},
2243
"textual-operator":{
2244
"match":"\\b(andalso|band|and|bxor|xor|bor|orelse|or|bnot|not|bsl|bsr|div|rem)\\b",
2245
"name":"keyword.operator.textual.erlang"
2246
},
2247
"tuple":{
2248
"begin":"(\\{)",
2249
"beginCaptures":{
2250
"1":{
2251
"name":"punctuation.definition.tuple.begin.erlang"
2252
}
2253
},
2254
"end":"(\\})",
2255
"endCaptures":{
2256
"1":{
2257
"name":"punctuation.definition.tuple.end.erlang"
2258
}
2259
},
2260
"name":"meta.structure.tuple.erlang",
2261
"patterns":[
2262
{
2263
"match":",",
2264
"name":"punctuation.separator.tuple.erlang"
2265
},
2266
{
2267
"include":"#everything-else"
2268
}
2269
]
2270
},
2271
"variable":{
2272
"captures":{
2273
"1":{
2274
"name":"variable.other.erlang"
2275
},
2276
"2":{
2277
"name":"variable.language.omitted.erlang"
2278
}
2279
},
2280
"match":"(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+)|(_)"
2281
}
2282
},
2283
"scopeName":"source.erlang",
2284
"uuid":"58EA597D-5158-4BF7-9FB2-B05135D1E166"
2285
}
2286