1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00

Get the first ranges for a child.

This commit is contained in:
Rob Rix 2016-03-24 11:45:52 -04:00
parent ccceb8d771
commit b05b1694a7

View File

@ -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