mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
improve message for outdented then
This commit is contained in:
parent
3907680536
commit
6eab8abe9e
7 changed files with 270 additions and 57 deletions
|
@ -1,5 +1,5 @@
|
|||
use crate::ast::Pattern;
|
||||
use crate::blankspace::{space0_around_e, space0_before_e, space0_e};
|
||||
use crate::blankspace::{space0_around_ee, space0_before_e, space0_e};
|
||||
use crate::ident::{ident, lowercase_ident, Ident};
|
||||
use crate::number_literal::number_literal;
|
||||
use crate::parser::Progress::{self, *};
|
||||
|
@ -133,11 +133,12 @@ fn loc_pattern_in_parens_help<'a>(
|
|||
) -> impl Parser<'a, Located<Pattern<'a>>, PInParens<'a>> {
|
||||
between!(
|
||||
word1(b'(', PInParens::Open),
|
||||
space0_around_e(
|
||||
space0_around_ee(
|
||||
move |arena, state| specialize_ref(PInParens::Syntax, loc_pattern(min_indent))
|
||||
.parse(arena, state),
|
||||
min_indent,
|
||||
PInParens::Space,
|
||||
PInParens::IndentOpen,
|
||||
PInParens::IndentEnd,
|
||||
),
|
||||
word1(b')', PInParens::End)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue