Commit bbcd5f8
committed
Fix HLSLParser failing on parenthesized expressions in declarations
The parser rejected valid HLSL like `float2 var = (float2(x,y)) * scalar`
with "expected ';'" errors. When parsing a parenthesized expression, the
loop would break before consuming the closing paren, so subsequent binary
operators were never seen.
Moves end-char consumption into the else block and checks for operators
after consuming the paren, continuing the loop if one is found.
Fixes #9401 parent 014fb59 commit bbcd5f8
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2283 | 2283 | | |
2284 | 2284 | | |
2285 | 2285 | | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + | |
| 2289 | + | |
| 2290 | + | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
2286 | 2300 | | |
2287 | 2301 | | |
2288 | 2302 | | |
| |||
0 commit comments