Commit 9dc8bc29 authored by Gebhart97's avatar Gebhart97
Browse files

Fixed (maybe?) Lexer for Windows Newline Format

Feel free to remove this or fix it, if it creates Problems on Linux. This is just a small fix for me, because without it, I always get an "unexpected carriage return" error.
parent 0a6ea00b
......@@ -48,6 +48,7 @@ import Data.Float.Utils (EqDouble, fromDouble)
newline :: MonadParser m => m ()
newline = (void (takeWhile1P (Just "newline") (=='\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