Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Software
CoPaR
Commits
4ae4322c
Commit
4ae4322c
authored
May 10, 2022
by
Gebhart97
Browse files
Better Solution
parent
9dc8bc29
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/Copar/Parser/Lexer.hs
View file @
4ae4322c
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment