oxc/crates/oxc_semantic
overlookmotel bcdc658bbb
feat(transformer): add TraverseCtx::generate_uid (#3394)
Add `TraverseCtx::generate_uid` method.

This is modelled on Babel's `scope.generateUid()` method. As discussed
in
https://github.com/oxc-project/oxc/discussions/3251#discussioncomment-9416826,
this is required to fix most of the remaining failing tests in
transformer Milestone 1.

I have implemented this to work as closely as possible to Babel, so that
it will generate same output as Babel for our tests. However, as
mentioned in the code comments, this means it's a pretty expensive
function to call. Those code comments suggest 2 ways in which we could
make it much more efficient, but we'd need to decide how we're going to
handle divergence from Babel before we can decide which route to go.

I've left it as a `TODO(improve-on-babel)` for now.
2024-05-24 17:19:02 +08:00
..
examples refactor(semantic/cfg): alias petgraph's NodeIndex as BasicBlockId. (#3380) 2024-05-22 03:09:38 +00:00
src feat(transformer): add TraverseCtx::generate_uid (#3394) 2024-05-24 17:19:02 +08:00
tests refactor: clean up more diagnostics usages 2024-05-12 21:46:03 +08:00
Cargo.toml Release crates v0.13.1 2024-05-22 16:50:30 +08:00
CHANGELOG.md Release crates v0.13.1 2024-05-22 16:50:30 +08:00