oxc/crates
overlookmotel 3b99fe6d59 refactor(traverse): move generate_binding to TraverseScoping (#6831)
Follow-up after #6830.

Now that `generate_binding` doesn't need access to `AstBuilder`, it can move into `TraverseScoping`.

Occasionally this is helpful when you need to borrows 2 parts of `TraverseCtx` simultaneously. e.g.:

```rs
// This fails to compile because we try to mutably borrow `TraverseCtx`
// while it's already borrowed
if let Ancestor::ProgramBody(body) = ctx.parent() {
    //                               ^^^ immutable borrow
    let binding = ctx.generate_binding(name, scope_id, flags);
    //            ^^^ mutable borrow
}

// Borrow-checker allows this because we borrow fields of `TraverseCtx` separately
if let Ancestor::ProgramBody(body) = ctx.ancestry.parent() {
    let binding = ctx.scoping.generate_binding(name, scope_id, flags);
}
```
2024-10-24 06:19:39 +00:00
..
oxc release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_allocator release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_ast release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_ast_macros release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_cfg release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_codegen release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_data_structures release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_diagnostics release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_ecmascript release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_estree release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_index release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_isolated_declarations release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_language_server fix(oxc_language_server): correct diagnostic link (#6765) 2024-10-22 06:23:54 -04:00
oxc_linter docs(linter): add schema to config examples (#6838) 2024-10-24 08:44:04 +08:00
oxc_macros refactor(linter): add run_on_jest_node to run rules on only jest nodes (#6721) 2024-10-21 02:13:58 +00:00
oxc_mangler release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_minifier release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_module_lexer release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_parser release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_prettier fix(allocator)!: make Vec non-drop (#6623) 2024-10-19 15:43:54 +00:00
oxc_regular_expression release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_semantic release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_sourcemap release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_span release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_syntax release(crates): v0.33.0 (#6843) 2024-10-24 10:29:22 +08:00
oxc_transformer refactor(transformer/typescript): insert assignments after super by StatementInjector (#6654) 2024-10-24 05:14:43 +00:00
oxc_traverse refactor(traverse): move generate_binding to TraverseScoping (#6831) 2024-10-24 06:19:39 +00:00
oxc_wasm chore(semantic, wasm): re-order dependencies in Cargo.toml files (#6657) 2024-10-18 13:40:37 +00:00