File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -488,6 +488,9 @@ impl ModuleMutVisitor {
488
488
fn enable_nesting_for_function ( & self , body : & mut Box < Function > ) {
489
489
body. visit_mut_children_with ( & mut & mut self . get_nesting_visitor ( ) ) ;
490
490
}
491
+ fn enable_nesting_for_arrow_function ( & self , body : & mut Box < BlockStmtOrExpr > ) {
492
+ body. visit_mut_children_with ( & mut & mut self . get_nesting_visitor ( ) ) ;
493
+ }
491
494
}
492
495
493
496
impl VisitMut for ModuleMutVisitor {
@@ -614,10 +617,12 @@ impl VisitMut for ModuleMutVisitor {
614
617
Some ( init) => {
615
618
match & mut * * init {
616
619
Expr :: Fn ( FnExpr { function, .. } ) => {
620
+ // const Index = function () {}
617
621
self . enable_nesting_for_function ( function) ;
618
622
} ,
619
623
Expr :: Arrow ( ArrowExpr { body, .. } ) => {
620
- // Todo: support arrow funciton
624
+ // const Index = () => {}
625
+ self . enable_nesting_for_arrow_function ( body) ;
621
626
} ,
622
627
_ => ( )
623
628
}
You can’t perform that action at this time.
0 commit comments