-
Notifications
You must be signed in to change notification settings - Fork 3
/
jsonnet.sublime-syntax
122 lines (89 loc) · 3.46 KB
/
jsonnet.sublime-syntax
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
%YAML 1.2
---
name: jsonnet
file_extensions: [jsonnet, libsonnet, libjsonnet]
scope: source.jsonnet
contexts:
main:
- match: \b(\d+([Ee][+-]?\d+)?)\b
scope: constant.numeric.jsonnet
- match: \b\d+[.]\d*([Ee][+-]?\d+)?\b
scope: constant.numeric.jsonnet
- match: \b[.]\d+([Ee][+-]?\d+)?\b
scope: constant.numeric.jsonnet
- match: \bstd[.](abs|acos|asciiLower|asciiUpper|asin|assertEqual|atan|base64|base64Decode|base64DecodeBytes)\b
scope: support.function.jsonnet
- match: \bstd[.](ceil|char|codepoint|cos|count|endsWith)\b
scope: support.function.jsonnet
- match: \bstd[.](escapeStringBash|escapeStringDollars|escapeStringJson|escapeStringPython)\b
scope: support.function.jsonnet
- match: \bstd[.](exp|exponent|extVar|filter|filterMap|flattenArrays|floor|foldl|foldr|format)\b
scope: support.function.jsonnet
- match: \bstd[.](isArray|isBoolean|isFunction|isNumber|isObject|isString|join|length|lines|log|makeArray)\b
scope: support.function.jsonnet
- match: \bstd[.](manifestIni|manifestJsonEx|manifestPython|manifestPythonVars|manifestXmlJsonml|manifestYamlDoc|manifestYamlStream)\b
scope: support.function.jsonnet
- match: \bstd[.](mantissa|map|mapWithIndex|mapWithKey|max|md5|mergePatch|min|mod)\b
scope: support.function.jsonnet
- match: \bstd[.](objectFields|objectFieldsAll|objectHas|objectHasAll|objectHasEx|parseHex|parseInt|parseJson|parseOctal|pow|prune|range)\b
scope: support.function.jsonnet
- match: \bstd[.](set|setDiff|setInter|setMember|setUnion|sign|sin|sort|split|splitLimit|sqrt)\b
scope: support.function.jsonnet
- match: \bstd[.](startsWith|stringChars|strReplace|substr|tan|toString|type|uniq)\b
scope: support.function.jsonnet
- match: \bstd[.](native|thisFile|decodeUTF8|deepJoin|encodeUTF8|find|nativeExt|trace)\b
scope: support.function.jsonnet
- match: \b[$]\b
scope: variable.language.jsonnet
- match: \b[a-zA-Z_][a-z0-9A-Z_]*\s*(\([^)]*\))?\s*\+?::?:?
scope: entity.name.function.jsonnet
- match: \b(import|importstr)\b
scope: storage.type.jsonnet
- match: \b(function)\b
scope: keyword.other.jsonnet
- match: \b(self|super)\b
scope: variable.language.jsonnet
- match: \b(if|then|else|for|in)\b
scope: keyword.control.jsonnet
- match: \b(local|tailstrict)\b
scope: keyword.other.jsonnet
- match: \b(true|false|null)\b
scope: constant.language.jsonnet
- match: \b(error|assert)\b
scope: keyword.control.jsonnet
- match: //.*$
scope: comment.line.jsonnet
- match: '#.*$'
scope: comment.block.jsonnet
- match: /\*
push: comment
- match: \|\|\|
push: unquoted
- match: '"'
push: string
- match: "\'"
push: single_string
comment:
- meta_scope: comment.block.jsonnet
- match: \*/
pop: true
unquoted:
- meta_scope: string.unquoted.block.jsonnet
- match: \|\|\|
pop: true
string:
- meta_scope: string.double.jsonnet
- match: '"'
pop: true
- match: \\(["\\/bfnrt]|(u[0-9a-fA-F]{4}))
scope: constant.character.escape.jsonnet
- match: \\[^"\\/bfnrtu]
scope: invalid.illegal.jsonnet
single_string:
- meta_scope: string.double.jsonnet
- match: "\'"
pop: true
- match: \\(["\\/bfnrt]|(u[0-9a-fA-F]{4}))
scope: constant.character.escape.jsonnet
- match: \\[^"\\/bfnrtu]
scope: invalid.illegal.jsonnet