chroma/lexers/testdata/wgsl.const.numbers.expected
2025-03-22 20:46:00 +13:00

449 lines
18 KiB
Text

[
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"a"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberInteger","value":"0"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"au"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberInteger","value":"0u"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"ai"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberInteger","value":"0i"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"b"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberInteger","value":"12345"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"bu"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberInteger","value":"12345u"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"bi"},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberInteger","value":"12345i"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"c"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberHex","value":"0x0"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"cu"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberHex","value":"0x0u"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"ci"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberHex","value":"0x0i"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"d"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberHex","value":"0x12345"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"di"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberHex","value":"0x12345i"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"du"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberHex","value":"0x12345u"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"eh"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"ef"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"f"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1."},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"fh"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1.h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"ff"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1.f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"g"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":".1"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"gh"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":".1h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"gf"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":".1f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"g"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1e1"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"gh"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1e1h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"gf"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1e1f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1e+1"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"hh"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1e+1h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"hf"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1e+1f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"i"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1e-1"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"ih"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1e-1h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Keyword","value":"if"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1e-1f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"j"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1.0e+1"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"jh"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1.0e+1h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"jf"},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1.0e+1f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"k"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1.0e-1"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"kh"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1.0e-1h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"kf"},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"1.0e-1f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"l"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0x1p1"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"lh"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0x1p1h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"lf"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0x1p1f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0x1p+1"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"mh"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0x1p+1h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"mf"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0x1p+1f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"n"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0x1p-1"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"nh"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0x1p-1h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"nf"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0x1p-1f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"o"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0x1.p1"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"oh"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0x1.p1h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordReserved","value":"of"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0x1.p1f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"p"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0x.1p1"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"ph"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0x.1p1h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"const"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"pf"},
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralNumberFloat","value":"0x.1p1f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"}
]