Skip to content

Add API to Traverse for cloning an IdentifierReference multiple times #5020

@overlookmotel

Description

@overlookmotel

See: #5014 (review)

Ideally we should not use TraverseCtx::clone_identifier_reference multiple times for same identifier as it does a lookup of the SymbolId each time. But Dunqing's point that it's very verbose to use TraverseCtx::create_bound_reference_id is reasonable.

Add an API to TraverseCtx to make this short and easy. Something like BoundIdentifier (https://github.com/oxc-project/oxc/blob/main/crates/oxc_transformer/src/helpers/bindings.rs).

Metadata

Metadata

Assignees

Labels

A-transformerArea - Transformer / Transpiler

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions