1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 18:23:44 +03:00

Summarize var assignments’ ids even when composite.

This commit is contained in:
Rob Rix 2017-01-25 20:16:36 -05:00
parent 006ec80a06
commit 57d2f50420

View File

@ -227,9 +227,7 @@ toTermName source term = case unwrap term of
SliceTy -> termNameFromSource base <> toTermName' element
_ -> toTermName' base <> "[" <> toTermName' element <> "]"
(_, _) -> toTermName' base <> "[" <> toTermName' element <> "]"
S.VarAssignment varId _ -> case unwrap varId of
S.Indexed [ a ] -> toTermName' a
_ -> toTermName' varId
S.VarAssignment varId _ -> toTermName' varId
S.VarDecl decl _ -> toTermName' decl
-- TODO: We should remove Case from Syntax since I don't think we should ever
-- evaluate Case as a single toTermName Text - joshvera