Skip to main content

parse_fresh

Function parse_fresh 

Source
pub fn parse_fresh(
    working_set: &mut StateWorkingSet<'_>,
    fname: Option<&str>,
    contents: &[u8],
    scoped: bool,
) -> Arc<Block> 
Expand description

Like parse, but never returns a span-matched cached block.

Required for source / source-env: free variables rebind to new VarIds when let/mut are re-declared, so a block cached by span alone is stale. See https://github.com/nushell/nushell/issues/18515