aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/authzed/highlights.scm
blob: fb946caafed6ba4e04ea7b3d417ba9621ae3415c (plain) (blame)
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
(identifier) @function

(block
  (relation
    (relation_literal) @function.builtin
    (identifier) @constant))

(block
  (permission
    (permission_literal) @variable.builtin
    (identifier) @type))

; relations
(rel_expression
  (identifier) @property)

(relation
  (rel_expression
    (hash_literal)
    .
    (identifier) @constant))

; permissions
(perm_expression
  (identifier) @property)

(call_expression
  function: (selector_expression
    operand: (identifier) @constant
    field: (field_identifier) @function.method))

(perm_expression
  (stabby) @operator
  .
  (identifier) @function)

; misc
[
  (plus_literal)
  (minus_literal)
  (amp_literal)
  (pipe_literal)
] @operator

[
  (true)
  (false)
] @boolean

(nil) @constant.builtin

[
  (caveat_literal)
  (definition_literal)
] @keyword

[
  (hash_literal)
  (comment)
] @comment