Expand description
Pass: HLSL array β WGSL array<T, N> lowering (globals + locals).
FunctionsΒ§
- collect_
global_ πarray_ edits - Walk every top-level
Item::GlobalVarwith an array length + InitList and emit one text edit per match. Shared between [lower_array_globals] (the standalone pass) andapply_lowerings(the combined pass used byapply_all). - collect_
local_ πarray_ edits - emit_
expr_ πas_ wgsl - 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.
- span_
includes_ πsemi - Extend a span forward to include the trailing
;(if present). The ASTβs GlobalVar span ends at the name, not the semicolon β for textual replacement we want to swallow the whole declaration.