pub(crate) fn preprocess(input: &str) -> Result<String> {
    let mut result = String::new();
    let file = ZonePreprocessor::parse(Rule::file, input)?.next().unwrap(); // TODO
    for pair in file.into_inner() {
        match pair.as_rule() {
            Rule::tokens => result.push_str(&parse_tokens(pair)?),
            Rule::EOI => (), // Nothing
            _ => unreachable!("Unexpected rule: {:?}", pair.as_rule()),
        }
    }
    Ok(result)
}
/// Preprocess the input to handle braces. Specifically
/// ( and ) allow a record to span multiple lines, so this
/// replaces new lines with spaces when they are within braces.
Preprocess the input to handle braces. Specifically
( and ) allow a record to span multiple lines, so this
replaces new lines with spaces when they are within braces.
Preprocess the input to handle braces . Specifically ( and ) allow a record to span multiple lines so this replaces new lines with spaces when they are within braces .
pub(crate) fn preprocess(input: &str) -> Result<String> {
    let mut result = String::new();
    let file = ZonePreprocessor::parse(Rule::file, input)?.next().unwrap(); // TODO
    for pair in file.into_inner() {
        match pair.as_rule() {
            Rule::tokens => result.push_str(&parse_tokens(pair)?),
            Rule::EOI => (), // Nothing
            _ => unreachable!("Unexpected rule: {:?}", pair.as_rule()),
        }
    }
    Ok(result)
}
pub ( crate ) fn preprocess ( input : & str ) -> Result < String > { let mut result = String :: new ( ) ; let file = ZonePreprocessor :: parse ( Rule :: file , input ) ? . next ( ) . unwrap ( ) ; // TODO for pair in file . into_inner ( ) { match pair . as_rule ( ) { Rule :: tokens => result . push_str ( & parse_tokens ( pair ) ? ) , Rule :: EOI => ( ) , // Nothing _ => unreachable ! ( " " pair as_rule ( ) ) , } } Ok ( result ) }
Preprocess the input to handle braces.
Preprocess the input to handle braces .
input
&str