Applies a %ExVEx.Mutation.Shift{} to a token stream produced by
ExVEx.Formula.Tokenizer, rewriting cell and range references so
they continue to point at the same logical cells after the shift.
Rules (matching Excel's structural insert/delete semantics):
A reference is only shifted when the shift applies to its sheet. If the shift's
:sheetisnil, it applies everywhere; if set, only tokens whose:sheetmatches (or isnil, meaning the current sheet) are shifted.Absolute-axis markers (
$) are preserved through the shift but do NOT prevent it — Excel shifts every reference at or below an insert point, including$A$5. The$affects copy-paste semantics, not structural row/column inserts.References above the insertion point (or before the deletion span) are unchanged.
References at or below the insertion point are incremented by the delta.
References inside a deletion span are collapsed to
#REF!(the token'stextis replaced with the error string).
Summary
Functions
@spec apply([ExVEx.Formula.Token.t()], ExVEx.Mutation.Shift.t(), String.t() | nil) :: [ ExVEx.Formula.Token.t() ]