rename_word_call

Function rename_word_call 

Source
pub(crate) fn rename_word_call(src: &str, from: &str, to: &str) -> String
Expand description

Rename <from>(<to>( at every word boundary. Used to alias HLSL builtins that WGSL spells differently (satsaturate, rsqrtinverseSqrt). Differs from a plain replace: a preset local frsqrt = q1 won’t pick up an unwanted frinverseSqrt = q1 rewrite because we require a non-identifier byte (or start of source) to the left of the match.