pub fn definition<'input>(
    filemap: &'input FileMap,
) -> (concrete::Definition<'input>, Vec<ParseError>) {
    let mut errors = Vec::new();
    let lexer = Lexer::new(filemap).map(|x| x.map_err(ParseError::from));
    match grammar::parse_Definition(&mut errors, filemap, lexer) {
        Ok(value) => (value, errors),
        Err(err) => {
            errors.push(errors::from_lalrpop(filemap, err));
            (concrete::Definition::Error(filemap.span()), errors)
        }
    }
}
/// Attempt to parse a definition from a source string
Attempt to parse a definition from a source string
Attempt to parse a definition from a source string
pub fn definition<'input>(
    filemap: &'input FileMap,
) -> (concrete::Definition<'input>, Vec<ParseError>) {
    let mut errors = Vec::new();
    let lexer = Lexer::new(filemap).map(|x| x.map_err(ParseError::from));
    match grammar::parse_Definition(&mut errors, filemap, lexer) {
        Ok(value) => (value, errors),
        Err(err) => {
            errors.push(errors::from_lalrpop(filemap, err));
            (concrete::Definition::Error(filemap.span()), errors)
        }
    }
}
pub fn definition < ' input > ( filemap : & ' input FileMap , ) -> ( concrete :: Definition < ' input > , Vec < ParseError > ) { let mut errors = Vec :: new ( ) ; let lexer = Lexer :: new ( filemap ) . map ( | x | x . map_err ( ParseError :: from ) ) ; match grammar :: parse_Definition ( & mut errors , filemap , lexer ) { Ok ( value ) => ( value , errors ) , Err ( err ) => { errors . push ( errors :: from_lalrpop ( filemap , err ) ) ; ( concrete :: Definition :: Error ( filemap . span ( ) ) , errors ) } } }
Attempt to parse a definition from a source string
Attempt to parse a definition from a source string
filemap
&'input FileMap
filemap
&'input FileMap