summaryrefslogtreecommitdiff
path: root/tests/snippets/wgsl/attribute.txt
blob: 417c9bf6831077a34ad8b9f55bd5c236be3ad325 (plain)
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
---input---
@id(0) override x:i32 = 1;
@ id(1) override y:i32 = 2;
@//comment
id(1) override z:i32 = 3;
@must_use fn foo() -> i32 { return 32; }

---tokens---
'@'           Name.Decorator
'id'          Name.Decorator
'('           Punctuation
'0'           Literal.Number.Integer
')'           Punctuation
' '           Text.Whitespace
'override'    Keyword.Declaration
' '           Text.Whitespace
'x'           Name
':'           Punctuation
'i32'         Name.Builtin
' '           Text.Whitespace
'='           Operator
' '           Text.Whitespace
'1'           Literal.Number.Integer
';'           Punctuation
'\n'          Text.Whitespace

'@'           Name.Decorator
' '           Text.Whitespace
'id'          Name.Decorator
'('           Punctuation
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text.Whitespace
'override'    Keyword.Declaration
' '           Text.Whitespace
'y'           Name
':'           Punctuation
'i32'         Name.Builtin
' '           Text.Whitespace
'='           Operator
' '           Text.Whitespace
'2'           Literal.Number.Integer
';'           Punctuation
'\n'          Text.Whitespace

'@'           Name.Decorator
'//comment\n' Comment.Single

'id'          Name.Decorator
'('           Punctuation
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text.Whitespace
'override'    Keyword.Declaration
' '           Text.Whitespace
'z'           Name
':'           Punctuation
'i32'         Name.Builtin
' '           Text.Whitespace
'='           Operator
' '           Text.Whitespace
'3'           Literal.Number.Integer
';'           Punctuation
'\n'          Text.Whitespace

'@'           Name.Decorator
'must_use'    Name.Decorator
' '           Text.Whitespace
'fn'          Keyword
' '           Text.Whitespace
'foo'         Name
'('           Punctuation
')'           Punctuation
' '           Text.Whitespace
'->'          Punctuation
' '           Text.Whitespace
'i32'         Name.Builtin
' '           Text.Whitespace
'{'           Punctuation
' '           Text.Whitespace
'return'      Keyword
' '           Text.Whitespace
'32'          Literal.Number.Integer
';'           Punctuation
' '           Text.Whitespace
'}'           Punctuation
'\n'          Text.Whitespace