Merge branch 'trunk' into ir-cleanup

This commit is contained in:
Folkert de Vries 2021-03-25 15:08:54 +01:00 committed by GitHub
commit 5f36da98ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 1200 additions and 1001 deletions

View file

@ -360,6 +360,7 @@ impl<'a> SyntaxError<'a> {
pub fn into_parse_problem(
self,
filename: std::path::PathBuf,
prefix: &'a str,
bytes: &'a [u8],
) -> ParseProblem<'a, SyntaxError<'a>> {
ParseProblem {
@ -368,6 +369,7 @@ impl<'a> SyntaxError<'a> {
problem: self,
filename,
bytes,
prefix,
}
}
}
@ -680,6 +682,8 @@ pub struct ParseProblem<'a, T> {
pub problem: T,
pub filename: std::path::PathBuf,
pub bytes: &'a [u8],
/// prefix is usually the header (for parse problems in the body), or empty
pub prefix: &'a str,
}
pub trait Parser<'a, Output, Error> {