Debian Codegraph @

runtime/queries/vala/highlights.scm

raw symbols SCIP
1 (identifier) @variable
2
3 ; Member access (the trailing name of `obj.field`). Before the @constant and
4 ; method-call rules below so a SCREAMING member stays @constant and a call stays
5 ; @function.
6 (member_access_expression (identifier) @variable.other.member .)
7
8 ; highlights.scm
9
10 ; highlight constants
11 (
12 (member_access_expression (identifier) @constant)
13 (#match? @constant "^[A-Z][A-Z_0-9]*$")
14 )
15
16 (
17 (member_access_expression (member_access_expression) @namespace (identifier) @constant)
18 (#match? @constant "^[A-Z][A-Z_0-9]*$")
19 )
20
21 (comment) @comment
22
23 (type (symbol (_)? @namespace (identifier) @type))
24
25 ; highlight creation methods in object creation expressions
26 (
27 (object_creation_expression (type (symbol (symbol (symbol)? @namespace (identifier) @type) (identifier) @constructor)))
28 (#match? @constructor "^[a-z][a-z_0-9]*$")
29 )
30
31 (unqualified_type (symbol . (identifier) @type))
32 (unqualified_type (symbol (symbol) @namespace (identifier) @type))
33
34 (attribute) @variable.other.member
35 (method_declaration (symbol (symbol) @type (identifier) @function))
36 (method_declaration (symbol (identifier) @function))
37 (local_function_declaration (identifier) @function)
38 (destructor_declaration (identifier) @function)
39 (creation_method_declaration (symbol (symbol (identifier) @type) (identifier) @constructor))
40 (creation_method_declaration (symbol (identifier) @constructor))
41 (enum_declaration (symbol) @type)
42 (enum_value (identifier) @constant)
43 (errordomain_declaration (symbol) @type)
44 (errorcode (identifier) @constant)
45 (constant_declaration (identifier) @constant)
46 (method_call_expression (member_access_expression (identifier) @function))
47 (lambda_expression (identifier) @variable.parameter)
48 (parameter (identifier) @variable.parameter)
49 (property_declaration (symbol (identifier) @variable.other.member))
50 (field_declaration (identifier) @variable)
51 [
52 (this_access)
53 (base_access)
54 (value_access)
55 ] @variable.builtin
56 (boolean) @constant.builtin.boolean
57 (character) @constant.character
58 (integer) @constant.numeric.integer
59 (null) @constant.builtin
60 (real) @constant.numeric.float
61 (regex) @string.regexp
62 (string) @string
63 [
64 (escape_sequence)
65 (string_formatter)
66 ] @string.special
67 (template_string) @string
68 (template_string_expression) @string.special
69 (verbatim_string) @string
70 [
71 "var"
72 "void"
73 ] @type.builtin
74
75 [
76 "abstract"
77 "async"
78 "break"
79 "case"
80 "catch"
81 "class"
82 "const"
83 "construct"
84 "continue"
85 "default"
86 "delegate"
87 "do"
88 "dynamic"
89 "else"
90 "enum"
91 "errordomain"
92 "extern"
93 "finally"
94 "for"
95 "foreach"
96 "get"
97 "if"
98 "inline"
99 "interface"
100 "internal"
101 "lock"
102 "namespace"
103 "new"
104 "out"
105 "override"
106 "owned"
107 "partial"
108 "private"
109 "protected"
110 "public"
111 "ref"
112 "set"
113 "signal"
114 "static"
115 "struct"
116 "switch"
117 "throw"
118 "throws"
119 "try"
120 "unowned"
121 "virtual"
122 "weak"
123 "while"
124 "with"
125 ] @keyword
126
127 [
128 "and"
129 "as"
130 "delete"
131 "in"
132 "is"
133 "not"
134 "or"
135 "sizeof"
136 "typeof"
137 ] @keyword.operator
138
139 "using" @namespace
140
141 (symbol "global::" @namespace)
142
143 (array_creation_expression "new" @keyword.operator)
144 (object_creation_expression "new" @keyword.operator)
145 (argument "out" @keyword.operator)
146 (argument "ref" @keyword.operator)
147
148 [
149 "continue"
150 "do"
151 "for"
152 "foreach"
153 "while"
154 ] @keyword.control.repeat
155
156 [
157 "catch"
158 "finally"
159 "throw"
160 "throws"
161 "try"
162 ] @keyword.control.exception
163
164 [
165 "return"
166 "yield"
167 ] @keyword.control.return
168
169 [
170 "="
171 "=="
172 "+"
173 "+="
174 "-"
175 "-="
176 "++"
177 "--"
178 "|"
179 "|="
180 "&"
181 "&="
182 "^"
183 "^="
184 "/"
185 "/="
186 "*"
187 "*="
188 "%"
189 "%="
190 "<<"
191 "<<="
192 ">>"
193 ">>="
194 "."
195 "?."
196 "->"
197 "!"
198 "!="
199 "~"
200 "??"
201 "?"
202 ":"
203 "<"
204 "<="
205 ">"
206 ">="
207 "||"
208 "&&"
209 "=>"
210 ] @operator
211
212 [
213 ","
214 ";"
215 ] @punctuation.delimiter
216
217 [
218 "("
219 ")"
220 "{"
221 "}"
222 "["
223 "]"
224 ] @punctuation.bracket