Mutare.Mutator.MacroHost.Target (mutare v0.1.2)

Copy Markdown View Source

One logical fragment and its mutations returned by a macro host.

Build targets with new/4; the struct is opaque so Mutare can extend its internal representation without making every field part of the callback contract.

Summary

Functions

Build a hosted mutation target.

Types

t()

@opaque t()

Functions

new(original, mutants, splice, opts \\ [])

@spec new(
  Macro.t(),
  [Mutare.Mutator.mutation()],
  (Macro.t(), Macro.t() -> Macro.t()),
  keyword()
) :: t()

Build a hosted mutation target.

Options are :wrap, a one-argument branch wrapper, and :range, the source range reported for the site. Mutare defaults :wrap to identity and :range to the original fragment's range.