mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-02 19:32:17 +00:00
Allow parsing when
cases with python-like indentation
This commit is contained in:
parent
d6885bde23
commit
e39a385f5f
5 changed files with 128 additions and 1 deletions
|
@ -2080,7 +2080,7 @@ mod when {
|
|||
/// Parsing when with indentation.
|
||||
fn when_with_indent<'a>() -> impl Parser<'a, u32, EWhen<'a>> {
|
||||
move |arena, state: State<'a>| {
|
||||
let min_indent = state.column();
|
||||
let min_indent = state.line_indent() + 1;
|
||||
parser::keyword_e(keyword::WHEN, EWhen::When)
|
||||
.parse(arena, state)
|
||||
.map(|(progress, (), state)| (progress, min_indent, state))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue