From 99e9ee08aaf96f2fbc60ee4630ba16a9b251d7fc Mon Sep 17 00:00:00 2001 From: Timothy Clem Date: Fri, 10 Jan 2020 14:05:30 -0800 Subject: [PATCH] Fix assignment double tagging --- semantic-ruby/src/Language/Ruby/Tags.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/semantic-ruby/src/Language/Ruby/Tags.hs b/semantic-ruby/src/Language/Ruby/Tags.hs index cd40a747a..a86cd561d 100644 --- a/semantic-ruby/src/Language/Ruby/Tags.hs +++ b/semantic-ruby/src/Language/Ruby/Tags.hs @@ -294,14 +294,14 @@ instance ToTagsBy 'Custom Rb.Assignment where case left of Prj (Rb.Lhs (Prj (Rb.Variable (Prj Rb.Identifier { text })))) -> modify (text :) Prj Rb.LeftAssignmentList { extraChildren } -> introduceLhsLocals extraChildren - _ -> tags left + _ -> pure () gtags t where introduceLhsLocals xs = for_ xs $ \x -> case x of Prj (Rb.Lhs (Prj (Rb.Variable (Prj Rb.Identifier { text })))) -> modify (text :) Prj Rb.DestructuredLeftAssignment { extraChildren } -> introduceLhsLocals extraChildren Prj Rb.RestAssignment { extraChildren = Just (Rb.Lhs (Prj (Rb.Variable (Prj Rb.Identifier { text })))) } -> modify (text :) - _ -> tags x + _ -> pure () gtags :: ( Has (Reader Source) sig m