mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-21 20:34:08 +00:00
Merge branch 'trunk' into ir-cleanup
This commit is contained in:
commit
5f36da98ee
33 changed files with 1200 additions and 1001 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue