Debian Codegraph @

runtime/queries/yara/highlights.scm

raw symbols SCIP
1 ; Comments
2 (comment) @comment
3
4 ; Keywords
5 [
6 "global"
7 "import"
8 "private"
9 ] @constant.builtin
10
11 [
12 "rule"
13 ] @function
14
15 [
16 "meta"
17 "strings"
18 "condition"
19 ] @attribute
20
21 ; Operators
22 [
23 "matches"
24 "contains"
25 "icontains"
26 "imatches"
27 "startswith"
28 "istartswith"
29 "endswith"
30 "iendswith"
31 "and"
32 "or"
33 "not"
34 "=="
35 "!="
36 "<"
37 ">"
38 ">="
39 "<="
40 "of"
41 "for"
42 "all"
43 "any"
44 "none"
45 "in"
46 ] @string.special
47
48 ; String modifiers
49 [
50 "wide"
51 "ascii"
52 "nocase"
53 "fullword"
54 "xor"
55 "base64"
56 "base64wide"
57 ] @keyword.storage.modifier
58
59 ; Numbers and sizes
60 (integer_literal) @constant.numeric
61 (size_unit) @constant.numeric
62
63 ; Strings
64 (double_quoted_string) @string
65 (single_quoted_string) @string
66 (escape_sequence) @constant.character.escape
67
68 ; Hex strings
69 (hex_string) @string.special
70 (hex_byte) @constant.numeric
71 (hex_wildcard) @constant.builtin
72 (hex_jump) @constant.numeric
73
74 ; Regular expressions
75 (regex_string) @string.regexp
76 (pattern) @string.regexp
77
78 ; Boolean literals
79 [
80 "true"
81 "false"
82 ] @constant.builtin.boolean
83
84 ; Keywords and special identifiers
85 [
86 "them"
87 "all"
88 "any"
89 "none"
90 ] @keyword.operator
91
92
93 ; String identifiers
94 "$" @string.special.symbol
95 (identifier) @string
96 (string_identifier) @string.special.symbol
97
98 ; Built-ins
99 [
100 (filesize_keyword)
101 (entrypoint_keyword)
102 ] @constant.builtin
103
104 ; Tags
105 (tag_list
106 [(identifier) (tag)] @tag)
107
108 ; Punctuation and delimiters
109 [
110 "="
111 ":"
112 "{"
113 "}"
114 "["
115 "]"
116 "("
117 ")"
118 "#"
119 "@"
120 ".."
121 "|"
122 ","
123 "!"
124 "/"
125 "\""
126 "'"
127 "*"
128 ] @string.special.symbol
129
130 ; Rule names
131 (rule_definition
132 name: (identifier) @string.special)
133
134 ; Meta definitions
135 (meta_definition
136 key: (identifier) @string.special)