1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

Accumulate keyed elements.

This commit is contained in:
Rob Rix 2015-12-01 16:18:36 -05:00
parent dd5c507f0c
commit cb715cb8ea

View File

@ -37,6 +37,7 @@ splitTerm source term = fst $ cata toElement term where
toElement (Info range lineRange categories) (Fixed i) = makeList i range categories toElement (Info range lineRange categories) (Fixed i) = makeList i range categories
accumulate (children, previous) (child, range) = (children ++ [ subtext previous $ start range, child ], end range) accumulate (children, previous) (child, range) = (children ++ [ subtext previous $ start range, child ], end range)
accumulateFromMap (children, previous) (key, (child, range)) = (children ++ [ subtext previous $ start range, Dt key, child ], end range)
makeList i range categories = (Ul (classify categories) items, range) makeList i range categories = (Ul (classify categories) items, range)
where where