mirror of
https://github.com/github/semantic.git
synced 2025-01-03 13:02:37 +03:00
Add documentation for prependSummary
This commit is contained in:
parent
df08cb7c79
commit
51d60902ed
@ -211,6 +211,10 @@ termToDiffInfo blob term = case unwrap term of
|
||||
where toTermName' = toTermName blob
|
||||
termToDiffInfo' = termToDiffInfo blob
|
||||
|
||||
-- | Prepends a parentAnnotation to the current DiffSummary instance.
|
||||
-- | For a DiffSummary without a parentAnnotation, we prepend a parentAnnotation with the first identifiable term.
|
||||
-- | For a DiffSummary with a parentAnnotation, we prepend the next annotatable term to the extant parentAnnotation.
|
||||
-- | If a DiffSummary already has a parentAnnotation, and a (grand) parentAnnotation, then we return the summary without modification.
|
||||
prependSummary :: (HasCategory leaf, HasField fields Range, HasField fields Category) => Source Char -> SyntaxTerm leaf fields -> DiffSummary DiffInfo -> DiffSummary DiffInfo
|
||||
prependSummary source term summary =
|
||||
case (identifiable term, annotatable term) of
|
||||
|
Loading…
Reference in New Issue
Block a user