Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jun 4, 2024
1 parent 9564c91 commit 4920aa6
Showing 1 changed file with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ impl<C: Comments> VisitMut for ServerActions<C> {
let is_action_fn = self.get_action_info(f.function.body.as_mut(), true);

let declared_idents_until = self.declared_idents.len();
let current_names = take(&mut self.names);
self.names.clear();

// Visit children
{
Expand All @@ -448,10 +448,7 @@ impl<C: Comments> VisitMut for ServerActions<C> {
self.in_default_export_decl = old_in_default_export_decl;
}

let mut child_names = self.names.clone();
let mut names = take(&mut self.names);
self.names = current_names;
self.names.append(&mut names);
let mut child_names = take(&mut self.names);

if !is_action_fn {
return;
Expand Down Expand Up @@ -513,7 +510,7 @@ impl<C: Comments> VisitMut for ServerActions<C> {
let is_action_fn = self.get_action_info(f.function.body.as_mut(), true);

let current_declared_idents = self.declared_idents.clone();
let current_names = take(&mut self.names);
self.names.clear();

{
// Visit children
Expand All @@ -535,10 +532,7 @@ impl<C: Comments> VisitMut for ServerActions<C> {
self.in_default_export_decl = old_in_default_export_decl;
}

let mut child_names = self.names.clone();
let mut names = take(&mut self.names);
self.names = current_names;
self.names.append(&mut names);
let mut child_names = take(&mut self.names);

if !is_action_fn {
return;
Expand Down Expand Up @@ -609,7 +603,7 @@ impl<C: Comments> VisitMut for ServerActions<C> {
);

let declared_idents_until = self.declared_idents.len();
let current_names = take(&mut self.names);
self.names.clear();

{
// Visit children
Expand All @@ -636,10 +630,7 @@ impl<C: Comments> VisitMut for ServerActions<C> {
self.in_default_export_decl = old_in_default_export_decl;
}

let mut child_names = self.names.clone();
let mut names = take(&mut self.names);
self.names = current_names;
self.names.append(&mut names);
let mut child_names = take(&mut self.names);

if !is_action_fn {
return;
Expand Down

0 comments on commit 4920aa6

Please sign in to comment.