1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +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 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
where hasIdentifier term = case unwrap term of
S.FunctionCall{} -> True