This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/snippets/wgsl/storage-texture.txt
David Neto 5175d68c87
Lexer for the WebGPU Shading Language (#2386)
See https://w3.org/TR/WGSL

Further work is needed to refine it:
- treat context-dependent names specially
- treat template start and template end tokens specially, perhaps

Fixes: #2388
2023-03-30 11:09:02 +02:00

98 lines
2.8 KiB
Text

---input---
@group(0) @binding(0) var texture_storage_1d<rgba8unorm,write>;
@group(0) @binding(1) var texture_storage_2d<rgba8unorm,write>;
@group(0) @binding(2) var texture_storage_2d_array<rgba8unorm,write>;
@group(0) @binding(3) var texture_storage_3d<rgba8unorm,write>;
---tokens---
'@' Name.Decorator
'group' Name.Decorator
'(' Punctuation
'0' Literal.Number.Integer
')' Punctuation
' ' Text.Whitespace
'@' Name.Decorator
'binding' Name.Decorator
'(' Punctuation
'0' Literal.Number.Integer
')' Punctuation
' ' Text.Whitespace
'var' Keyword.Declaration
' ' Text.Whitespace
'texture_storage_1d' Name.Builtin
'<' Operator
'rgba8unorm' Name.Builtin
',' Punctuation
'write' Name.Builtin
'>' Operator
';' Punctuation
'\n' Text.Whitespace
'@' Name.Decorator
'group' Name.Decorator
'(' Punctuation
'0' Literal.Number.Integer
')' Punctuation
' ' Text.Whitespace
'@' Name.Decorator
'binding' Name.Decorator
'(' Punctuation
'1' Literal.Number.Integer
')' Punctuation
' ' Text.Whitespace
'var' Keyword.Declaration
' ' Text.Whitespace
'texture_storage_2d' Name.Builtin
'<' Operator
'rgba8unorm' Name.Builtin
',' Punctuation
'write' Name.Builtin
'>' Operator
';' Punctuation
'\n' Text.Whitespace
'@' Name.Decorator
'group' Name.Decorator
'(' Punctuation
'0' Literal.Number.Integer
')' Punctuation
' ' Text.Whitespace
'@' Name.Decorator
'binding' Name.Decorator
'(' Punctuation
'2' Literal.Number.Integer
')' Punctuation
' ' Text.Whitespace
'var' Keyword.Declaration
' ' Text.Whitespace
'texture_storage_2d_array' Name.Builtin
'<' Operator
'rgba8unorm' Name.Builtin
',' Punctuation
'write' Name.Builtin
'>' Operator
';' Punctuation
'\n' Text.Whitespace
'@' Name.Decorator
'group' Name.Decorator
'(' Punctuation
'0' Literal.Number.Integer
')' Punctuation
' ' Text.Whitespace
'@' Name.Decorator
'binding' Name.Decorator
'(' Punctuation
'3' Literal.Number.Integer
')' Punctuation
' ' Text.Whitespace
'var' Keyword.Declaration
' ' Text.Whitespace
'texture_storage_3d' Name.Builtin
'<' Operator
'rgba8unorm' Name.Builtin
',' Punctuation
'write' Name.Builtin
'>' Operator
';' Punctuation
'\n' Text.Whitespace