Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactor(traverse): rename `TraverseScoping::generate_binding_in_curr…
…ent_scope` (#6832)

Rename `generate_in_current_scope` to `generate_binding_in_current_scope` - more descriptive name.
  • Loading branch information
overlookmotel committed Oct 24, 2024
commit a366fae8b7153730311adae879427ac72ac26c03
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