You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the 4-parse string-manipulation approach in `transform_angular_file`
with a single-parse edit-based pipeline. All edits (import elision, decorator
removal, namespace import insertion, class definition insertion) are now
collected as span-based `Edit` objects from the original AST and applied in
one `apply_edits()` call.
This eliminates 3 redundant re-parses that were previously needed because
string manipulation invalidated byte offsets after each step.
- Add `import_elision_edits()` returning `Vec<Edit>` in import_elision.rs
- Collect class positions (effective_start, class_body_end) during the
original AST walk instead of re-parsing to find them
- Compute namespace import insertion position from the original AST with
a guard against overlapping import elision edit spans
- Remove Parse 2 (re-parse after import filtering)
- Remove Parse 3 (re-parse after decorator removal)
- Remove Parse 4 (re-parse after namespace insertion)
- Net deletion of ~100 lines
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments