4 filename: "\\.jsonnet$"
6 # Spec: https://jsonnet.org/ref/spec.html
10 # FIXME: $ won't match
11 - constant: "\\b(self|\\$|super)\\b"
13 - constant.bool: "\\b(null|true|false)\\b"
14 # the standard library
15 - identifier: "\\bstd\\.(extVar|thisFile|type|length|objectHas|objectFields|objectHasAll|objectFieldsAll|prune|mapWithKey|abs|sign|max|min|pow|exp|log|exponent|mantissa|floor|ceil|sqrt|sin|cos|tan|asin|acos|atan|mod|assertEqual|toString|codepoint|char|substr|findSubstr|startsWith|endsWith|split|splitLimit|strReplace|asciiUpper|asciiLower|stringChars|format|escapeStringDollars|escapeStringPython|parseInt|parseOctal|parseHex|parseJson|encodeUTF8|decodeUTF8|manifestIni|manifestPython|manifestPythonVars|manifestJsonEx|manifestYamlDoc|manifestYamlStream|manifestXmlJsonml|makeArray|count|find|map|mapWithIndex|filterMap|filter|foldl|foldr|range|join|lines|flattenArrays|sort|uniq|set|setInter|setUnion|setDiff|setMember|base64|base64DecodeBytes|base64Decode|md5|mergePatch|trace)\\b"
16 # unquoted object keys
17 - type: "[_a-zA-Z][_a-zA-Z0-9]*\\s*:"
18 # object key separator
21 - statement: "\\b(assert|else|error|for|function|if|import|importstr|in|local|tailstrict|then)\\b"
23 - symbol.operator: "([.;,+*|=!\\%]|<|>|/|-|&)"
25 - symbol.brackets: "([(){}]|\\[|\\])"
27 - constant.number: "\\b(0|([1-9][0-9]*))(\\.[0-9]+)?([eE][\\+-]?[0-9]+)?\\b"
29 # double-quoted string
35 - constant.specialChar: "\\\\u[0-9a-fA-F]{4}|\\\\[bfnrt'\"/\\\\]"
37 # single-quoted string
43 - constant.specialChar: "\\\\u[0-9a-fA-F]{4}|\\\\[bfnrt'\"/\\\\]"
45 # double-quoted verbatim string
51 - constant.specialChar: "\\\\\""
53 # single-quoted verbatim string
59 - constant.specialChar: "\\\\'"
64 # This isn't quite right.
67 # beginning with |||, followed by optional whitespace and a new-line.
68 # The next non-blank line must be prefixed with some non-zero length
69 # whitespace W. The block ends at the first subsequent line that does
70 # not begin with W, and it is an error if this line does not contain
71 # some optional whitespace followed by |||.
73 # We need to match ^(\s+) on the first non-blank line after |||
74 # Then we need to skip ^\1.*$
85 - todo: "(TODO|XXX|FIXME):?"
92 - todo: "(TODO|XXX|FIXME):?"