mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Be more lenient with indentation in record parsing
... and extract a shared helper with collection_trailing_sep_e, thereby resolving some inconsistencies with normal collection parsing. ... and delete some dead code while I'm at it
This commit is contained in:
parent
6bdab37541
commit
07ebc81cba
9 changed files with 202 additions and 225 deletions
|
@ -27,6 +27,15 @@ where
|
|||
)
|
||||
}
|
||||
|
||||
pub fn spaces_around<'a, P, S, E>(parser: P) -> impl Parser<'a, Loc<S>, E>
|
||||
where
|
||||
S: 'a + Spaceable<'a>,
|
||||
P: 'a + Parser<'a, Loc<S>, E>,
|
||||
E: 'a + SpaceProblem,
|
||||
{
|
||||
parser::map_with_arena(and(spaces(), and(parser, spaces())), spaces_around_help)
|
||||
}
|
||||
|
||||
pub fn space0_around_e_no_after_indent_check<'a, P, S, E>(
|
||||
parser: P,
|
||||
indent_before_problem: fn(Position) -> E,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue