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
21 lines
576 B
Text
21 lines
576 B
Text
---input---
|
|
@group(0) @binding(5) var texture_external;
|
|
|
|
---tokens---
|
|
'@' Name.Decorator
|
|
'group' Name.Decorator
|
|
'(' Punctuation
|
|
'0' Literal.Number.Integer
|
|
')' Punctuation
|
|
' ' Text.Whitespace
|
|
'@' Name.Decorator
|
|
'binding' Name.Decorator
|
|
'(' Punctuation
|
|
'5' Literal.Number.Integer
|
|
')' Punctuation
|
|
' ' Text.Whitespace
|
|
'var' Keyword.Declaration
|
|
' ' Text.Whitespace
|
|
'texture_external' Name.Builtin
|
|
';' Punctuation
|
|
'\n' Text.Whitespace
|