Expand description
Constrained freeform fragment apply (#2018).
Covers Morph-class jobs (lazy snippets, freeform placement) without a
Morph clone: Morph-style // ... existing code ... markers are stripped,
but placement anchors are required and matching is fail-closed.
Structs§
- Apply
Fragment Spec - Validated apply-fragment request (anchors required; no free guess).
- Desugared
Replace - Fields for building
Operation::Replace/replace_textfrom apply.fragment.
Enums§
- Fragment
Placement - Placement for a cleaned fragment. Exactly one mode must be chosen.
Functions§
- build_
apply_ fragment_ spec - Build a validated spec from raw Morph-style inputs.
- desugar_
to_ replace_ fields - Desugar a validated spec into replace
old+ optional insert_after/before + new text. - desugar_
to_ replace_ operation - Build a plan
crate::plan::Operation::Replacefrom a validated apply.fragment spec. - is_
lazy_ marker_ line - True when a line is a Morph-style lazy placeholder (not real source).
- plan_
apply_ fragment_ to_ replace - Validate raw apply.fragment plan fields and desugar to
Operation::Replace. - strip_
lazy_ markers - Remove Morph-style lazy marker lines; preserve other content and dominant EOL.