Debian Codegraph @

runtime/queries/circom/highlights.scm

raw symbols SCIP
1 ; identifiers
2 ; -----------
3 (identifier) @variable
4
5 ; Pragma
6 ; -----------
7 (pragma_directive) @keyword.directive
8
9 ; Include
10 ; -----------
11 (include_directive) @keyword.directive
12
13 ; Literals
14 ; --------
15 (string) @string
16 (int_literal) @constant.numeric.integer
17 (comment) @comment
18
19 ; Definitions
20 ; -----------
21 (function_definition
22 name: (identifier) @keyword.function)
23
24 (template_definition
25 name: (identifier) @keyword.function)
26
27 ; Use constructor coloring for special functions
28 (main_component_definition) @constructor
29
30 ; Invocations
31 (call_expression . (identifier) @function)
32
33 ; Function parameters
34 (parameter name: (identifier) @variable.parameter)
35
36 ; Members
37 (member_expression property: (property_identifier) @variable.other.member)
38
39 ; Tokens
40 ; -------
41
42 ; Keywords
43 [
44 "signal"
45 "var"
46 "component"
47 ] @keyword.storage.type
48
49 [ "include" ] @keyword.control.import
50
51 [
52 "public"
53 "input"
54 "output"
55 ] @keyword.storage.modifier
56
57 [
58 "for"
59 "while"
60 ] @keyword.control.repeat
61
62 [
63 "if"
64 "else"
65 ] @keyword.control.conditional
66
67 [
68 "return"
69 ] @keyword.control.return
70
71 [
72 "function"
73 "template"
74 ] @keyword.function
75
76 ; Punctuation
77 [
78 "("
79 ")"
80 "["
81 "]"
82 "{"
83 "}"
84 ] @punctuation.bracket
85
86 [
87 "."
88 ","
89 ";"
90 ] @punctuation.delimiter
91
92 ; Operators
93 ; https://docs.circom.io/circom-language/basic-operators
94 [
95 "="
96 "?"
97 "&&"
98 "||"
99 "!"
100 "<"
101 ">"
102 "<="
103 ">="
104 "=="
105 "!="
106 "+"
107 "-"
108 "*"
109 "**"
110 "/"
111 "\\"
112 "%"
113 "+="
114 "-="
115 "*="
116 "**="
117 "/="
118 "\\="
119 "%="
120 "++"
121 "--"
122 "&"
123 "|"
124 "~"
125 "^"
126 ">>"
127 "<<"
128 "&="
129 "|="
130 ; "\~=" ; bug, uncomment and circom will not highlight
131 "^="
132 ">>="
133 "<<="
134 ] @operator
135
136 [
137 "<=="
138 "==>"
139 "<--"
140 "-->"
141 "==="
142 ] @operator