Debian Codegraph @

runtime/queries/p/highlights.scm

raw symbols SCIP
1 ; Variables
2 (iden_type
3 name: (identifier) @variable)
4
5 (fun_param
6 name: (identifier) @variable.parameter)
7
8 [
9 "this"
10 ] @variable.builtin
11
12 (named_tuple_access_expr
13 (expr
14 (primitive_expr
15 (identifier)))
16 field: (identifier) @variable.other.member)
17
18 ; Functions
19 (p_fun_decl
20 name: (identifier) @function)
21
22 [
23 "choose"
24 "format"
25 "keys"
26 "values"
27 ] @function.builtin
28
29 ; Comments
30 [
31 (block_comment)
32 (line_comment)
33 ] @comment
34
35 ; Types
36 [
37 "any"
38 "bool"
39 "eventset"
40 "float"
41 "int"
42 "interface"
43 "map"
44 "set"
45 "string"
46 "seq"
47 "data"
48 ] @type.builtin
49
50 ; Type definitions
51 (type_def_decl
52 name: (identifier) @type.definition)
53 (enum_type_def_decl
54 name: (identifier) @type.definition)
55 (event_decl
56 name: (identifier) @type.definition)
57 (impl_machine_decl
58 name: (identifier) @type.definition)
59 (spec_machine_decl
60 name: (identifier) @type.definition)
61 (state_decl
62 name: (identifier) @type.definition)
63
64 (named_type
65 name: (identifier) @type)
66 (state_name
67 state: (identifier) @type)
68 (enum_elem
69 name: (identifier) @type)
70 (non_default_event
71 (identifier) @type)
72 (event_id
73 (identifier) @type)
74
75 ; Keywords
76 [
77 "announce"
78 "as"
79 "assert"
80 "break"
81 "case"
82 "continue"
83 "default"
84 "defer"
85 "do"
86 "entry"
87 "exit"
88 "foreach"
89 "goto"
90 "halt"
91 "ignore"
92 "in"
93 "new"
94 "observes"
95 "on"
96 "print"
97 "raise"
98 "receive"
99 "send"
100 "sizeof"
101 "spec"
102 "start"
103 "state"
104 "var"
105 "param"
106 "pairwise"
107 "wise"
108 "with"
109 ; PVerifier keywords
110 "invariant"
111 "axiom"
112 "is"
113 "inflight"
114 "targets"
115 "sent"
116 "Proof"
117 "prove"
118 "using"
119 "Lemma"
120 "Theorem"
121 "except"
122 "requires"
123 "ensures"
124 "forall"
125 "exists"
126 "init-condition"
127 "pure"
128 "assume"
129 ; module-system-specific keywords
130 ; module-test-implementation declarations
131 "module"
132 "implementation"
133 "test"
134 "refines"
135 ; module constructors
136 "compose"
137 "union"
138 "hidee"
139 "hidei"
140 "rename"
141 "main"
142 ; machine annotations
143 "receives"
144 "sends"
145 ; common keywords
146 "creates"
147 "to"
148 (temperature_hot)
149 (temperature_cold)
150 (null_literal)
151 ] @keyword
152
153 [ "fun" ] @keyword.function
154
155 [
156 "enum"
157 "event"
158 "machine"
159 "type"
160 ] @keyword.storage.type
161
162 [ "while" ] @keyword.control.repeat
163
164 [ "return" ] @keyword.control.return
165
166 [
167 "if"
168 "else"
169 ] @keyword.control.conditional
170
171 ; Literals
172 [ (bool_literal) ] @constant.builtin.boolean
173
174 (int_literal) @constant.numeric.integer
175 (float_literal) @constant.numeric.float
176
177 (string_literal) @string
178
179 ; Symbols / Operators
180 [
181 "$$"
182 "$"
183 "!"
184 "&&"
185 "||"
186 "==>"
187 "<==>"
188 "=="
189 "!="
190 "<="
191 ">="
192 "<"
193 ">"
194 "->"
195 "="
196 "+="
197 "-="
198 "+"
199 "-"
200 "*"
201 "/"
202 "%"
203 ] @operator
204
205 [
206 ":"
207 ";"
208 ","
209 "."
210 ] @punctuation.delimiter
211
212 [
213 "{"
214 "}"
215 "["
216 "]"
217 "("
218 ")"
219 ] @punctuation.bracket