Fix closure indentation and indented-else handling in niche pattern case

This commit is contained in:
Joshua Warner 2024-12-14 17:50:06 -08:00
parent 9f3f99c573
commit 307b0d9ea9
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
11 changed files with 299 additions and 128 deletions

View file

@ -2576,6 +2576,10 @@ where
move |arena, state, _min_indent| parser.parse(arena, state, 0)
}
pub fn capture_line_indent<'a, X: 'a>() -> impl Parser<'a, u32, X> {
move |_arena, state: State<'a>, _min_indent| Ok((NoProgress, state.line_indent(), state))
}
pub fn set_min_indent<'a, P, T, X: 'a>(min_indent: u32, parser: P) -> impl Parser<'a, T, X>
where
P: Parser<'a, T, X>,