mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 12:51:57 +00:00
refactor(traverse): BoundIdentifier methods only take &TraverseCtx (#6811)
These methods don't require a `&mut TraverseCtx`, as they only call methods on `AstBuilder`.
This commit is contained in:
parent
55c07f2d4c
commit
47bc36832c
1 changed files with 2 additions and 2 deletions
|
|
@ -47,12 +47,12 @@ impl<'a> BoundIdentifier<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create `BindingIdentifier` for this binding
|
/// Create `BindingIdentifier` for this binding
|
||||||
pub fn create_binding_identifier(&self, ctx: &mut TraverseCtx<'a>) -> BindingIdentifier<'a> {
|
pub fn create_binding_identifier(&self, ctx: &TraverseCtx<'a>) -> BindingIdentifier<'a> {
|
||||||
ctx.ast.binding_identifier_with_symbol_id(SPAN, self.name.clone(), self.symbol_id)
|
ctx.ast.binding_identifier_with_symbol_id(SPAN, self.name.clone(), self.symbol_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create `BindingPattern` for this binding
|
/// Create `BindingPattern` for this binding
|
||||||
pub fn create_binding_pattern(&self, ctx: &mut TraverseCtx<'a>) -> BindingPattern<'a> {
|
pub fn create_binding_pattern(&self, ctx: &TraverseCtx<'a>) -> BindingPattern<'a> {
|
||||||
let ident = self.create_binding_identifier(ctx);
|
let ident = self.create_binding_identifier(ctx);
|
||||||
let binding_pattern_kind = ctx.ast.binding_pattern_kind_from_binding_identifier(ident);
|
let binding_pattern_kind = ctx.ast.binding_pattern_kind_from_binding_identifier(ident);
|
||||||
ctx.ast.binding_pattern(binding_pattern_kind, NONE, false)
|
ctx.ast.binding_pattern(binding_pattern_kind, NONE, false)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue