pub fn parse(s: &str) -> ComposerResult<Vec<Annotation>> {
    let parsed = parse_all(CompleteByteSlice(s.as_bytes()))
        .map(|v| v.1)
        .map_err(|_e| Error::new("Parse error"))?;

    parsed.into_iter()
        .flat_map(|parsed| {
            let annotation = parsed.annotation.clone();
            parsed.decls.into_iter()
                .map(move |decl| Annotation::from_parsed(annotation.clone(), decl))
        })
        .collect()
}
/// Parses an annotation file into one or more annotations and declarations.
Parses an annotation file into one or more annotations and declarations.
Parses an annotation file into one or more annotations and declarations .
pub fn parse(s: &str) -> ComposerResult<Vec<Annotation>> {
    let parsed = parse_all(CompleteByteSlice(s.as_bytes()))
        .map(|v| v.1)
        .map_err(|_e| Error::new("Parse error"))?;
    parsed.into_iter()
        .flat_map(|parsed| {
            let annotation = parsed.annotation.clone();
            parsed.decls.into_iter()
                .map(move |decl| Annotation::from_parsed(annotation.clone(), decl))
        })
        .collect()
}
pub fn parse ( s : & str ) -> ComposerResult < Vec < Annotation > > { let parsed = parse_all ( CompleteByteSlice ( s . as_bytes ( ) ) ) . map ( | v | v . 1 ) . map_err ( | _e | Error :: new ( " " ) ) ? ; parsed . into_iter ( ) . flat_map ( | parsed | { let annotation = parsed . annotation . clone ( ) ; parsed . decls . into_iter ( ) . map ( move | decl | Annotation :: from_parsed ( annotation . clone ( ) , decl ) ) } ) . collect ( ) }
Parses an annotation file into one or more annotations and declarations.
Parses an annotation file into one or more annotations and declarations .
s
&str