mirror of
https://github.com/github/semantic.git
synced 2024-12-24 15:35:14 +03:00
Don't double tags with recursive intro locals
This commit is contained in:
parent
b192709c9e
commit
9f6da4eb47
@ -278,16 +278,16 @@ introduceLocals params = for_ params $ \param -> case param of
|
||||
Prj Rb.KeywordParameter { name = Rb.Identifier { text = lvar }} -> modify (lvar :)
|
||||
Prj Rb.OptionalParameter { name = Rb.Identifier { text = lvar }} -> modify (lvar :)
|
||||
Prj Rb.SplatParameter { name = Just Rb.Identifier { text = lvar } } -> modify (lvar :)
|
||||
_ -> tags param
|
||||
_ -> pure ()
|
||||
|
||||
instance ToTagsBy 'Custom Rb.MethodParameters where
|
||||
tags' Rb.MethodParameters{ extraChildren } = introduceLocals extraChildren
|
||||
tags' t@Rb.MethodParameters{ extraChildren } = introduceLocals extraChildren >> gtags t
|
||||
|
||||
instance ToTagsBy 'Custom Rb.LambdaParameters where
|
||||
tags' Rb.LambdaParameters{ extraChildren } = introduceLocals extraChildren
|
||||
tags' t@Rb.LambdaParameters{ extraChildren } = introduceLocals extraChildren >> gtags t
|
||||
|
||||
instance ToTagsBy 'Custom Rb.BlockParameters where
|
||||
tags' Rb.BlockParameters{ extraChildren } = introduceLocals extraChildren
|
||||
tags' t@Rb.BlockParameters{ extraChildren } = introduceLocals extraChildren >> gtags t
|
||||
|
||||
instance ToTagsBy 'Custom Rb.Assignment where
|
||||
tags' t@Rb.Assignment{ left } = do
|
||||
|
Loading…
Reference in New Issue
Block a user