Skip to main content

inline_body

Function inline_body 

Source
pub fn inline_body(
    func: &str,
    args: &[&str],
    indent: usize,
) -> Result<(String, String), String>
Expand description

The body of the single-Return function func spliced in at indent spaces, and the expression its final Return e. yields. Each parameter is bound to its argument: an integer literal is substituted at every whole-word use (a constant needs no register of its own), an argument that is the parameter’s own name needs no binding, and anything else is bound by Let. Refused: an argument count that is not the arity, and any Return other than the body’s last line — its early exit has no inline equivalent.