Debian Codegraph @

runtime/queries/move/highlights.scm

raw symbols SCIP
1 (ability) @keyword
2
3 ; ---
4 ; Primitives
5 ; ---
6
7 (address_literal) @constant
8 (bool_literal) @constant.builtin.boolean
9 (num_literal) @constant.numeric
10 [
11 (hex_string_literal)
12 (byte_string_literal)
13 ] @string
14 ; TODO: vector_literal
15
16 [
17 (line_comment)
18 (block_comment)
19 ] @comment
20
21 (annotation) @function.macro
22
23 (borrow_expression "&" @keyword.storage.modifier.ref)
24 (borrow_expression "&mut" @keyword.storage.modifier.mut)
25
26 (identifier) @variable
27
28 (constant_identifier) @constant
29 ((identifier) @constant
30 (#match? @constant "^[A-Z][A-Z\\d_]*$"))
31
32 (function_identifier) @function
33
34 (primitive_type) @type.builtin
35
36 (struct_identifier) @type
37 (pack_expression
38 access: (module_access
39 member: (identifier) @type))
40 (apply_type
41 (module_access
42 member: (identifier) @type))
43 (field_identifier) @variable.other.member
44 ; Field access `o.val` parses as a dot_expression whose access is a plain
45 ; name_expression (not a field_identifier), so capture that field too.
46 (dot_expression
47 access: (name_expression (module_access member: (identifier) @variable.other.member)))
48
49 ; -------
50 ; Functions
51 ; -------
52
53 (call_expression
54 access: (module_access
55 member: (identifier) @function))
56
57 (macro_call_expression
58 access: (macro_module_access
59 access: (module_access
60 member: [(identifier) @function.macro])
61 "!" @function.macro))
62
63 ; -------
64 ; Paths
65 ; -------
66
67 (module_identifier) @namespace
68
69 ; -------
70 ; Operators
71 ; -------
72
73 [
74 "*"
75 "="
76 "!"
77 ] @operator
78 (binary_operator) @operator
79
80 ; ---
81 ; Punctuation
82 ; ---
83
84 [
85 "::"
86 "."
87 ";"
88 ","
89 ] @punctuation.delimiter
90
91 [
92 "("
93 ")"
94 "["
95 "]"
96 "{"
97 "}"
98 ] @punctuation.bracket
99
100 [
101 "abort"
102 ; "acquires"
103 "as"
104 "break"
105 "const"
106 "continue"
107 "copy"
108 "else"
109 "false"
110 "friend"
111 "fun"
112 "has"
113 "if"
114 ; "invariant"
115 "let"
116 "loop"
117 "module"
118 "move"
119 "native"
120 "public"
121 "return"
122 ; "script"
123 "spec"
124 "struct"
125 "true"
126 "use"
127 "while"
128
129 "entry"
130
131 ; "aborts_if"
132 ; "aborts_with"
133 "address"
134 "apply"
135 "assume"
136 ; "axiom"
137 ; "choose"
138 "decreases"
139 ; "emits"
140 "ensures"
141 "except"
142 ; "forall"
143 "global"
144 "include"
145 "internal"
146 "local"
147 ; "min"
148 ; "modifies"
149 "mut"
150 "phantom"
151 "post"
152 "pragma"
153 ; "requires"
154 ; "Self"
155 "schema"
156 "succeeds_if"
157 "to"
158 ; "update"
159 "where"
160 "with"
161 ] @keyword
162