// Helper to deal with the separate branches for parsing SourceText
Helper to deal with the separate branches for parsing SourceText
Helper to deal with the separate branches for parsing SourceText
fn collect_parser_output(&mut self, source: SourceText) -> Vec<Result<StmtMeta, ParserError>> {
        match source {
            SourceText::String(text) => {
                let mut chars = Vec::with_capacity(text.len());
                chars.extend(text.chars().map(Ok));
                let lexer = self.lexer_factory.build(chars.into_iter());
                let parser = Parser::new(self.interner, lexer);
                parser.collect()
            }
            SourceText::File(text) => {
                let lexer = self.lexer_factory.build(text);
                let parser = Parser::new(self.interner, lexer);
                parser.collect()
            },
        }
    }
fn collect_parser_output ( & mut self , source : SourceText ) -> Vec < Result < StmtMeta , ParserError > > { match source { SourceText :: String ( text ) => { let mut chars = Vec :: with_capacity ( text . len ( ) ) ; chars . extend ( text . chars ( ) . map ( Ok ) ) ; let lexer = self . lexer_factory . build ( chars . into_iter ( ) ) ; let parser = Parser :: new ( self . interner , lexer ) ; parser . collect ( ) } SourceText :: File ( text ) => { let lexer = self . lexer_factory . build ( text ) ; let parser = Parser :: new ( self . interner , lexer ) ; parser . collect ( ) } , } }
Helper to deal with the separate branches for parsing SourceText
Helper to deal with the separate branches for parsing SourceText
&mut self
source
SourceText