mirror of
https://github.com/github/semantic.git
synced 2025-01-03 04:51:57 +03:00
Merge branch 'master' into improve-anonymous-function-summaries
This commit is contained in:
commit
a5c0e0df84
@ -102,12 +102,14 @@ prefixWithPatch patch = prefixWithThe (patchToPrefix patch)
|
||||
-- Optional determiner (e.g. "the") to tie together summary statements.
|
||||
determiner :: DiffInfo -> Doc
|
||||
determiner (LeafInfo "number" _) = ""
|
||||
determiner (LeafInfo "boolean" _) = ""
|
||||
determiner (LeafInfo "anonymous function" _) = "an"
|
||||
determiner (BranchInfo bs _ _) = determiner (last bs)
|
||||
determiner _ = "the"
|
||||
|
||||
toLeafInfos :: DiffInfo -> [Doc]
|
||||
toLeafInfos (LeafInfo "number" termName) = pure (squotes (toDoc termName))
|
||||
toLeafInfos (LeafInfo "boolean" termName) = pure (squotes (toDoc termName))
|
||||
toLeafInfos (LeafInfo "anonymous function" termName) = pure (toDoc termName)
|
||||
toLeafInfos LeafInfo{..} = pure (squotes (toDoc termName) <+> toDoc categoryName)
|
||||
toLeafInfos BranchInfo{..} = toLeafInfos =<< branches
|
||||
|
Loading…
Reference in New Issue
Block a user