mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
Track locals in operator assignment
This commit is contained in:
parent
aca2106862
commit
bc13ecac13
@ -89,6 +89,8 @@ type family ToTagsInstance t :: Strategy where
|
||||
ToTagsInstance Rb.LambdaParameters = 'Custom
|
||||
ToTagsInstance Rb.BlockParameters = 'Custom
|
||||
ToTagsInstance Rb.Assignment = 'Custom
|
||||
ToTagsInstance Rb.OperatorAssignment = 'Custom
|
||||
|
||||
|
||||
ToTagsInstance _ = 'Generic
|
||||
|
||||
@ -337,6 +339,13 @@ instance ToTagsBy 'Custom Rb.Assignment where
|
||||
Prj Rb.RestAssignment { extraChildren = Just (Rb.Lhs (Prj (Rb.Variable (Prj Rb.Identifier { text })))) } -> modify (text :)
|
||||
_ -> pure ()
|
||||
|
||||
instance ToTagsBy 'Custom Rb.OperatorAssignment where
|
||||
tags' t@Rb.OperatorAssignment{ left } = do
|
||||
case left of
|
||||
Prj (Rb.Lhs (Prj (Rb.Variable (Prj Rb.Identifier { text })))) -> modify (text :)
|
||||
_ -> pure ()
|
||||
gtags t
|
||||
|
||||
gtags
|
||||
:: ( Has (Reader Source) sig m
|
||||
, Has (Writer Tags.Tags) sig m
|
||||
|
Loading…
Reference in New Issue
Block a user