Debian Codegraph @

tests/snippets/wgsl/attribute.txt

raw
1 ---input---
2 @id(0) override x:i32 = 1;
3 @ id(1) override y:i32 = 2;
4 @//comment
5 id(1) override z:i32 = 3;
6 @must_use fn foo() -> i32 { return 32; }
7
8 ---tokens---
9 '@' Name.Decorator
10 'id' Name.Decorator
11 '(' Punctuation
12 '0' Literal.Number.Integer
13 ')' Punctuation
14 ' ' Text.Whitespace
15 'override' Keyword.Declaration
16 ' ' Text.Whitespace
17 'x' Name
18 ':' Punctuation
19 'i32' Name.Builtin
20 ' ' Text.Whitespace
21 '=' Operator
22 ' ' Text.Whitespace
23 '1' Literal.Number.Integer
24 ';' Punctuation
25 '\n' Text.Whitespace
26
27 '@' Name.Decorator
28 ' ' Text.Whitespace
29 'id' Name.Decorator
30 '(' Punctuation
31 '1' Literal.Number.Integer
32 ')' Punctuation
33 ' ' Text.Whitespace
34 'override' Keyword.Declaration
35 ' ' Text.Whitespace
36 'y' Name
37 ':' Punctuation
38 'i32' Name.Builtin
39 ' ' Text.Whitespace
40 '=' Operator
41 ' ' Text.Whitespace
42 '2' Literal.Number.Integer
43 ';' Punctuation
44 '\n' Text.Whitespace
45
46 '@' Name.Decorator
47 '//comment\n' Comment.Single
48
49 'id' Name.Decorator
50 '(' Punctuation
51 '1' Literal.Number.Integer
52 ')' Punctuation
53 ' ' Text.Whitespace
54 'override' Keyword.Declaration
55 ' ' Text.Whitespace
56 'z' Name
57 ':' Punctuation
58 'i32' Name.Builtin
59 ' ' Text.Whitespace
60 '=' Operator
61 ' ' Text.Whitespace
62 '3' Literal.Number.Integer
63 ';' Punctuation
64 '\n' Text.Whitespace
65
66 '@' Name.Decorator
67 'must_use' Name.Decorator
68 ' ' Text.Whitespace
69 'fn' Keyword
70 ' ' Text.Whitespace
71 'foo' Name
72 '(' Punctuation
73 ')' Punctuation
74 ' ' Text.Whitespace
75 '->' Punctuation
76 ' ' Text.Whitespace
77 'i32' Name.Builtin
78 ' ' Text.Whitespace
79 '{' Punctuation
80 ' ' Text.Whitespace
81 'return' Keyword
82 ' ' Text.Whitespace
83 '32' Literal.Number.Integer
84 ';' Punctuation
85 ' ' Text.Whitespace
86 '}' Punctuation
87 '\n' Text.Whitespace