Expand description
Shared edit engine: byte-offset conversion, content replacement, syntax validation, and auto-backup orchestration.
Used by write, edit_symbol, edit_match, and batch commands.
Structs§
- DryRun
Result - Result of a dry-run diff computation.
- Write
Result - Result of the write → format → validate pipeline.
Functions§
- auto_
backup - Snapshot the file into the backup store before mutation.
- dry_
run_ diff - Compute a unified diff between original and proposed content, plus syntax validation.
- is_
dry_ run - Extract the
dry_runboolean from request params. - line_
col_ to_ byte - Convert 0-indexed line/col to a byte offset within
source. - replace_
byte_ range - Replace bytes in
[start..end)withreplacement. - validate_
syntax - Validate syntax of a file using a fresh FileParser (D023).
- validate_
syntax_ str - Validate syntax of an in-memory string without touching disk.
- write_
format_ validate - Write content to disk, auto-format, then validate syntax.