Skip to content

Commit

Permalink
doc/code cleanups.
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrap committed Aug 31, 2015
1 parent 5d82c0d commit d851233
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions Data/JsonStream/CLexer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,7 @@ parseResults (TempData {tmpNumbers=tmpNumbers, tmpBuffer=bs}) (err, hdr, rescoun
| otherwise -> PartialResult (StringContent textSection) -- Final part of partial strings
(PartialResult StringEnd next)
| resType == resStringPartial ->
if resLength == -1
then PartialResult (StringContent (BSW.singleton $ fromIntegral resAddData)) next -- \n\r..
else PartialResult (StringContent textSection) next -- normal string section
PartialResult (StringContent textSection) next -- string section
| otherwise -> error "Unsupported"

-- | Estimate number of elements in a chunk
Expand Down
4 changes: 2 additions & 2 deletions Data/JsonStream/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ longString mbounds = Parser $ moreData (handle [] 0)
| otherwise -> Failed "Error decoding UTF8"
_ -> callParse ignoreVal tok

-- | Match string as a ByteString without decoding the data from UTF8 (strings larger than input chunk,
-- small get always decoded).
-- | Match string as a ByteString without decoding the data from UTF8 and unescaping the contents
-- (strings larger than input chunk, small get always decoded).
bytestring :: Parser BL.ByteString
bytestring = Parser $ moreData (handle [])
where
Expand Down

0 comments on commit d851233

Please sign in to comment.