INNER CODE UNIT · Rust

parse_line

databricks/click · src/command_processor.rs:110

fn parse_line(line: &str) -> Result<(&str, RightExpr<'_>), ClickError> {
    let parser = Parser::new(line);
    for (range, sep, _) in parser {
        match sep {
            '|' | '>' => return build_parser_expr(line, range),
            _ => {}
        }
    }
    Ok((line, RightExpr::None))
}

// see comment on ClickCompleter::new for why a raw pointer is needed
fn get_editor(
    config: rustyconfig::Config,
    hist_path: &Path,
) -> Editor<ClickHelper, DefaultHistory> {
    let mut rl =
        Editor::<ClickHelper, DefaultHistory>::with_config(config).expect("Could not make editor");

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…