mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
substitute either!
This commit is contained in:
parent
89dcff29e4
commit
00440f350c
2 changed files with 8 additions and 2 deletions
|
@ -1669,8 +1669,11 @@ fn ident_etc_help<'a>(min_indent: u16) -> impl Parser<'a, Expr<'a>, EExpr<'a>> {
|
|||
// The = might be because someone is trying to use Elm or Haskell
|
||||
// syntax for defining functions, e.g. `foo a b = ...` - so give a nice error!
|
||||
optional(and!(
|
||||
backtrackable(space0_e(min_indent, EExpr::Space, EExpr::IndentEquals,)),
|
||||
either!(equals_with_indent_help(), colon_with_indent_help())
|
||||
backtrackable(space0_e(min_indent, EExpr::Space, EExpr::IndentEquals)),
|
||||
one_of![
|
||||
map!(equals_with_indent_help(), Either::First),
|
||||
map!(colon_with_indent_help(), Either::Second),
|
||||
]
|
||||
))
|
||||
)
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue