pub(crate) static LOCAL_DECL_REGEX: LazyLock<Regex>Expand description
HLSL typed local declaration, post type-substitution. The whole <TYPE> <decls>; statement is captured; the declarator list is then expanded
into one WGSL var per name. Examples:
f32 gx1 = a; → var gx1: f32 = a;
vec2<f32> uv2; → var uv2: vec2<f32>;
vec3<f32> ret1, neu, crisp; → var ret1: vec3<f32>; var neu: vec3<f32>; var crisp: vec3<f32>;
Anchored to the start of a (multi-line-aware) line so we don’t confuse the
type tokens that appear as function return types or constructor names.
The captured group excludes both ; (the terminator) and { (function
body open brace) — the latter stops the greedy match cold when the
pattern would otherwise swallow a function signature plus part of its
body up to the first ; inside. The closure also calls
is_function_signature for the residual case where the regex still
matches (e.g., one-liner functions).