Expand description
Symbol-aware file editing for normalize.
Provides utilities to locate symbols within source files and apply targeted
text replacements — used by normalize edit to rewrite functions, methods,
and other named constructs without touching the rest of the file.
Structs§
- Container
Body - Location of a container’s body (for prepend/append editing operations)
- Editor
- Editor for structural code modifications
- Symbol
Location - Result of finding a symbol in a file
Functions§
- line_
to_ byte - Convert a 1-based line number to byte offset in content. Clamps to content length for safety (last line may not have trailing newline).
- replace_
all_ words - Replace all whole-word occurrences of
oldintextwithnew_word. Returns the original string unchanged if no occurrences are found.