mirror of
https://github.com/github/semantic.git
synced 2024-12-01 09:15:01 +03:00
📝 sourceSpanToRange.
This commit is contained in:
parent
b3248a4a95
commit
7dc8393953
@ -91,6 +91,7 @@ actualLineRanges :: Range -> Source Char -> [Range]
|
||||
actualLineRanges range = drop 1 . scanl toRange (Range (start range) (start range)) . actualLines . slice range
|
||||
where toRange previous string = Range (end previous) $ end previous + length string
|
||||
|
||||
-- | Compute the character range corresponding to a given SourceSpan within a Source.
|
||||
sourceSpanToRange :: Source Char -> SourceSpan -> Range
|
||||
sourceSpanToRange _ _ = Range 0 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user