1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

Add parent annotation to the end of the list

This commit is contained in:
joshvera 2016-08-08 14:37:51 -04:00
parent 11e35ac9c6
commit 4efa6f6fa5

View File

@ -143,7 +143,7 @@ termToDiffInfo blob term = case unwrap term of
prependSummary :: (HasCategory leaf, HasField fields Range, HasField fields Category) => Source Char -> Term leaf (Record fields) -> DiffSummary DiffInfo -> DiffSummary DiffInfo prependSummary :: (HasCategory leaf, HasField fields Range, HasField fields Category) => Source Char -> Term leaf (Record fields) -> DiffSummary DiffInfo -> DiffSummary DiffInfo
prependSummary source term summary = if hasIdentifier term prependSummary source term summary = if hasIdentifier term
then summary { parentAnnotations = (category $ extract term, toTermName source term) : parentAnnotations summary } then summary { parentAnnotations = parentAnnotations summary <> [(category $ extract term, toTermName source term)] }
else summary else summary
where hasIdentifier term = case unwrap term of where hasIdentifier term = case unwrap term of
S.FunctionCall{} -> True S.FunctionCall{} -> True