A single mutation site emitted by MutagenEx.MutationEnumerator.
Materialises the MutagenEx.Types.mutation_site/0 type. Stored as a
struct (rather than a plain map) so pattern matches catch shape drift at
compile time — the JSON reporter, the mutation runner, and the verifier
all destructure these records.
Fields:
:id— scheme 2 site ID ("{file}:{hash}:{mutator_name}") permutagen.decision.mutation_id_scheme_2.:path— steps from the file AST root to the original node.:function— enclosing definition asMod.fun/arity, ornil.:definition_line— first line of the named runtime function.:file— project-relative source path taken from theMutagenEx.ScopeResolver.Scopeit came from.:line/:column— 1-based source coordinates of the original AST node, for human display only; they do not participate in:id.:mutator— the snake_case atom name of the mutator that produced this site (e.g.:arith).:original_ast— the unmodified AST node, kept so the runner can restore it byte-for-byte at compile time (the state-drift-free restore invariant inmutagen.mutation_enumeration.r6).:mutated_ast— the swapped AST node returned by the mutator'smutate/1.:end_line/:end_column— 1-based EXCLUSIVE end position of theoriginal_astexpression in the parsed source, computed best-effort from AST metadata permutagen.mutation_enumeration.r8. Both arenilwhen the enumerator could not derive an end position (bare-literal sites whose meta comes from a parent operator, some macro-expanded forms). When non-nil, callers slice the verbatimsource_textbetween the leftmost descendant's{line, column}and this{end_line, end_column}to obtain a byte-faithfulbefore_sourcepermutagen.json_schema.r4.:source_span— byte offset and length of the expression in the cached source text, when source reporting is enabled and the span is available.
Summary
Types
@type path_step() :: :form | :left | :right | {:arg, non_neg_integer()} | {:elem, non_neg_integer()}
@type t() :: %MutagenEx.MutationEnumerator.Site{ column: pos_integer(), definition_line: pos_integer() | nil, end_column: pos_integer() | nil, end_line: pos_integer() | nil, execution: :cover | :probe | nil, file: String.t(), function: String.t() | nil, id: String.t(), line: pos_integer(), mutated_ast: Macro.t(), mutator: atom(), original_ast: Macro.t(), path: [path_step()], source_line: pos_integer() | nil, source_span: {non_neg_integer(), pos_integer()} | nil }