Skip to content

Commit 4f1813c

Browse files
Copilotjackfirth
andcommitted
Add documentation for expander property preservation
Explain why we need to manually extract and preserve expander-added properties like 'class-body, which affect refactoring rule matching. Co-authored-by: jackfirth <[email protected]>
1 parent 844d483 commit 4f1813c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

private/analysis.rkt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,10 @@
222222
#:into into-list))
223223

224224
;; Extract expander-added properties from visits
225-
;; Known expander properties that need to be preserved
225+
;; We need to preserve certain properties that the expander adds during visits,
226+
;; such as 'class-body which marks syntax inside a class body and affects
227+
;; which refactoring rules can be applied. These properties are not captured
228+
;; by expansion analyzers and must be manually extracted from visited syntax.
226229
(define expander-property-keys '(class-body))
227230
(define expander-property-entries
228231
(for*/list ([(path visit) (in-hash most-recent-visits-by-original-path)]

0 commit comments

Comments
 (0)