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/address-space.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

72 lines
1.6 KiB
Text

---input---
alias a=ptr<function,i32>;
alias b=ptr<private,i32>;
alias c=ptr<workgroup,i32>;
alias d=ptr<uniform,i32>;
alias e=ptr<storage,i32>;
---tokens---
'alias' Keyword
' ' Text.Whitespace
'a' Name
'=' Operator
'ptr' Name.Builtin
'<' Operator
'function' Name.Builtin
',' Punctuation
'i32' Name.Builtin
'>' Operator
';' Punctuation
'\n' Text.Whitespace
'alias' Keyword
' ' Text.Whitespace
'b' Name
'=' Operator
'ptr' Name.Builtin
'<' Operator
'private' Name.Builtin
',' Punctuation
'i32' Name.Builtin
'>' Operator
';' Punctuation
'\n' Text.Whitespace
'alias' Keyword
' ' Text.Whitespace
'c' Name
'=' Operator
'ptr' Name.Builtin
'<' Operator
'workgroup' Name.Builtin
',' Punctuation
'i32' Name.Builtin
'>' Operator
';' Punctuation
'\n' Text.Whitespace
'alias' Keyword
' ' Text.Whitespace
'd' Name
'=' Operator
'ptr' Name.Builtin
'<' Operator
'uniform' Name.Builtin
',' Punctuation
'i32' Name.Builtin
'>' Operator
';' Punctuation
'\n' Text.Whitespace
'alias' Keyword
' ' Text.Whitespace
'e' Name
'=' Operator
'ptr' Name.Builtin
'<' Operator
'storage' Name.Builtin
',' Punctuation
'i32' Name.Builtin
'>' Operator
';' Punctuation
'\n' Text.Whitespace