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§
- Caller
Ref - A call-site reference.
- Import
Ref - An import-site reference.
- Planned
Edit - A planned edit to a single file (not yet applied).
- Refactoring
Context - Context available to all refactoring actions.
- Refactoring
Executor - Executes a
RefactoringPlan: writes files, manages shadow snapshots. - Refactoring
Plan - A complete refactoring plan: multiple file edits + warnings.
- References
- Cross-file references to a symbol.