Skip to main content

chain_code

Function chain_code 

Source
pub(crate) fn chain_code(
    krate: &TokenStream,
    fresh: &BTreeMap<String, (Ident, TokenStream)>,
    members: &[&Node],
    needed: &BTreeSet<String>,
    k: usize,
    extra: &[(Ident, bool)],
) -> ChainCode
Expand description

Generate a chain body: the members’ statements in order, with early exits recorded instead of taken. needed lists names used after the chain; extra adds bindings defined outside the members (a loop’s pattern) that should be handed back too.