Skip to main content

Module codegen

Module codegen 

Source
Expand description

Code generation from JS AST to Zig source code. Main module: struct definitions, helpers, public API.

Structs§

CabiExport
Metadata for a C ABI exported function, used by sys crate to generate Rust FFI bindings.

Functions§

collect_binding_names
Collect all leaf identifier names from a BindingPattern. Used by preprocess and infer to register variable names without access paths.
collect_binding_names_with_spans
Collect all leaf identifier names and their spans from a BindingPattern. Used by preprocess for rename edits.
generate
is_simple_binding
Check whether a BindingPattern is just a simple identifier (no destructuring).

Type Aliases§

CodegenResult
Return type for codegen::generate: (zig_code, diagnostics, closure_fns, fn_return_types, cabi_exports, source_map)