Skip to main content

lower

Function lower 

Source
pub fn lower(
    func: &FunctionNode<'_>,
    _id: Option<&str>,
    scope_info: &ScopeInfo,
    env: &mut Environment,
) -> Result<HirFunction, CompilerError>
Expand description

Main entry point: lower a function AST node into HIR.

Receives a FunctionNode (discovered by the entrypoint) and lowers it to HIR. The id parameter provides the function name (which may come from the variable declarator rather than the function node itself, e.g. const Foo = () => {}).