mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
Skip past nonintersecting children.
This resolves failures in two distinct cases where changing the default for handling asymmetrical ranges had opposite outcomes.
This commit is contained in:
parent
2fa8060a1c
commit
f1d9cc3f2f
@ -176,8 +176,8 @@ alignChildren getRange (first:rest) headRanges
|
||||
(True, False) -> ((++) <$> toTerms (fromJust l) <*> firstRemaining, (maybeToList r <$ first) : (restOfLines <$ first) : restRemaining)
|
||||
-- It only intersects on the right, so split it up.
|
||||
(False, True) -> ((++) <$> toTerms (fromJust r) <*> firstRemaining, (maybeToList l <$ first) : (restOfLines <$ first) : restRemaining)
|
||||
-- It doesn’t intersect at all, so we’ve exhausted the children for this line.
|
||||
(False, False) -> (both [] [], first:rest)
|
||||
-- It doesn’t intersect at all, so skip it and move along.
|
||||
(False, False) -> (firstRemaining, first:restRemaining)
|
||||
| otherwise = alignChildren getRange rest headRanges
|
||||
where (firstRemaining, restRemaining) = alignChildren getRange rest headRanges
|
||||
toTerms line = modifyJoin (fromThese [] []) (pure . (<$ first) <$> line)
|
||||
|
Loading…
Reference in New Issue
Block a user