* Emit a conditional `cond ? whenTrue : whenFalse` for the target language. * * GLSL has the ternary operator; WGSL does not and uses * `select(false_value, true_value, condition)` instead.
( cond: string, whenTrue: string, whenFalse: string, target?: CompileTarget<Expression> )
| 357 | 'using', |
| 358 | 'virtual', |
| 359 | 'where', |
| 360 | ]); |
| 361 | |
| 362 | /** The reserved-word set for a GPU shader language, or an empty set. */ |
| 363 | function gpuReservedWords(language?: string): ReadonlySet<string> { |
| 364 | if (language === 'wgsl') return WGSL_RESERVED; |
| 365 | if (language === 'glsl') return GLSL_RESERVED; |
| 366 | return new Set(); |
| 367 | } |
| 368 | |
| 369 | /** |
| 370 | * Fail closed (D6) if `id` is a reserved word in the target shader language. |
| 371 | * A user variable / loop index carrying a reserved name would emit source that |
no outgoing calls
no test coverage detected