Skip to main content

Crate normalize_refactor

Crate normalize_refactor 

Source
Expand description

Refactoring engine — composable semantic actions for code transformations.

Three layers:

  • Actions (actions.rs): Pure query and mutation primitives
  • Recipes (rename.rs, future: move.rs, extract.rs): Compositions of actions
  • Executor (RefactoringExecutor): Shared apply/dry-run/shadow logic

Modules§

actions
Semantic actions: query and mutation primitives for refactoring recipes.
add_parameter
Add-parameter recipe: insert a new parameter into a function signature and update all call sites.
inline_function
Inline-function recipe: replace a single-use function’s call site with its body.
inline_variable
Inline-variable recipe: replace all uses of a variable with its initializer and remove the binding.
introduce_variable
Introduce-variable recipe: extract an expression at a given range into a named variable binding.
move_item
Move recipe: relocate a symbol’s definition to another file and rewrite imports.
rename
Rename recipe: composable rename using semantic actions.

Structs§

CallerRef
A call-site reference.
ImportRef
An import-site reference.
PlannedEdit
A planned edit to a single file (not yet applied).
RefactoringContext
Context available to all refactoring actions.
RefactoringExecutor
Executes a RefactoringPlan: writes files, manages shadow snapshots.
RefactoringPlan
A complete refactoring plan: multiple file edits + warnings.
References
Cross-file references to a symbol.