1
1
mirror of https://github.com/github/semantic.git synced 2025-01-05 05:58:34 +03:00

Define splitAnnotatedByLines over Fixed diffs.

This commit is contained in:
Rob Rix 2015-12-21 22:43:49 -05:00
parent cdc01b4995
commit e78f9cdbcf

View File

@ -190,6 +190,7 @@ splitAnnotatedByLines :: (String, String) -> (Range, Range) -> (Set.Set Category
splitAnnotatedByLines sources ranges categories syntax = case syntax of
Leaf a -> contextRows (Leaf a) ranges categories sources
Indexed children -> adjoinChildRows Indexed children
Fixed children -> adjoinChildRows Fixed children
where contextRows constructor ranges categories sources = zipWithDefaults Row EmptyLine EmptyLine (contextLines constructor (fst ranges) (fst categories) (fst sources)) (contextLines constructor (snd ranges) (snd categories) (snd sources))
adjoin = reverse . foldl (adjoinRowsBy (openTerm $ fst sources) (openTerm $ snd sources)) []