mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
Get the first ranges for a child.
This commit is contained in:
parent
ccceb8d771
commit
b05b1694a7
@ -136,6 +136,7 @@ groupChildrenByLine ranges children = go (fromThese [] [] $ runJoin ranges) chil
|
||||
, (child:rest) <- children
|
||||
= go ranges rest
|
||||
| otherwise = uncurry (alignWith (fmap (flip (,) []) . Join)) ranges
|
||||
firstRangesForChild child = getRange <$> head child
|
||||
getRange (Free (Annotated (Info range _) _)) = range
|
||||
getRange (Pure patch) | Info range _ :< _ <- getSplitTerm patch = range
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user