mirror of
https://github.com/mrkkrp/megaparsec.git
synced 2024-12-25 09:12:29 +03:00
Spelling fix. ('seperate' -> 'separate').
This commit is contained in:
parent
c84822310c
commit
ed944b4a96
@ -143,13 +143,13 @@ sepEndBy :: (Stream s m t) => ParsecT s u m a -> ParsecT s u m sep -> ParsecT s
|
||||
sepEndBy p sep = sepEndBy1 p sep <|> return []
|
||||
|
||||
|
||||
-- | @endBy1 p sep@ parses /one/ or more occurrences of @p@, seperated
|
||||
-- | @endBy1 p sep@ parses /one/ or more occurrences of @p@, separated
|
||||
-- and ended by @sep@. Returns a list of values returned by @p@.
|
||||
|
||||
endBy1 :: (Stream s m t) => ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m [a]
|
||||
endBy1 p sep = many1 (do{ x <- p; sep; return x })
|
||||
|
||||
-- | @endBy p sep@ parses /zero/ or more occurrences of @p@, seperated
|
||||
-- | @endBy p sep@ parses /zero/ or more occurrences of @p@, separated
|
||||
-- and ended by @sep@. Returns a list of values returned by @p@.
|
||||
--
|
||||
-- > cStatements = cStatement `endBy` semi
|
||||
|
@ -196,10 +196,10 @@ showErrorMessages msgOr msgUnknown msgExpecting msgUnExpected msgEndOfInput msgs
|
||||
commasOr [m] = m
|
||||
commasOr ms = commaSep (init ms) ++ " " ++ msgOr ++ " " ++ last ms
|
||||
|
||||
commaSep = seperate ", " . clean
|
||||
commaSep = separate ", " . clean
|
||||
|
||||
seperate _ [] = ""
|
||||
seperate _ [m] = m
|
||||
seperate sep (m:ms) = m ++ sep ++ seperate sep ms
|
||||
separate _ [] = ""
|
||||
separate _ [m] = m
|
||||
separate sep (m:ms) = m ++ sep ++ separate sep ms
|
||||
|
||||
clean = nub . filter (not . null)
|
||||
|
Loading…
Reference in New Issue
Block a user