parser
parser copied to clipboard
float parser consumes decimal separator without fractional part
Hi,
I have found that the float parser consumes all of the input "42.". I would have expected that it would only consume "42" since there is no fractional part. In my personal opinion, "42." is not a floating point representation, while "42" is.
Here is an Ellie demonstrating this problem: https://ellie-app.com/3gJXCLHPGqJa1
If this is not a bug, I would propose to document that behavior and how to work around it.
I am no expert, or involved in the project, just interested and motivated.
My expectation for the float parser would be that it consumes the point (.), even when no digits follow it. So I don't think this is a bug.