mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-04 00:54:36 +00:00
no need for spaces between alternatives
allow the following: when animal is Dog|Fox -> "bark"
This commit is contained in:
parent
4fce01b57a
commit
64a562ebc6
1 changed files with 2 additions and 2 deletions
|
@ -890,8 +890,8 @@ pub fn case_branches<'a>(
|
||||||
let original_indent = state.indent_col;
|
let original_indent = state.indent_col;
|
||||||
let indented_more = original_indent + 1;
|
let indented_more = original_indent + 1;
|
||||||
let (loc_first_pattern_alt, state) = zero_or_more!(skip_first!(
|
let (loc_first_pattern_alt, state) = zero_or_more!(skip_first!(
|
||||||
and!(space1(min_indent), char('|')),
|
and!(space0(min_indent), char('|')),
|
||||||
space1_before(loc!(pattern(min_indent)), min_indent)
|
space0_before(loc!(pattern(min_indent)), min_indent)
|
||||||
))
|
))
|
||||||
.parse(arena, state)?;
|
.parse(arena, state)?;
|
||||||
let (spaces_before_arrow, state) = space0(min_indent).parse(arena, state)?;
|
let (spaces_before_arrow, state) = space0(min_indent).parse(arena, state)?;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue