mirror of
https://github.com/github/semantic.git
synced 2024-12-01 00:33:59 +03:00
Fail fast on no children, too.
This commit is contained in:
parent
4b2a010e3e
commit
c0e54c56f4
@ -171,8 +171,8 @@ headRangesOf ranges = sequenceL (listToMaybe <$> Join (runBothWith These ranges)
|
||||
|
||||
linesOf :: (Copointed c, Functor c) => (term -> Range) -> [c [Join These term]] -> Both [Range] -> [Join These (Range, [c term])]
|
||||
linesOf getRange children ranges
|
||||
| Join ([], []) <- ranges
|
||||
= []
|
||||
| Join ([], []) <- ranges = []
|
||||
| [] <- children = []
|
||||
| (first:rest) <- children
|
||||
, null (copoint first) = linesOf getRange rest ranges
|
||||
| otherwise = let (intersections, remaining) = alignChildren getRange children headRanges
|
||||
|
Loading…
Reference in New Issue
Block a user