Skip to content

Commit

Permalink
Report source name in error instead of "TODO"
Browse files Browse the repository at this point in the history
  • Loading branch information
emmabastas committed Jul 13, 2021
1 parent 4b490d4 commit bc58b34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elm-format-lib/src/Parse/ParsecAdapter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ unknownError row col =

unexpected :: String -> Parser a
unexpected msg =
EP.Parser $ \(EP.State _ _ _ _ row col _ _) _ _ _ eerr ->
eerr row col (newErrorMessage (UnExpect msg) "TODO")
EP.Parser $ \(EP.State _ _ _ _ row col sourceName _) _ _ _ eerr ->
eerr row col (newErrorMessage (UnExpect msg) sourceName)


type Parser a = EP.Parser ParseError a
Expand Down

0 comments on commit bc58b34

Please # to comment.