blob: e56ffa5a2e074dd2230c9cd9a347f70563f0dd46 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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
131
132
133
134
135
136
137
|
(type_identifier) @type
(identifier) @variable
[
(primitive_type)
(alph_token_id)
] @type.builtin
(var_declaration) @variable
(struct_field
(identifier) @variable.member)
(arg_def
(identifier) @variable.parameter)
(event_field
(identifier) @variable.parameter)
(struct_constructor_field
(identifier) @variable.parameter)
[
(hex_num)
(integer)
(typed_num)
] @number
[
(bool)
(bytes)
(address)
] @constant.builtin
(func_id
[
(identifier)
"!"
] @function)
(annotation
[
"@"
(identifier)
] @attribute)
(map_def
(identifier) @variable.parameter)
"fn" @keyword.function
[
"Contract"
"TxScript"
"Interface"
"AssetScript"
"struct"
"enum"
"event"
"mapping"
] @keyword.type
[
"pub"
"Abstract"
(mutable)
] @keyword.modifier
[
"while"
"for"
] @keyword.repeat
"return" @keyword.return
[
"if"
"else"
] @keyword.conditional
[
"const"
"let"
"emit"
"extends"
"embeds"
"implements"
] @keyword
[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
[
"."
","
":"
";"
] @punctuation.delimiter
[
"="
"->"
(op_byte_vec_add)
(op_add)
(op_sub)
(op_mul)
(op_exp)
(op_mod_exp)
(op_div)
(op_mod)
(op_mod_add)
(op_mod_sub)
(op_mod_mul)
(op_shl)
(op_shr)
(op_bit_and)
(op_xor)
(op_bit_or)
(op_eq)
(op_ne)
(op_lt)
(op_le)
(op_gt)
(op_ge)
(op_and)
(op_or)
(op_not)
] @operator
(line_comment) @comment @spell
|