Commit 4ae4322c authored by Gebhart97's avatar Gebhart97
Browse files

Better Solution

parent 9dc8bc29
......@@ -46,9 +46,8 @@ import Copar.Parser.Types
import Data.Float.Utils (EqDouble, fromDouble)
newline :: MonadParser m => m ()
newline = (void (takeWhile1P (Just "newline") (=='\n'))
newline = (void (takeWhile1P (Just "newline") (`elem` ['\r', '\n']))
<|> (skipLineComment <* char '\n')) *> space
<|> void ((,) <$> takeWhile1P Nothing (=='\r') <*> takeWhile1P (Just "newline") (=='\n'))
{-# INLINE newline #-}
-- | Parses newlines or the end of input
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment