mirror of
https://github.com/github/semantic.git
synced 2025-01-05 05:58:34 +03:00
Remove the local contextLines binding from splitAnnotatedByLines.
This commit is contained in:
parent
ac01a7939c
commit
9dba0887c8
@ -184,8 +184,7 @@ termToLines (Info range categories :< syntax) source = (rows syntax, range)
|
||||
splitAnnotatedByLines :: (String, String) -> (Range, Range) -> (Set.Set Category, Set.Set Category) -> Syntax a (Diff a Info) -> [Row (Term a Info)]
|
||||
splitAnnotatedByLines sources ranges categories syntax = case syntax of
|
||||
Leaf a -> contextRows (Leaf a) ranges categories sources
|
||||
where contextLines constructor range categories source = Line False . (:[]) . (:< constructor) . (`Info` categories) <$> actualLineRanges range source
|
||||
contextRows constructor ranges categoriess sources = zipWithDefaults Row EmptyLine EmptyLine (contextLines (Leaf a) (fst ranges) (fst categories) (fst sources)) (contextLines (Leaf a) (snd ranges) (snd categories) (snd sources))
|
||||
where contextRows constructor ranges categoriess sources = zipWithDefaults Row EmptyLine EmptyLine (contextLines (Leaf a) (fst ranges) (fst categories) (fst sources)) (contextLines (Leaf a) (snd ranges) (snd categories) (snd sources))
|
||||
|
||||
adjoin = reverse . foldl (adjoinRowsBy (openTerm $ fst sources) (openTerm $ snd sources)) []
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user