mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
refactor(transformer): rename BoundIdentifier::new_uid_in_root_scope (#4902)
Just renaming the method.
This commit is contained in:
parent
1e6d0fe7dd
commit
452187a3ca
2 changed files with 6 additions and 2 deletions
|
|
@ -56,7 +56,11 @@ impl<'a> BoundIdentifier<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create `BoundIdentifier` for new binding in root scope
|
/// Create `BoundIdentifier` for new binding in root scope
|
||||||
pub fn new_root_uid(name: &str, flags: SymbolFlags, ctx: &mut TraverseCtx<'a>) -> Self {
|
pub fn new_uid_in_root_scope(
|
||||||
|
name: &str,
|
||||||
|
flags: SymbolFlags,
|
||||||
|
ctx: &mut TraverseCtx<'a>,
|
||||||
|
) -> Self {
|
||||||
let scope_id = ctx.scopes().root_scope_id();
|
let scope_id = ctx.scopes().root_scope_id();
|
||||||
Self::new_uid(name, scope_id, flags, ctx)
|
Self::new_uid(name, scope_id, flags, ctx)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ impl<'a> ReactJsxSource<'a> {
|
||||||
|
|
||||||
fn get_filename_var(&mut self, ctx: &mut TraverseCtx<'a>) -> BoundIdentifier<'a> {
|
fn get_filename_var(&mut self, ctx: &mut TraverseCtx<'a>) -> BoundIdentifier<'a> {
|
||||||
if self.filename_var.is_none() {
|
if self.filename_var.is_none() {
|
||||||
self.filename_var = Some(BoundIdentifier::new_root_uid(
|
self.filename_var = Some(BoundIdentifier::new_uid_in_root_scope(
|
||||||
FILE_NAME_VAR,
|
FILE_NAME_VAR,
|
||||||
SymbolFlags::FunctionScopedVariable,
|
SymbolFlags::FunctionScopedVariable,
|
||||||
ctx,
|
ctx,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue