File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
crates/swc_ecma_compiler/src Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -526,10 +526,7 @@ impl<'a> VisitMut for CompilerImpl<'a> {
526526 }
527527
528528 fn visit_mut_expr ( & mut self , e : & mut Expr ) {
529- // Phase 1: Process children first to handle nested patterns
530- e. visit_mut_children_with ( self ) ;
531-
532- // Phase 2: Pre-processing - Check and apply transformations that replace the
529+ // Phase 1: Pre-processing - Check and apply transformations that replace the
533530 // expression
534531 let logical_transformed = self . config . includes . contains ( Features :: LOGICAL_ASSIGNMENTS )
535532 && self . transform_logical_assignment ( e) ;
@@ -539,13 +536,16 @@ impl<'a> VisitMut for CompilerImpl<'a> {
539536 && ( self . transform_nullish_coalescing_bin_expr ( e)
540537 || self . transform_nullish_coalescing_assign_expr ( e) ) ;
541538
542- // Phase 3 : Setup for private field expressions
539+ // Phase 2 : Setup for private field expressions
543540 let prev_prepend_exprs = if self . config . includes . contains ( Features :: PRIVATE_IN_OBJECT ) {
544541 Some ( take ( & mut self . es2022_private_field_init_exprs ) )
545542 } else {
546543 None
547544 } ;
548545
546+ // Phase 3: Single recursive visit
547+ e. visit_mut_children_with ( self ) ;
548+
549549 // Phase 4: Post-processing transformations
550550 // Handle private field expressions
551551 if let Some ( prev_prepend_exprs) = prev_prepend_exprs {
You can’t perform that action at this time.
0 commit comments