Skip to main content

compile_outlined_fn

Function compile_outlined_fn 

Source
pub fn compile_outlined_fn(
    codegen_fn: CodegenFunction,
    fn_name: Option<&str>,
    fn_type: ReactFunctionType,
    mode: CompilerOutputMode,
    env_config: &EnvironmentConfig,
    context: &mut ProgramContext,
) -> Result<CodegenFunction, CompilerError>
Expand description

Compile an outlined function’s codegen AST through the full pipeline.

Creates a fresh Environment, builds a synthetic ScopeInfo with unique fake positions for identifier resolution, lowers from AST to HIR, then runs the full compilation pipeline. This mirrors the TS behavior where outlined functions are inserted into the program AST and re-compiled from scratch.