Skip to main content

Module Codegen

Module Codegen 

Source
Expand description

OXC Code Generation module

This module provides code generation from the transformed AST to JavaScript source code.

DIAGNOSTIC LOGGING:

  • Tracks codegen lifecycle and memory access patterns

Structs§

CodegenConfig
Codegen configuration options
CodegenResult
Result of code generation

Statics§

CODEGEN_COUNT 🔒
Generate JavaScript source code from a transformed AST

Functions§

codegen
transform_static_class_properties 🔒
Post-process generated JavaScript to match VSCode’s static class property format. Converts static x = expr; into static { this.x = expr; }. This is needed because OXC 0.48’s class properties plugin does not emit legacy static initializer blocks by default.
write_output
Write the generated code to a file