When a constructor applied to a "as name" without parens is used, the parser fails to parse it.
Found when parsing core.git's src/String/Parser/Advanced.gren:
365 Just { first = Parser parse, rest = remainingParsers } ->
366 when parse s0 is
367 Good _ as step ->
368 step
Minimal repro:
module AsPatternRepro exposing (f)
f x =
when x is
Just y as whole ->
whole
_ ->
x
when parsed:
% ./gren-format/gren-format.sh /tmp/ex.gren
-- FAILED TO PARSE ------------------------------------------------ /tmp/ex.gren
4| f x =
5| when x is
6| Just y as whole ->
^
7| whole
8|
Expected keyword '->'
But with parens, it parses fine:
module AsPatternRepro exposing (f)
f x =
when x is
(Just y) as whole ->
whole
_ ->
x
Surely this is related to #30
When a constructor applied to a "as name" without parens is used, the parser fails to parse it.
Found when parsing core.git's src/String/Parser/Advanced.gren:
Minimal repro:
when parsed:
But with parens, it parses fine:
Surely this is related to #30