mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
230 lines
5.5 KiB
Plaintext
230 lines
5.5 KiB
Plaintext
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>fileTypes</key>
|
|
<array>
|
|
<string>Rego</string>
|
|
</array>
|
|
<key>name</key>
|
|
<string>Rego</string>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#comment</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#keyword</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#operator</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#head</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#term</string>
|
|
</dict>
|
|
</array>
|
|
<key>repository</key>
|
|
<dict>
|
|
<key>call</key>
|
|
<dict>
|
|
<key>captures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>support.function.any-method.rego</string>
|
|
</dict>
|
|
</dict>
|
|
<key>match</key>
|
|
<string>([a-zA-Z_][a-zA-Z0-9_]*)\(</string>
|
|
<key>name</key>
|
|
<string>meta.function-call.rego</string>
|
|
</dict>
|
|
<key>comment</key>
|
|
<dict>
|
|
<key>captures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.comment.rego</string>
|
|
</dict>
|
|
</dict>
|
|
<key>match</key>
|
|
<string>(#).*$\n?</string>
|
|
<key>name</key>
|
|
<string>comment.line.number-sign.rego</string>
|
|
</dict>
|
|
<key>constant</key>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b(?:true|false|null)\b</string>
|
|
<key>name</key>
|
|
<string>constant.language.rego</string>
|
|
</dict>
|
|
<key>head</key>
|
|
<dict>
|
|
<key>begin</key>
|
|
<string>^([[:alpha:]_][[:alnum:]_]*)</string>
|
|
<key>beginCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>entity.name.function.declaration</string>
|
|
</dict>
|
|
</dict>
|
|
<key>end</key>
|
|
<string>(=|{|\n)</string>
|
|
<key>name</key>
|
|
<string>meta.function.rego</string>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#term</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>keyword</key>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>(^|\s+)(?:(default|not|package|import|as|with|else))\s+</string>
|
|
<key>name</key>
|
|
<string>keyword.other.rego</string>
|
|
</dict>
|
|
<key>number</key>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>(?x: # turn on extended mode
|
|
-? # an optional minus
|
|
(?:
|
|
0 # a zero
|
|
| # ...or...
|
|
[1-9] # a 1-9 character
|
|
\d* # followed by zero or more digits
|
|
)
|
|
(?:
|
|
(?:
|
|
\. # a period
|
|
\d+ # followed by one or more digits
|
|
)?
|
|
(?:
|
|
[eE] # an e character
|
|
[+-]? # followed by an option +/-
|
|
\d+ # followed by one or more digits
|
|
)? # make exponent optional
|
|
)? # make decimal portion optional
|
|
)</string>
|
|
<key>name</key>
|
|
<string>constant.numeric.rego</string>
|
|
</dict>
|
|
<key>operator</key>
|
|
<dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\=|\!\=|>|<|<\=|>\=|\+|-|\*|%|/|\||&|:\=</string>
|
|
<key>name</key>
|
|
<string>keyword.operator.comparison.rego</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>string</key>
|
|
<dict>
|
|
<key>begin</key>
|
|
<string>"</string>
|
|
<key>beginCaptures</key>
|
|
<dict>
|
|
<key>0</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.rego</string>
|
|
</dict>
|
|
</dict>
|
|
<key>end</key>
|
|
<string>"</string>
|
|
<key>endCaptures</key>
|
|
<dict>
|
|
<key>0</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.end.rego</string>
|
|
</dict>
|
|
</dict>
|
|
<key>name</key>
|
|
<string>string.quoted.double.rego</string>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>(?x: # turn on extended mode
|
|
\\ # a literal backslash
|
|
(?: # ...followed by...
|
|
["\\/bfnrt] # one of these characters
|
|
| # ...or...
|
|
u # a u
|
|
[0-9a-fA-F]{4} # and four hex digits
|
|
)
|
|
)</string>
|
|
<key>name</key>
|
|
<string>constant.character.escape.rego</string>
|
|
</dict>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\\.</string>
|
|
<key>name</key>
|
|
<string>invalid.illegal.unrecognized-string-escape.rego</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>term</key>
|
|
<dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#constant</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#string</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#number</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#call</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#variable</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>variable</key>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b[[:alpha:]_][[:alnum:]_]*\b</string>
|
|
<key>name</key>
|
|
<string>meta.identifier.rego</string>
|
|
</dict>
|
|
</dict>
|
|
<key>scopeName</key>
|
|
<string>source.rego</string>
|
|
<key>uuid</key>
|
|
<string>165D3571-322B-4C57-ABAD-9EB3922FB004</string>
|
|
</dict>
|
|
</plist>
|