pub(crate) fn hoist_expression(
ast_expression: Expr,
state: &mut StateManager,
) -> ExprExpand description
Hoists an expression to the program level by creating a const variable declaration.
This is the Rust equivalent of the JavaScript hoistExpression function.
§Arguments
ast_expression- The expression to hoiststate- The state manager to add the hoisted declaration to
§Returns
An identifier referencing the hoisted variable