Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Can't parse float number expressed in scientific notation #11

Closed
SnipyJulmy opened this issue Aug 7, 2019 · 1 comment · Fixed by #12
Closed

Can't parse float number expressed in scientific notation #11

SnipyJulmy opened this issue Aug 7, 2019 · 1 comment · Fixed by #12

Comments

@SnipyJulmy
Copy link

Toml-scala can't parse number in floating point expressed in a scientific notation.

Example :

scala> import toml.Toml ; Toml.parse("poly = -45e12")
import toml.Toml
res4: Either[String,toml.Value.Tbl] = Right(Tbl(Map(poly -> Real(-4.5E13))))

scala> import toml.Toml ; Toml.parse("poly = -45.321e12")
import toml.Toml
res5: Either[String,toml.Value.Tbl] = Left(End:1:15 ..."e12")

Let me know if you need more from me.

@tindzk
Copy link
Member

tindzk commented Aug 8, 2019

Thanks for the bug report! We should also make sure that all other floating point examples from the TOML specification work as expected.

tindzk added a commit that referenced this issue Aug 20, 2019
- Parse floating point numbers containing fractional and exponent
  part
- Support infinity and NaN

Closes #11.
tindzk added a commit that referenced this issue Aug 21, 2019
- Parse floating point numbers containing fractional and exponent
  part
- Support infinity and NaN constants

Closes #11.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants