1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 13:02:37 +03:00

Define annotatedToRows in terms of adjoin2By.

This commit is contained in:
Rob Rix 2015-12-21 10:04:02 -05:00
parent c19dbc27b0
commit 9ef0242ac8

View File

@ -201,7 +201,7 @@ annotatedToRows (Annotated (Info left leftCategories, Info right rightCategories
ranges = (left, right)
sources = (before, after)
childRows = appendRemainder . foldl sumRows ([], starts ranges)
appendRemainder (rows, previousIndices) = reverse . foldl adjoin2 [] $ rows ++ (contextRows (ends ranges) previousIndices sources)
appendRemainder (rows, previousIndices) = reverse . foldl (adjoin2By openElement) [] $ rows ++ (contextRows (ends ranges) previousIndices sources)
sumRows (rows, previousIndices) child = (allRows, ends childRanges)
where
separatorRows = contextRows (starts childRanges) previousIndices sources