/// Parse module header and imports.
///
/// Useful for build planning.
Parse module header and imports.
Useful for build planning.
Parse module header and imports . Useful for build planning .
pub fn parse_header_and_imports(input: &str) -> Result<(Header, Vec<ImportLine>)> {
    let mut pairs = parse_rule(Rule::module_header_and_imports, input)?;
    let header = Header::from_pair(pairs.next().unwrap());
    let imports = pairs.map(ImportLine::from_pair).collect();
    Ok((header, imports))
}
pub fn parse_header_and_imports ( input : & str ) -> Result < ( Header , Vec < ImportLine > ) > { let mut pairs = parse_rule ( Rule :: module_header_and_imports , input ) ? ; let header = Header :: from_pair ( pairs . next ( ) . unwrap ( ) ) ; let imports = pairs . map ( ImportLine :: from_pair ) . collect ( ) ; Ok ( ( header , imports ) ) }
Parse module header and imports.
Parse module header and imports .
input
&str