mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 04:42:10 +00:00
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); } ``` |
||
|---|---|---|
| .. | ||
| oxc | ||
| oxc_allocator | ||
| oxc_ast | ||
| oxc_ast_macros | ||
| oxc_cfg | ||
| oxc_codegen | ||
| oxc_data_structures | ||
| oxc_diagnostics | ||
| oxc_ecmascript | ||
| oxc_estree | ||
| oxc_index | ||
| oxc_isolated_declarations | ||
| oxc_language_server | ||
| oxc_linter | ||
| oxc_macros | ||
| oxc_mangler | ||
| oxc_minifier | ||
| oxc_module_lexer | ||
| oxc_parser | ||
| oxc_prettier | ||
| oxc_regular_expression | ||
| oxc_semantic | ||
| oxc_sourcemap | ||
| oxc_span | ||
| oxc_syntax | ||
| oxc_transformer | ||
| oxc_traverse | ||
| oxc_wasm | ||