Skip to content

Commit

Permalink
float's can't start with just exponents
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickvP committed Jun 16, 2023
1 parent b3e7d0e commit c198bda
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Nixfmt/Parser/Float.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ data SP = SP !Integer {-# UNPACK #-} !Int
floatParse :: (MonadParsec e s m, Token s ~ Char, RealFloat a) => m a
floatParse = do
notFollowedBy $ (char '0') >> digitChar
notFollowedBy $ (char' 'e')
c' <- (decimal <?> "decimal") <|> return 0
toRealFloat
<$> (( do
Expand Down

0 comments on commit c198bda

Please sign in to comment.