elm / parser

A parsing library, focused on simplicity and great error messages
https://package.elm-lang.org/packages/elm/parser/latest
BSD 3-Clause "New" or "Revised" License
230 stars 46 forks source link

Incorrect problem propagated from finalizeFloat #41

Open chalup opened 4 years ago

chalup commented 4 years ago

The problem passed to float handler for numbers parser is not used, instead the generic invalid problem is used. In other words these lines:

case floatSettings of
      Err x ->
        Bad True (fromState s invalid)

Should probably look like this:

case floatSettings of
      Err x ->
        Bad True (fromState s x) -- note the `x` instead of `invalid`