emit_expr_as_wgsl

Function emit_expr_as_wgsl 

Source
fn emit_expr_as_wgsl(e: &Expr, src: &str, expected: WgslType) -> String
Expand description

Emit an HLSL expression as WGSL text — narrow subset, enough for the array-global lowering case where elements are literals or simple arithmetic. Falls back to the raw original text if the expression is outside the supported shape.