fn parse_line(line: &str, ctx: &mut EvaluationContext) -> Result<ClassifiedBlock, ShellError> {
    let line = if let Some(line) = line.strip_suffix('\n') {
        line
    } else {
        line
    };

    let (lite_result, err) = nu_parser::lite_parse(&line, 0);
    if let Some(err) = err {
        return Err(err.into());
    }

    // TODO ensure the command whose examples we're testing is actually in the pipeline
    let classified_block = nu_parser::classify_block(&lite_result, ctx.registry());
    Ok(classified_block)
}
/// Parse and run a nushell pipeline
Parse and run a nushell pipeline
Parse and run a nushell pipeline
fn parse_line(line: &str, ctx: &mut EvaluationContext) -> Result<ClassifiedBlock, ShellError> {
    let line = if let Some(line) = line.strip_suffix('\n') {
        line
    } else {
        line
    };
    let (lite_result, err) = nu_parser::lite_parse(&line, 0);
    if let Some(err) = err {
        return Err(err.into());
    }
    // TODO ensure the command whose examples we're testing is actually in the pipeline
    let classified_block = nu_parser::classify_block(&lite_result, ctx.registry());
    Ok(classified_block)
}
fn parse_line ( line : & str , ctx : & mut EvaluationContext ) -> Result < ClassifiedBlock , ShellError > { let line = if let Some ( line ) = line . strip_suffix ( '\n' ) { line } else { line } ; let ( lite_result , err ) = nu_parser :: lite_parse ( & line , 0 ) ; if let Some ( err ) = err { return Err ( err . into ( ) ) ; } // TODO ensure the command whose examples we're testing is actually in the pipeline let classified_block = nu_parser :: classify_block ( & lite_result , ctx . registry ( ) ) ; Ok ( classified_block ) }
Parse and run a nushell pipeline
Parse and run a nushell pipeline
line
&str
ctx
&mut EvaluationContext
line
&str
ctx
&mut EvaluationContext