purescript-contrib / purescript-parsing

A parser combinator library based on Parsec
https://pursuit.purescript.org/packages/purescript-parsing
BSD 2-Clause "Simplified" License
150 stars 52 forks source link

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

Closed MaybeJustJames closed 2 years ago

MaybeJustJames commented 2 years ago

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