Fix parsing of ".E0" input#43
Conversation
25b2fa8 to
fad1932
Compare
|
Thanks for the fix! The With this PR they get shattered into separate tokens:
The root cause is that the new condition looks only at I added regression cases for Proposed alternative — keep allowing the exponent right after the dot only when a digit already preceded it: } else if !((nextByte == 'e' || nextByte == 'E') && hasNumber) && nextByte != 0 {
break
}With this, |
fad1932 to
d236d62
Compare
Right I was not aware that these were valid float, it's good that you double checked. I just rebased and applied your suggestion instead. |
I'm not absolutely sure that this is the expected output for this specific input, but it seems to make sense. Also not sure that the fix is correct, but to me it does not make sense to allow an exponent just after a dot (at least Go does not allow it).
Fixes #42