fix problem with spaces in patterns

This commit is contained in:
Folkert 2021-02-01 14:39:18 +01:00
parent ea05561d85
commit 4524012b2c
2 changed files with 21 additions and 1 deletions

View file

@ -1082,7 +1082,10 @@ fn loc_parse_tag_pattern_arg<'a>(
fn loc_parenthetical_pattern<'a>(min_indent: u16) -> impl Parser<'a, Located<Pattern<'a>>> {
between!(
ascii_char(b'('),
move |arena, state| loc_pattern(min_indent).parse(arena, state),
space0_around(
move |arena, state| loc_pattern(min_indent).parse(arena, state),
min_indent,
),
ascii_char(b')')
)
}