Closed bdukes closed 5 years ago
Thanks for the report! I am finishing up a revamp of the parser which is making it a lot easier to produce specific error messages. So my development build is currently producing:
-- UNEXPECTED COMMA --------------------------------------------------- temp.elm
I got stuck on this comma:
7| , h1 [ class "headline" ] [ text "Hello" ]
^
I do not think I am parsing a list or tuple right now. Try deleting the comma?
Note: If this is supposed to be part of a list, the problem may be a bit
earlier. Perhaps the opening [ is missing? Or perhaps some value in the list has
an extra closing ] that is making me think the list ended earlier? The same
kinds of things could be going wrong if this is supposed to be a tuple.
I have been going through the catalog now that the parser is pretty much done, and the messages often benefit from some slight tweaks based on the real life examples. This one is pretty specific though!
Thanks again for reporting this! The new message should be available once Elm 0.19.1 is released.
This is from an issue on Stackoverflow, which ended with the OP commenting "Elm errors are confusing", so I thought I'd check if the situation is improved with the parser changes in 0.19, and it seemed to be quite a bit worse (especially if I imagine a beginner's perspective).
The Program
The 0.18 output
The 0.19 output