parser icon indicating copy to clipboard operation
parser copied to clipboard

float parser consumes decimal separator without fractional part

Open aforemny opened this issue 7 years ago • 1 comments

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.

aforemny avatar Sep 07 '18 13:09 aforemny

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.

dvberkel avatar Sep 13 '18 15:09 dvberkel