1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

🔥 offsetRange.

This commit is contained in:
Rob Rix 2016-03-09 01:52:45 -05:00
parent 2b231edab4
commit 4d25c23618

View File

@ -22,10 +22,6 @@ rangeLength range = end range - start range
totalRange :: Foldable f => f a -> Range
totalRange t = Range 0 $ length t
-- | Return a range that has its start and end offset by the given amount.
offsetRange :: Int -> Range -> Range
offsetRange i (Range start end) = Range (i + start) (i + end)
-- | Break a string down into words and sequences of punctuation. Return a list
-- | strings with ranges, assuming that the first character in the string is
-- | at the given index.