Commit e5f46c0
committed
refactor: fix span handling in sink_lets and remove_redundant_let_types
Transforms that create new statement wrappers need to preserve source spans
for the rewrite system to extract text during recovery.
Changes:
- Set stmt.span explicitly in transforms when wrapping locals
- Extend Splice for Stmt to include attributes from inner nodes
- Add fallback in rewrite_at_impl for macro-expanded code
Fixes sink_lets and remove_redundant_let_types on libxml2.1 parent f4be910 commit e5f46c0
2 files changed
+76
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
256 | 273 | | |
257 | 274 | | |
258 | 275 | | |
| |||
674 | 691 | | |
675 | 692 | | |
676 | 693 | | |
677 | | - | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
678 | 717 | | |
679 | 718 | | |
680 | 719 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
196 | 207 | | |
197 | 208 | | |
198 | 209 | | |
| |||
415 | 426 | | |
416 | 427 | | |
417 | 428 | | |
418 | | - | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
419 | 443 | | |
420 | 444 | | |
421 | 445 | | |
| |||
514 | 538 | | |
515 | 539 | | |
516 | 540 | | |
| 541 | + | |
517 | 542 | | |
518 | 543 | | |
519 | 544 | | |
| |||
523 | 548 | | |
524 | 549 | | |
525 | 550 | | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
526 | 559 | | |
527 | 560 | | |
528 | 561 | | |
| |||
0 commit comments