-
Notifications
You must be signed in to change notification settings - Fork 0
/
zig.syntax
266 lines (257 loc) · 8.1 KB
/
zig.syntax
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
context default
keyword whole align yellow
keyword whole allowzero yellow
keyword whole anyframe yellow
keyword whole anytype yellow
keyword whole asm yellow
keyword whole async yellow
keyword whole await yellow
keyword whole break yellow
keyword whole catch yellow
keyword whole comptime yellow
keyword whole const yellow
keyword whole continue yellow
keyword whole defer yellow
keyword whole else yellow
keyword whole enum yellow
keyword whole errdefer yellow
keyword whole error yellow
keyword whole export yellow
keyword whole extern yellow
keyword whole fn yellow
keyword whole for yellow
keyword whole if yellow
keyword whole inline yellow
keyword whole noalias yellow
keyword whole nosuspend yellow
keyword whole orelse yellow
keyword whole packed yellow
keyword whole pub yellow
keyword whole resume yellow
keyword whole return yellow
keyword whole struct yellow
keyword whole suspend yellow
keyword whole switch yellow
keyword whole test yellow
keyword whole try yellow
keyword whole union yellow
keyword whole unreachable yellow
keyword whole var yellow
keyword whole volatile yellow
keyword whole while yellow
keyword /// white
keyword //! white
keyword // brown
keyword whole false white
keyword whole true white
keyword whole null white
keyword whole undefined white
# builtin types (primitive)
keyword whole void brightred
keyword whole bool brightred
keyword whole u1 brightred
keyword whole u2 brightred
keyword whole u3 brightred
keyword whole i4 brightred
keyword whole u4 brightred
keyword whole u5 brightred
keyword whole u6 brightred
keyword whole u7 brightred
keyword whole i8 brightred
keyword whole u8 brightred
keyword whole u9 brightred
keyword whole u12 brightred
keyword whole i16 brightred
keyword whole u16 brightred
keyword whole u18 brightred
keyword whole u22 brightred
keyword whole u24 brightred
keyword whole u27 brightred
keyword whole i32 brightred
keyword whole u32 brightred
keyword whole i64 brightred
keyword whole u64 brightred
keyword whole i128 brightred
keyword whole u128 brightred
keyword whole c_short brightred
keyword whole c_ushort brightred
keyword whole c_int brightred
keyword whole c_uint brightred
keyword whole c_long brightred
keyword whole c_ulong brightred
keyword whole c_longlong brightred
keyword whole c_ulonglong brightred
keyword whole c_longdouble brightred
keyword whole f16 brightred
keyword whole f32 brightred
keyword whole f64 brightred
keyword whole f128 brightred
keyword whole isize brightred
keyword whole usize brightred
keyword whole anyopaque brightred
keyword whole anyerror brightred
keyword whole noreturn brightred
keyword whole type brightred
keyword whole comptime_int brightred
keyword whole comptime_float brightred
# operators and punctuation
keyword whole and brightcyan
keyword whole or brightcyan
keyword whole xor brightcyan
keyword whole not brightcyan
keyword \+ brightcyan
keyword - brightcyan
keyword \* brightcyan
keyword / brightcyan
keyword % brightcyan
keyword > brightcyan
keyword < brightcyan
keyword & brightcyan
keyword | brightcyan
keyword ^ brightcyan
keyword ~ brightcyan
keyword = brightcyan
keyword ( brightcyan
keyword ) brightcyan
keyword : brightcyan
keyword ; brightcyan
keyword [ brightcyan
keyword ] brightcyan
keyword { brightcyan
keyword } brightcyan
keyword . brightcyan
keyword , brightcyan
keyword ? brightcyan
keyword ! brightcyan
# numbers
keyword whole \{0123456789\}\[0123456789\] brightgreen
keyword whole \[0123456789\]\.\{0123456789\}\[0123456789\] brightgreen
# builtin functions
keyword whole @This cyan
keyword whole @Type cyan
keyword whole @TypeOf cyan
keyword whole @addWithOverflow cyan
keyword whole @alignCast cyan
keyword whole @alignOf cyan
keyword whole @as cyan
keyword whole @asyncCall cyan
keyword whole @atomicLoad cyan
keyword whole @atomicRmw cyan
keyword whole @atomicStore cyan
keyword whole @bitCast cyan
keyword whole @bitOffsetOf cyan
keyword whole @boolToInt cyan
keyword whole @bitSizeOf cyan
keyword whole @breakpoint cyan
keyword whole @byteSwap cyan
keyword whole @bitReverse cyan
keyword whole @call cyan
keyword whole @ceil cyan
keyword whole @cDefine cyan
keyword whole @cImport cyan
keyword whole @cInclude cyan
keyword whole @clz cyan
keyword whole @cmpxchgStrong cyan
keyword whole @cmpxchgWeak cyan
keyword whole @compileLog cyan
keyword whole @cos cyan
keyword whole @ctz cyan
keyword whole @cUndef cyan
keyword whole @divExact cyan
keyword whole @divFloor cyan
keyword whole @divTrunc cyan
keyword whole @embedFile cyan
keyword whole @enumToInt cyan
keyword whole @errorName cyan
keyword whole @errorReturnTrace cyan
keyword whole @errorToInt cyan
keyword whole @errSetCast cyan
keyword whole @exp cyan
keyword whole @exp2 cyan
keyword whole @export cyan
keyword whole @extern cyan
keyword whole @fabs cyan
keyword whole @fence cyan
keyword whole @field cyan
keyword whole @fieldParentPtr cyan
keyword whole @floatCast cyan
keyword whole @floatToInt cyan
keyword whole @floor cyan
keyword whole @frame cyan
keyword whole @Frame cyan
keyword whole @frameAddress cyan
keyword whole @frameSize cyan
keyword whole @hasDecl cyan
keyword whole @hasField cyan
keyword whole @import cyan
keyword whole @intCast cyan
keyword whole @intToEnum cyan
keyword whole @intToError cyan
keyword whole @intToFloat cyan
keyword whole @intToPtr cyan
keyword whole @log cyan
keyword whole @log2 cyan
keyword whole @log10 cyan
keyword whole @maximum cyan
keyword whole @memcpy cyan
keyword whole @memset cyan
keyword whole @minimum cyan
keyword whole @mulAdd cyan
keyword whole @wasmMemorySize cyan
keyword whole @wasmMemoryGrow cyan
keyword whole @mod cyan
keyword whole @mulWithOverFlow cyan
keyword whole @offsetOf cyan
keyword whole @panic cyan
keyword whole @popCount cyan
keyword whole @prefetch cyan
keyword whole @ptrCast cyan
keyword whole @ptrToInt cyan
keyword whole @reduce cyan
keyword whole @rem cyan
keyword whole @round cyan
keyword whole @returnAddress cyan
keyword whole @select cyan
keyword whole @setAlignStack cyan
keyword whole @setCold cyan
keyword whole @setEvalBranchQuota cyan
keyword whole @setFloatMode cyan
keyword whole @setRuntimeSafety cyan
keyword whole @shlExact cyan
keyword whole @shlWithOverFlow cyan
keyword whole @shrExact cyan
keyword whole @shuffle cyan
keyword whole @sin cyan
keyword whole @sizeOf cyan
keyword whole @splat cyan
keyword whole @sqrt cyan
keyword whole @src cyan
keyword whole @subWithOverFlow cyan
keyword whole @tagName cyan
keyword whole @trunc cyan
keyword whole @truncate cyan
keyword whole @typeInfo cyan
keyword whole @typeName cyan
keyword whole @unioninit cyan
keyword whole @intFromEnum cyan
keyword whole @intFromBool cyan
keyword whole @intFromError cyan
keyword whole @intFromFloat cyan
keyword whole @enumFromInt cyan
keyword whole @errorFromInt cyan
keyword whole @floatFromInt cyan
keyword whole @ptrFromInt cyan
keyword whole @intFromPtr cyan
# string literals
context " " green
keyword %\[#0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[L\]\{eEfgGoxX\} brightgreen
keyword %\[0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[hl\]\{diuxX\} brightgreen
keyword \\\{abtnvfr\} brightgreen
context exclusive \\\\ \n green
context ' ' brightgreen
keyword \\' brightgreen
keyword \\\\ brightgreen
# comments
context exclusive /// \n white
context exclusive //! \n white
context exclusive // \n brown