mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
allow alternatives on all branches.
This commit is contained in:
parent
a98113c88d
commit
150b75721c
2 changed files with 23 additions and 4 deletions
|
@ -904,10 +904,13 @@ pub fn case_branches<'a>(
|
|||
|
||||
let branch_parser = and!(
|
||||
then(
|
||||
space1_around(loc!(pattern(min_indent)), min_indent),
|
||||
sep_by1(
|
||||
char('|'),
|
||||
space1_around(loc!(pattern(min_indent)), min_indent),
|
||||
),
|
||||
move |_arena, state, loc_pattern| {
|
||||
if state.indent_col == original_indent {
|
||||
Ok((bumpalo::vec![in arena; loc_pattern ], state))
|
||||
Ok((loc_pattern, state))
|
||||
} else {
|
||||
panic!(
|
||||
"TODO additional branch didn't have same indentation as first branch"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue