mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
refactor(transformer): re-order BoundIdentifier methods (#4896)
Pure refactor, no real changes. Just re-order method definitions.
This commit is contained in:
parent
117dff2c47
commit
707a01f438
1 changed files with 9 additions and 9 deletions
|
|
@ -61,6 +61,15 @@ impl<'a> BoundIdentifier<'a> {
|
|||
Self::new_uid(name, scope_id, flags, ctx)
|
||||
}
|
||||
|
||||
/// Create `BindingIdentifier` for this binding
|
||||
pub fn create_binding_identifier(&self) -> BindingIdentifier<'a> {
|
||||
BindingIdentifier {
|
||||
span: SPAN,
|
||||
name: self.name.clone(),
|
||||
symbol_id: Cell::new(Some(self.symbol_id)),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create `IdentifierReference` referencing this binding, which is read from, with dummy `Span`
|
||||
pub fn create_read_reference(&self, ctx: &mut TraverseCtx<'a>) -> IdentifierReference<'a> {
|
||||
self.create_spanned_read_reference(SPAN, ctx)
|
||||
|
|
@ -74,13 +83,4 @@ impl<'a> BoundIdentifier<'a> {
|
|||
) -> IdentifierReference<'a> {
|
||||
ctx.create_bound_reference_id(span, self.name.clone(), self.symbol_id, ReferenceFlag::Read)
|
||||
}
|
||||
|
||||
/// Create `BindingIdentifier` for this binding
|
||||
pub fn create_binding_identifier(&self) -> BindingIdentifier<'a> {
|
||||
BindingIdentifier {
|
||||
span: SPAN,
|
||||
name: self.name.clone(),
|
||||
symbol_id: Cell::new(Some(self.symbol_id)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue