Skip to content

Commit

Permalink
refactor(traverse): rename `TraverseScoping::generate_binding_in_curr…
Browse files Browse the repository at this point in the history
…ent_scope` (oxc-project#6832)

Rename `generate_in_current_scope` to `generate_binding_in_current_scope` - more descriptive name.
  • Loading branch information
overlookmotel authored and Orenbek committed Oct 28, 2024
1 parent ffa1133 commit 93d30eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions crates/oxc_traverse/src/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,13 @@ impl<'a> TraverseCtx<'a> {
///
/// Creates a symbol with the provided name and flags and adds it to the current scope.
///
/// This is a shortcut for `ctx.scoping.generate_in_current_scope`.
pub fn generate_in_current_scope(
/// This is a shortcut for `ctx.scoping.generate_binding_in_current_scope`.
pub fn generate_binding_in_current_scope(
&mut self,
name: Atom<'a>,
flags: SymbolFlags,
) -> BoundIdentifier<'a> {
self.scoping.generate_in_current_scope(name, flags)
self.scoping.generate_binding_in_current_scope(name, flags)
}

/// Generate UID var name.
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_traverse/src/context/scoping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl TraverseScoping {
/// Generate binding in current scope.
///
/// Creates a symbol with the provided name and flags and adds it to the current scope.
pub fn generate_in_current_scope<'a>(
pub fn generate_binding_in_current_scope<'a>(
&mut self,
name: Atom<'a>,
flags: SymbolFlags,
Expand Down

0 comments on commit 93d30eb

Please sign in to comment.