/
META.json
56 lines (56 loc) · 1.76 KB
/
META.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
"scopeName": "source.ocaml.META",
"fileTypes": ["META"],
"patterns": [{ "include": "#comments" }, { "include": "#entries" }],
"repository": {
"comments": {
"comment": "line comment",
"name": "comment.line.META",
"begin": "#",
"end": "$"
},
"entries": {
"patterns": [
{
"comment": "assignment or addition",
"match": "\\b([[:word:].]+)[[:space:]]*(\\+?=)[[:space:]]*(\".*\")",
"captures": {
"1": { "name": "entity.name.tag.META" },
"2": { "name": "keyword.operator.META" },
"3": { "name": "string.quoted.double.META" }
}
},
{
"comment": "assignment or addition with formal predicates",
"begin": "\\b([[:word:].]+)[[:space:]]*\\(",
"beginCaptures": {
"1": { "name": "entity.name.tag.META" }
},
"end": "\\)[[:space:]]*(\\+?=)[[:space:]]*(\".*\")",
"endCaptures": {
"1": { "name": "keyword.operator.META" },
"2": { "name": "string.quoted.double.META" }
},
"patterns": [
{ "match": "-", "name": "keyword.operator.META" },
{
"comment": "standard predicates",
"match": "\\b(byte|native|toploop|mt|mt_posix|mt_vm|gprof|autolink)\\b",
"name": "constant.language.META"
}
]
},
{
"comment": "subpackage",
"begin": "\\b(package)[[:space:]]*(\"[^.]*\")[[:space:]]*\\(",
"beginCaptures": {
"1": { "name": "keyword.other.META" },
"2": { "name": "string.quoted.double.META" }
},
"end": "\\)",
"patterns": [{ "include": "$self" }]
}
]
}
}
}