HLSL: 1) Implement lookahead buffers/stacks for token advance/recede, 2) use it for cast operation.
The grammar now accepts type casts, like "(int)x", but that has to be disambiguated from "(a + b)", needed deeper lookahead and backing up than what existed so far.
This commit is contained in:
parent
080cdc1737
commit
1cc1a2813e
7 changed files with 190 additions and 8 deletions
4
Test/hlsl.cast.frag
Normal file
4
Test/hlsl.cast.frag
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
float4 PixelShaderFunction(float4 input) : COLOR0
|
||||
{
|
||||
return (float4)input + (int4)input + (float4)1.198;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue