mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
fix top level def
This commit is contained in:
parent
851f472167
commit
e83cb0d027
6 changed files with 31 additions and 28 deletions
|
@ -99,12 +99,12 @@ pub fn parse_package_part<'a>(arena: &'a Bump, mut state: State<'a>) -> ParseRes
|
|||
|
||||
state = state.advance_without_indenting(bytes_parsed)?;
|
||||
} else {
|
||||
let progress = Progress::from_bool(!part_buf.is_empty());
|
||||
let progress = Progress::progress_when(!part_buf.is_empty());
|
||||
return Ok((progress, part_buf.into_bump_str(), state));
|
||||
}
|
||||
}
|
||||
Err(reason) => {
|
||||
let progress = Progress::from_bool(!part_buf.is_empty());
|
||||
let progress = Progress::progress_when(!part_buf.is_empty());
|
||||
return state.fail(progress, reason);
|
||||
}
|
||||
}
|
||||
|
@ -299,7 +299,7 @@ pub fn platform_header<'a>() -> impl Parser<'a, PlatformHeader<'a>> {
|
|||
pub fn module_defs<'a>() -> impl Parser<'a, Vec<'a, Located<Def<'a>>>> {
|
||||
move |a: &'a Bump, s: State<'a>| {
|
||||
// this parses just the defs
|
||||
let defs = zero_or_more!(space0_around(loc(def(0)), 0));
|
||||
let defs = zero_or_more!(space0_around(loc(debug!(def(0))), 0));
|
||||
|
||||
// let result = skip_second!(defs, end_of_file()).parse(a, s);
|
||||
let result = defs.parse(a, s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue