purescript-contrib/purescript-parsing

Parsing a `number` in scientific notation _without_ a decimal exponent fails.

Closed this issue · 0 comments

Using the Parsing.String.Basic.number parser on a number in scientific notation but without a decimal exponent only parses the non-exponent part.

To Reproduce

num <- runParser "1.2e1" number
num /= 12

Expected behavior
Parser should parse numbers in scientific notation without a decimal exponent.

Additional context
The regex is failing. This can be observed here.
Screenshot_2022-07-18_12-18-08