Skip to content
Snippets Groups Projects
Commit 44cee79b authored by Vincent Hanquez's avatar Vincent Hanquez
Browse files

updates

parent 73efd477
No related merge requests found
......@@ -15,7 +15,7 @@ module Data.Git.Parser
, tillEOL
, skipEOL
, skipASCII
, takeWhileASCII
, takeUntilASCII
-- * Simple re-export
, A.anyWord8
, takeBytes
......@@ -59,7 +59,7 @@ eitherParseChunks f = AL.eitherResult . AL.parse f
takeBytes = A.take
takeWhileASCII pred = undefined
takeUntilASCII char = AL.takeWhile (\c -> if fromEnum c < 0x80 then fromEnum c == fromEnum char else True)
tillEOL = A.takeWhile (/= asciiEOL)
skipEOL = A.word8 asciiEOL >> return ()
......
......@@ -207,7 +207,7 @@ tagParse = do
P.skipEOL
type_ <- objectTypeUnmarshall <$> (P.string "type " >> takeTill ((==) 0x0a))
P.skipEOL
tag <- P.string "tag " >> P.takeTill ((==) 0x0a)
tag <- P.string "tag " >> P.tillEOL -- PC.takeTill ((==) 0x0a)
P.skipEOL
tagger <- P.string "tagger " >> parsePerson
P.skipEOL
......@@ -215,9 +215,9 @@ tagParse = do
return $ Tag object type_ tag tagger signature
parsePerson = do
name <- B.init <$> P.takeWhileASCII ((/=) '<')
name <- B.init <$> P.takeUntilASCII '<'
P.skipASCII '<'
email <- P.takeWhileASCII ((/=) '>')
email <- P.takeUntilASCII '>'
_ <- P.string "> "
time <- PC.decimal :: Parser Integer
_ <- P.string " "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment