mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-21 20:34:08 +00:00
cleanup
This commit is contained in:
parent
67c68c6b11
commit
e49860c1cd
2 changed files with 3 additions and 196 deletions
|
@ -727,25 +727,6 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
pub fn and_then_with_indent_level<'a, P1, P2, F, Before, After, E>(
|
||||
parser: P1,
|
||||
transform: F,
|
||||
) -> impl Parser<'a, After, E>
|
||||
where
|
||||
P1: Parser<'a, Before, E>,
|
||||
P2: Parser<'a, After, E>,
|
||||
F: Fn(Progress, Before, u16) -> P2,
|
||||
E: 'a,
|
||||
{
|
||||
move |arena, state| {
|
||||
parser
|
||||
.parse(arena, state)
|
||||
.and_then(|(progress, output, next_state)| {
|
||||
transform(progress, output, next_state.indent_col).parse(arena, next_state)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
pub fn then<'a, P1, F, Before, After, E>(parser: P1, transform: F) -> impl Parser<'a, After, E>
|
||||
where
|
||||
P1: Parser<'a, Before, E>,
|
||||
|
@ -1661,17 +1642,6 @@ where
|
|||
loc!(parser)
|
||||
}
|
||||
|
||||
/// For some reason, some usages won't compile unless they use this instead of the macro version
|
||||
#[inline(always)]
|
||||
pub fn map<'a, P, F, Before, After, E>(parser: P, transform: F) -> impl Parser<'a, After, E>
|
||||
where
|
||||
P: Parser<'a, Before, E>,
|
||||
F: Fn(Before) -> After,
|
||||
E: 'a,
|
||||
{
|
||||
map!(parser, transform)
|
||||
}
|
||||
|
||||
/// For some reason, some usages won't compile unless they use this instead of the macro version
|
||||
#[inline(always)]
|
||||
pub fn map_with_arena<'a, P, F, Before, After, E>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue