mirror of
https://github.com/github/semantic.git
synced 2025-01-03 13:02:37 +03:00
Recur via a separate pattern.
This reverts commit 985ad3d43055c0773e85623db4a29fda8656ddbb.
This commit is contained in:
parent
7442a180d6
commit
daca37bc24
@ -151,6 +151,7 @@ group2 ranges children | Just (headRanges, tailRanges) <- unconsThese ranges
|
||||
(False, True) -> let (moreRanges, moreChildren, remainingLines) = group2 (atRight ranges) (rest:restOfChildren) in
|
||||
(moreRanges, moreChildren, pairRangeWithLine headRanges first : remainingLines)
|
||||
_ -> (tailRanges, children, [ flip (,) [] <$> headRanges ])
|
||||
| ([]:rest) <- children = group2 ranges rest
|
||||
| otherwise = (ranges, children, [])
|
||||
where atLeft (Join (These (_:as) bs)) = Join (These as bs)
|
||||
atLeft (Join (This (_:as))) = Join (This as)
|
||||
|
Loading…
Reference in New Issue
Block a user