-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathilo.tmLanguage.json
More file actions
82 lines (82 loc) · 2.48 KB
/
ilo.tmLanguage.json
File metadata and controls
82 lines (82 loc) · 2.48 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "ilo",
"scopeName": "source.ilo",
"patterns": [
{ "include": "#comment" },
{ "include": "#string" },
{ "include": "#number" },
{ "include": "#boolean" },
{ "include": "#type-sigil" },
{ "include": "#operator" },
{ "include": "#keyword" },
{ "include": "#builtin" },
{ "include": "#function-def" },
{ "include": "#punctuation" }
],
"repository": {
"comment": {
"match": "--.*$",
"name": "comment.line.double-dash.ilo"
},
"string": {
"match": "\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"",
"name": "string.quoted.double.ilo"
},
"number": {
"match": "\\b-?[0-9]+(\\.[0-9]+)?\\b",
"name": "constant.numeric.ilo"
},
"boolean": {
"match": "\\b(true|false)\\b",
"name": "constant.language.boolean.ilo"
},
"type-sigil": {
"patterns": [
{
"match": ":[ntb?LRMFOS]\\b",
"name": "support.type.ilo"
},
{
"match": ":(number|text|bool|List|Map|Result)\\b",
"name": "support.type.ilo"
},
{
"match": "(?<=\\s)>\\s*[ntb?LRMFOS]\\b",
"name": "support.type.ilo"
},
{
"match": "(?<=\\s)>\\s*(number|text|bool|List|Map|Result)\\b",
"name": "support.type.ilo"
}
]
},
"operator": {
"match": ">>|>=|<=|!=|==|\\+=|\\?\\?|\\.\\?|\\+|-|\\*|/|%|>|<|=(?!=)|&|\\||!|\\^|~|\\$",
"name": "keyword.operator.ilo"
},
"keyword": {
"match": "\\b(type|tool|use|with|timeout|retry|return)\\b",
"name": "keyword.control.ilo"
},
"builtin": {
"match": "\\b(cat|len|trm|spl|has|rgx|fmt|hd|tl|rev|srt|slc|flat|unq|map|flt|fld|grp|sum|avg|mmap|mget|mset|mhas|mkeys|mvals|mdel|str|num|abs|flr|cel|rnd|get|post|rd|wr|rdb|jpth|jdmp|jpar|prnt|now|env|fac)\\b",
"name": "support.function.ilo"
},
"function-def": {
"match": "^([a-z][a-z0-9]*)(?=\\s+[a-z])",
"captures": {
"1": { "name": "entity.name.function.ilo" }
}
},
"punctuation": {
"patterns": [
{ "match": "[;]", "name": "punctuation.separator.ilo" },
{ "match": "[:\\.]", "name": "punctuation.accessor.ilo" },
{ "match": "[{}()\\[\\]]", "name": "punctuation.bracket.ilo" },
{ "match": ",", "name": "punctuation.comma.ilo" },
{ "match": "→", "name": "punctuation.arrow.ilo" }
]
}
}
}