Debian Codegraph @

tests/snippets/wgsl/const-numbers.txt

raw
1 ---input---
2 const a = 0;
3 const au = 0u;
4 const ai = 0i;
5 const b = 12345;
6 const bu = 12345u;
7 const bi= 12345i;
8 const c = 0x0;
9 const cu = 0x0u;
10 const ci = 0x0i;
11 const d = 0x12345;
12 const di = 0x12345i;
13 const du = 0x12345u;
14 const eh = 0h;
15 const ef = 0f;
16 const f = 1.;
17 const fh = 1.h;
18 const ff = 1.f;
19 const g = .1;
20 const gh = .1h;
21 const gf = .1f;
22 const g = 1e1;
23 const gh = 1e1h;
24 const gf = 1e1f;
25 const h = 1e+1;
26 const hh = 1e+1h;
27 const hf = 1e+1f;
28 const i = 1e-1;
29 const ih = 1e-1h;
30 const if = 1e-1f;
31 const j = 1.0e+1;
32 const jh = 1.0e+1h;
33 const jf= 1.0e+1f;
34 const k = 1.0e-1;
35 const kh = 1.0e-1h;
36 const kf= 1.0e-1f;
37 const l = 0x1p1;
38 const lh = 0x1p1h;
39 const lf = 0x1p1f;
40 const m = 0x1p+1;
41 const mh = 0x1p+1h;
42 const mf = 0x1p+1f;
43 const n = 0x1p-1;
44 const nh = 0x1p-1h;
45 const nf = 0x1p-1f;
46 const o = 0x1.p1;
47 const oh = 0x1.p1h;
48 const of = 0x1.p1f;
49 const p = 0x.1p1;
50 const ph = 0x.1p1h;
51 const pf = 0x.1p1f;
52
53 ---tokens---
54 'const' Keyword.Declaration
55 ' ' Text.Whitespace
56 'a' Name
57 ' ' Text.Whitespace
58 '=' Operator
59 ' ' Text.Whitespace
60 '0' Literal.Number.Integer
61 ';' Punctuation
62 '\n' Text.Whitespace
63
64 'const' Keyword.Declaration
65 ' ' Text.Whitespace
66 'au' Name
67 ' ' Text.Whitespace
68 '=' Operator
69 ' ' Text.Whitespace
70 '0u' Literal.Number.Integer
71 ';' Punctuation
72 '\n' Text.Whitespace
73
74 'const' Keyword.Declaration
75 ' ' Text.Whitespace
76 'ai' Name
77 ' ' Text.Whitespace
78 '=' Operator
79 ' ' Text.Whitespace
80 '0i' Literal.Number.Integer
81 ';' Punctuation
82 '\n' Text.Whitespace
83
84 'const' Keyword.Declaration
85 ' ' Text.Whitespace
86 'b' Name
87 ' ' Text.Whitespace
88 '=' Operator
89 ' ' Text.Whitespace
90 '12345' Literal.Number.Integer
91 ';' Punctuation
92 '\n' Text.Whitespace
93
94 'const' Keyword.Declaration
95 ' ' Text.Whitespace
96 'bu' Name
97 ' ' Text.Whitespace
98 '=' Operator
99 ' ' Text.Whitespace
100 '12345u' Literal.Number.Integer
101 ';' Punctuation
102 '\n' Text.Whitespace
103
104 'const' Keyword.Declaration
105 ' ' Text.Whitespace
106 'bi' Name
107 '=' Operator
108 ' ' Text.Whitespace
109 '12345i' Literal.Number.Integer
110 ';' Punctuation
111 '\n' Text.Whitespace
112
113 'const' Keyword.Declaration
114 ' ' Text.Whitespace
115 'c' Name
116 ' ' Text.Whitespace
117 '=' Operator
118 ' ' Text.Whitespace
119 '0x0' Literal.Number.Hex
120 ';' Punctuation
121 '\n' Text.Whitespace
122
123 'const' Keyword.Declaration
124 ' ' Text.Whitespace
125 'cu' Name
126 ' ' Text.Whitespace
127 '=' Operator
128 ' ' Text.Whitespace
129 '0x0u' Literal.Number.Hex
130 ';' Punctuation
131 '\n' Text.Whitespace
132
133 'const' Keyword.Declaration
134 ' ' Text.Whitespace
135 'ci' Name
136 ' ' Text.Whitespace
137 '=' Operator
138 ' ' Text.Whitespace
139 '0x0i' Literal.Number.Hex
140 ';' Punctuation
141 '\n' Text.Whitespace
142
143 'const' Keyword.Declaration
144 ' ' Text.Whitespace
145 'd' Name
146 ' ' Text.Whitespace
147 '=' Operator
148 ' ' Text.Whitespace
149 '0x12345' Literal.Number.Hex
150 ';' Punctuation
151 '\n' Text.Whitespace
152
153 'const' Keyword.Declaration
154 ' ' Text.Whitespace
155 'di' Name
156 ' ' Text.Whitespace
157 '=' Operator
158 ' ' Text.Whitespace
159 '0x12345i' Literal.Number.Hex
160 ';' Punctuation
161 '\n' Text.Whitespace
162
163 'const' Keyword.Declaration
164 ' ' Text.Whitespace
165 'du' Name
166 ' ' Text.Whitespace
167 '=' Operator
168 ' ' Text.Whitespace
169 '0x12345u' Literal.Number.Hex
170 ';' Punctuation
171 '\n' Text.Whitespace
172
173 'const' Keyword.Declaration
174 ' ' Text.Whitespace
175 'eh' Name
176 ' ' Text.Whitespace
177 '=' Operator
178 ' ' Text.Whitespace
179 '0h' Literal.Number.Float
180 ';' Punctuation
181 '\n' Text.Whitespace
182
183 'const' Keyword.Declaration
184 ' ' Text.Whitespace
185 'ef' Name
186 ' ' Text.Whitespace
187 '=' Operator
188 ' ' Text.Whitespace
189 '0f' Literal.Number.Float
190 ';' Punctuation
191 '\n' Text.Whitespace
192
193 'const' Keyword.Declaration
194 ' ' Text.Whitespace
195 'f' Name
196 ' ' Text.Whitespace
197 '=' Operator
198 ' ' Text.Whitespace
199 '1.' Literal.Number.Float
200 ';' Punctuation
201 '\n' Text.Whitespace
202
203 'const' Keyword.Declaration
204 ' ' Text.Whitespace
205 'fh' Name
206 ' ' Text.Whitespace
207 '=' Operator
208 ' ' Text.Whitespace
209 '1.h' Literal.Number.Float
210 ';' Punctuation
211 '\n' Text.Whitespace
212
213 'const' Keyword.Declaration
214 ' ' Text.Whitespace
215 'ff' Name
216 ' ' Text.Whitespace
217 '=' Operator
218 ' ' Text.Whitespace
219 '1.f' Literal.Number.Float
220 ';' Punctuation
221 '\n' Text.Whitespace
222
223 'const' Keyword.Declaration
224 ' ' Text.Whitespace
225 'g' Name
226 ' ' Text.Whitespace
227 '=' Operator
228 ' ' Text.Whitespace
229 '.1' Literal.Number.Float
230 ';' Punctuation
231 '\n' Text.Whitespace
232
233 'const' Keyword.Declaration
234 ' ' Text.Whitespace
235 'gh' Name
236 ' ' Text.Whitespace
237 '=' Operator
238 ' ' Text.Whitespace
239 '.1h' Literal.Number.Float
240 ';' Punctuation
241 '\n' Text.Whitespace
242
243 'const' Keyword.Declaration
244 ' ' Text.Whitespace
245 'gf' Name
246 ' ' Text.Whitespace
247 '=' Operator
248 ' ' Text.Whitespace
249 '.1f' Literal.Number.Float
250 ';' Punctuation
251 '\n' Text.Whitespace
252
253 'const' Keyword.Declaration
254 ' ' Text.Whitespace
255 'g' Name
256 ' ' Text.Whitespace
257 '=' Operator
258 ' ' Text.Whitespace
259 '1e1' Literal.Number.Float
260 ';' Punctuation
261 '\n' Text.Whitespace
262
263 'const' Keyword.Declaration
264 ' ' Text.Whitespace
265 'gh' Name
266 ' ' Text.Whitespace
267 '=' Operator
268 ' ' Text.Whitespace
269 '1e1h' Literal.Number.Float
270 ';' Punctuation
271 '\n' Text.Whitespace
272
273 'const' Keyword.Declaration
274 ' ' Text.Whitespace
275 'gf' Name
276 ' ' Text.Whitespace
277 '=' Operator
278 ' ' Text.Whitespace
279 '1e1f' Literal.Number.Float
280 ';' Punctuation
281 '\n' Text.Whitespace
282
283 'const' Keyword.Declaration
284 ' ' Text.Whitespace
285 'h' Name
286 ' ' Text.Whitespace
287 '=' Operator
288 ' ' Text.Whitespace
289 '1e+1' Literal.Number.Float
290 ';' Punctuation
291 '\n' Text.Whitespace
292
293 'const' Keyword.Declaration
294 ' ' Text.Whitespace
295 'hh' Name
296 ' ' Text.Whitespace
297 '=' Operator
298 ' ' Text.Whitespace
299 '1e+1h' Literal.Number.Float
300 ';' Punctuation
301 '\n' Text.Whitespace
302
303 'const' Keyword.Declaration
304 ' ' Text.Whitespace
305 'hf' Name
306 ' ' Text.Whitespace
307 '=' Operator
308 ' ' Text.Whitespace
309 '1e+1f' Literal.Number.Float
310 ';' Punctuation
311 '\n' Text.Whitespace
312
313 'const' Keyword.Declaration
314 ' ' Text.Whitespace
315 'i' Name
316 ' ' Text.Whitespace
317 '=' Operator
318 ' ' Text.Whitespace
319 '1e-1' Literal.Number.Float
320 ';' Punctuation
321 '\n' Text.Whitespace
322
323 'const' Keyword.Declaration
324 ' ' Text.Whitespace
325 'ih' Name
326 ' ' Text.Whitespace
327 '=' Operator
328 ' ' Text.Whitespace
329 '1e-1h' Literal.Number.Float
330 ';' Punctuation
331 '\n' Text.Whitespace
332
333 'const' Keyword.Declaration
334 ' ' Text.Whitespace
335 'if' Keyword
336 ' ' Text.Whitespace
337 '=' Operator
338 ' ' Text.Whitespace
339 '1e-1f' Literal.Number.Float
340 ';' Punctuation
341 '\n' Text.Whitespace
342
343 'const' Keyword.Declaration
344 ' ' Text.Whitespace
345 'j' Name
346 ' ' Text.Whitespace
347 '=' Operator
348 ' ' Text.Whitespace
349 '1.0e+1' Literal.Number.Float
350 ';' Punctuation
351 '\n' Text.Whitespace
352
353 'const' Keyword.Declaration
354 ' ' Text.Whitespace
355 'jh' Name
356 ' ' Text.Whitespace
357 '=' Operator
358 ' ' Text.Whitespace
359 '1.0e+1h' Literal.Number.Float
360 ';' Punctuation
361 '\n' Text.Whitespace
362
363 'const' Keyword.Declaration
364 ' ' Text.Whitespace
365 'jf' Name
366 '=' Operator
367 ' ' Text.Whitespace
368 '1.0e+1f' Literal.Number.Float
369 ';' Punctuation
370 '\n' Text.Whitespace
371
372 'const' Keyword.Declaration
373 ' ' Text.Whitespace
374 'k' Name
375 ' ' Text.Whitespace
376 '=' Operator
377 ' ' Text.Whitespace
378 '1.0e-1' Literal.Number.Float
379 ';' Punctuation
380 '\n' Text.Whitespace
381
382 'const' Keyword.Declaration
383 ' ' Text.Whitespace
384 'kh' Name
385 ' ' Text.Whitespace
386 '=' Operator
387 ' ' Text.Whitespace
388 '1.0e-1h' Literal.Number.Float
389 ';' Punctuation
390 '\n' Text.Whitespace
391
392 'const' Keyword.Declaration
393 ' ' Text.Whitespace
394 'kf' Name
395 '=' Operator
396 ' ' Text.Whitespace
397 '1.0e-1f' Literal.Number.Float
398 ';' Punctuation
399 '\n' Text.Whitespace
400
401 'const' Keyword.Declaration
402 ' ' Text.Whitespace
403 'l' Name
404 ' ' Text.Whitespace
405 '=' Operator
406 ' ' Text.Whitespace
407 '0x1p1' Literal.Number.Float
408 ';' Punctuation
409 '\n' Text.Whitespace
410
411 'const' Keyword.Declaration
412 ' ' Text.Whitespace
413 'lh' Name
414 ' ' Text.Whitespace
415 '=' Operator
416 ' ' Text.Whitespace
417 '0x1p1h' Literal.Number.Float
418 ';' Punctuation
419 '\n' Text.Whitespace
420
421 'const' Keyword.Declaration
422 ' ' Text.Whitespace
423 'lf' Name
424 ' ' Text.Whitespace
425 '=' Operator
426 ' ' Text.Whitespace
427 '0x1p1f' Literal.Number.Float
428 ';' Punctuation
429 '\n' Text.Whitespace
430
431 'const' Keyword.Declaration
432 ' ' Text.Whitespace
433 'm' Name
434 ' ' Text.Whitespace
435 '=' Operator
436 ' ' Text.Whitespace
437 '0x1p+1' Literal.Number.Float
438 ';' Punctuation
439 '\n' Text.Whitespace
440
441 'const' Keyword.Declaration
442 ' ' Text.Whitespace
443 'mh' Name
444 ' ' Text.Whitespace
445 '=' Operator
446 ' ' Text.Whitespace
447 '0x1p+1h' Literal.Number.Float
448 ';' Punctuation
449 '\n' Text.Whitespace
450
451 'const' Keyword.Declaration
452 ' ' Text.Whitespace
453 'mf' Name
454 ' ' Text.Whitespace
455 '=' Operator
456 ' ' Text.Whitespace
457 '0x1p+1f' Literal.Number.Float
458 ';' Punctuation
459 '\n' Text.Whitespace
460
461 'const' Keyword.Declaration
462 ' ' Text.Whitespace
463 'n' Name
464 ' ' Text.Whitespace
465 '=' Operator
466 ' ' Text.Whitespace
467 '0x1p-1' Literal.Number.Float
468 ';' Punctuation
469 '\n' Text.Whitespace
470
471 'const' Keyword.Declaration
472 ' ' Text.Whitespace
473 'nh' Name
474 ' ' Text.Whitespace
475 '=' Operator
476 ' ' Text.Whitespace
477 '0x1p-1h' Literal.Number.Float
478 ';' Punctuation
479 '\n' Text.Whitespace
480
481 'const' Keyword.Declaration
482 ' ' Text.Whitespace
483 'nf' Name
484 ' ' Text.Whitespace
485 '=' Operator
486 ' ' Text.Whitespace
487 '0x1p-1f' Literal.Number.Float
488 ';' Punctuation
489 '\n' Text.Whitespace
490
491 'const' Keyword.Declaration
492 ' ' Text.Whitespace
493 'o' Name
494 ' ' Text.Whitespace
495 '=' Operator
496 ' ' Text.Whitespace
497 '0x1.p1' Literal.Number.Float
498 ';' Punctuation
499 '\n' Text.Whitespace
500
501 'const' Keyword.Declaration
502 ' ' Text.Whitespace
503 'oh' Name
504 ' ' Text.Whitespace
505 '=' Operator
506 ' ' Text.Whitespace
507 '0x1.p1h' Literal.Number.Float
508 ';' Punctuation
509 '\n' Text.Whitespace
510
511 'const' Keyword.Declaration
512 ' ' Text.Whitespace
513 'of' Keyword.Reserved
514 ' ' Text.Whitespace
515 '=' Operator
516 ' ' Text.Whitespace
517 '0x1.p1f' Literal.Number.Float
518 ';' Punctuation
519 '\n' Text.Whitespace
520
521 'const' Keyword.Declaration
522 ' ' Text.Whitespace
523 'p' Name
524 ' ' Text.Whitespace
525 '=' Operator
526 ' ' Text.Whitespace
527 '0x.1p1' Literal.Number.Float
528 ';' Punctuation
529 '\n' Text.Whitespace
530
531 'const' Keyword.Declaration
532 ' ' Text.Whitespace
533 'ph' Name
534 ' ' Text.Whitespace
535 '=' Operator
536 ' ' Text.Whitespace
537 '0x.1p1h' Literal.Number.Float
538 ';' Punctuation
539 '\n' Text.Whitespace
540
541 'const' Keyword.Declaration
542 ' ' Text.Whitespace
543 'pf' Name
544 ' ' Text.Whitespace
545 '=' Operator
546 ' ' Text.Whitespace
547 '0x.1p1f' Literal.Number.Float
548 ';' Punctuation
549 '\n' Text.Whitespace