" Vim syntax file
" Language: rego policy language
" Maintainer: Matt Dunford (zenmatic@gmail.com)
" URL: https://github.com/zenmatic/vim-syntax-rego
" Last Change: 2019 Dec 12
" https://www.openpolicyagent.org/docs/latest/policy-language/
" quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
finish
endif
syn case match
syn keyword regoDirective package import allow deny
syn keyword regoKeywords as default else false not null true with some
syn keyword regoFuncAggregates count sum product max min sort all any
syn match regoFuncArrays "\"
syn keyword regoFuncSets intersection union
syn keyword regoFuncStrings concat /\/ endswith format_int indexof lower replace split sprintf startswith substring trim trim_left trim_prefix trim_right trim_suffix trim_space upper
syn match regoFuncStrings2 "\"
syn match regoFuncStrings3 "\"
syn keyword regoFuncRegex re_match
syn match regoFuncRegex2 "\"
syn match regoFuncGlob "\"
syn match regoFuncUnits "\"
syn keyword regoFuncTypes is_number is_string is_boolean is_array is_set is_object is_null type_name
syn match regoFuncEncoding1 "\<\(base64\|base64url\)\.\(encode\|decode\)\>"
syn match regoFuncEncoding2 "\"
syn match regoFuncEncoding3 "\<\(json\|yaml\)\.\(marshal\|unmarshal\)\>"
syn match regoFuncTokenSigning "\"
syn match regoFuncTokenVerification "\"
syn match regoFuncTime "\