Expand description
fix template interpolation and application.
A fix is a replacement template that interpolates the match’s
metavars — both the captured $VARs and any transform-synthesized
ones — into replacement text. The engine computes one replacement per
match and splices them into the source (format-preserving byte-splice,
the same guarantee as ast.batch_apply).
Structs§
- Applied
Edit - One concrete edit: replace
span’s bytes (before) withreplacement.
Functions§
- interpolate
- Interpolate
$VAR/${VAR}references intemplatefromvars. An unknown reference is left verbatim (so a literal$survives), and$$is an escaped literal dollar sign. - splice
- Apply
editstosourceby byte-splice. Edits are spliced in reverse start order so earlier offsets stay valid; whitespace outside each span is preserved verbatim.