Skip to content

Commit

Permalink
doc(es/parallel): Improve document of Parallel (#9896)
Browse files Browse the repository at this point in the history
**Description:**

Document that `after_*` is not used for `visit_*_par`
  • Loading branch information
kdy1 authored Jan 19, 2025
1 parent 134000f commit 9962c9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/friendly-crews-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
swc_core: patch
swc_ecma_utils: patch
---

doc(es/parallel): Improve document of `Parallel`
6 changes: 6 additions & 0 deletions crates/swc_ecma_utils/src/parallel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@ pub trait Parallel: swc_common::sync::Send + swc_common::sync::Sync {
fn merge(&mut self, other: Self);

/// Invoked after visiting all [Stmt]s, possibly in parallel.
///
///
/// Note: `visit_*_par` never calls this.
fn after_stmts(&mut self, _stmts: &mut Vec<Stmt>) {}

/// Invoked after visiting all [ModuleItem]s, possibly in parallel.
///
///
/// Note: `visit_*_par` never calls this.
fn after_module_items(&mut self, _stmts: &mut Vec<ModuleItem>) {}
}

Expand Down

0 comments on commit 9962c9c

Please sign in to comment.