From a366fae8b7153730311adae879427ac72ac26c03 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Thu, 24 Oct 2024 11:00:46 +0000 Subject: [PATCH] refactor(traverse): rename `TraverseScoping::generate_binding_in_current_scope` (#6832) Rename `generate_in_current_scope` to `generate_binding_in_current_scope` - more descriptive name. --- crates/oxc_traverse/src/context/mod.rs | 6 +++--- crates/oxc_traverse/src/context/scoping.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/oxc_traverse/src/context/mod.rs b/crates/oxc_traverse/src/context/mod.rs index ca3981ac3cc4e..a767ef925b578 100644 --- a/crates/oxc_traverse/src/context/mod.rs +++ b/crates/oxc_traverse/src/context/mod.rs @@ -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. diff --git a/crates/oxc_traverse/src/context/scoping.rs b/crates/oxc_traverse/src/context/scoping.rs index 9ca509b07b6d9..e2511bf1fac4a 100644 --- a/crates/oxc_traverse/src/context/scoping.rs +++ b/crates/oxc_traverse/src/context/scoping.rs @@ -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,