Compile an expression as a GPU integer argument. * Integer constants emit as plain literals (`200`); other expressions * are wrapped in a cast (`int(...)` or `i32(...)`).
( expr: Expression, compile: (e: Expression) => string, target?: CompileTarget<Expression> )
| 401 | * `return <body>;` — so a `return` anywhere in them is misplaced, including at |
| 402 | * offset 0. |
| 403 | * |
| 404 | * A token scan, deliberately: it reads the source that is actually about to be |
| 405 | * emitted, so it covers every shape (including ones no probe enumerated) |
| 406 | * rather than mirroring the emitter's position rules. `return` is a reserved |
| 407 | * word in both languages (`gpuCheckIdentifier`), so `\breturn\b` cannot match a |
| 408 | * user identifier. |
| 409 | */ |
| 410 | function gpuAssertReturnPlacement( |
| 411 | subject: string, |
| 412 | body: string, |
| 413 | language: string |
| 414 | ): void { |
| 415 | if (!/\breturn\b/.test(body)) return; |
no test coverage detected