mirror of
https://github.com/github/semantic.git
synced 2025-01-03 13:02:37 +03:00
Add Args/VarDecl/VarAssignment cases to termToDiffInfo
This commit is contained in:
parent
fe49717acd
commit
c3e8f9b22f
@ -124,6 +124,11 @@ termToDiffInfo term = case runCofree term of
|
||||
(info :< Syntax.Assignment identifier _) -> [ DiffInfo (toCategoryName info) (toTermName identifier) ]
|
||||
memberAccess@(info :< Syntax.MemberAccess{}) -> [ DiffInfo (toCategoryName info) (toTermName $ cofree memberAccess) ]
|
||||
methodCall@(info :< Syntax.MethodCall{}) -> [ DiffInfo (toCategoryName info) (toTermName $ cofree methodCall) ]
|
||||
-- TODO: We should remove Args from Syntax since I don't think we shouldn ever
|
||||
-- evaluate Args as a single toTermName Text - joshvera
|
||||
args@(info :< Syntax.Args{}) -> [ DiffInfo (toCategoryName info) (toTermName $ cofree args) ]
|
||||
varDecl@(info :< Syntax.VarDecl{}) -> [ DiffInfo (toCategoryName info) (toTermName $ cofree varDecl) ]
|
||||
varAssignment@(info :< Syntax.VarAssignment{}) -> [ DiffInfo (toCategoryName info) (toTermName $ cofree varAssignment) ]
|
||||
|
||||
prependSummary :: Category -> DiffSummary DiffInfo -> DiffSummary DiffInfo
|
||||
prependSummary annotation summary = summary { parentAnnotations = annotation : parentAnnotations summary }
|
||||
|
Loading…
Reference in New Issue
Block a user