// Returns a Vec of parsed Stmts (if no error occurred) or a Vec or errors
Returns a Vec of parsed Stmts (if no error occurred) or a Vec or errors
Returns a Vec of parsed Stmts ( if no error occurred ) or a Vec or errors
pub fn parse_ast(&mut self, source: SourceText) -> Result<Vec<StmtMeta>, Vec<ParserError>> {
        let output = self.collect_parser_output(source);
        if output.iter().any(|r| r.is_err()) {
            Err(output.into_iter().filter_map(|r| r.err()).collect())
        } else {
            Ok(output.into_iter().filter_map(|r| r.ok()).collect())
        }
    }
pub fn parse_ast ( & mut self , source : SourceText ) -> Result < Vec < StmtMeta > , Vec < ParserError > > { let output = self . collect_parser_output ( source ) ; if output . iter ( ) . any ( | r | r . is_err ( ) ) { Err ( output . into_iter ( ) . filter_map ( | r | r . err ( ) ) . collect ( ) ) } else { Ok ( output . into_iter ( ) . filter_map ( | r | r . ok ( ) ) . collect ( ) ) } }
Returns a Vec of parsed Stmts (if no error occurred) or a Vec or errors
Returns a Vec of parsed Stmts ( if no error occurred ) or a Vec or errors
&mut self
source
SourceText