diff options
author | Jimmy Zelinskie | 2024-02-12 01:28:52 +0000 |
---|---|---|
committer | GitHub | 2024-02-12 01:28:52 +0000 |
commit | d9f7aaacaf65272dfce092954ec49a78961e8112 (patch) | |
tree | 780f6885391b872fed90617c380258f87c093a87 /runtime/queries/cel | |
parent | 7d8ce1a4000939bb1d1e0a67277f7733735607c7 (diff) |
languages: add CEL, SpiceDB schema language (#9296)
* languages: add CEL language and grammar
* languages: add spicedb schema language
* chore: docgen
* runtime/queries: refine spicedb & cel highlights
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* languages: update spicedb
---------
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Diffstat (limited to 'runtime/queries/cel')
-rw-r--r-- | runtime/queries/cel/highlights.scm | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/runtime/queries/cel/highlights.scm b/runtime/queries/cel/highlights.scm new file mode 100644 index 00000000..ab3bae5a --- /dev/null +++ b/runtime/queries/cel/highlights.scm @@ -0,0 +1,66 @@ +; Operators + +[ + "-" + "!" + "*" + "/" + "&&" + "%" + "+" + "<" + "<=" + "==" + ">" + ">=" + "||" +] @operator + +; Keywords + +[ +"in" +] @keyword + +; Function calls + +(call_expression + function: (identifier) @function) + +(member_call_expression + function: (identifier) @function) + +; Identifiers + +(select_expression + operand: (identifier) @type) + +(select_expression + operand: (select_expression + member: (identifier) @type)) + +(identifier) @variable.other.member + +; Literals + +[ + (double_quote_string_literal) + (single_quoted_string_literal) + (triple_double_quote_string_literal) + (triple_single_quoted_string_literal) +] @string + +[ + (int_literal) + (uint_literal) +] @constant.numeric.integer +(float_literal) @constant.numeric.float + +[ + (true) + (false) +] @constant.builtin.boolean + +(null) @constant.builtin + +(comment) @comment |