mirror of
https://github.com/github/semantic.git
synced 2024-11-29 02:44:36 +03:00
Flesh out the ToTagBy instance for calls.
This commit is contained in:
parent
61915b8152
commit
e816d60260
@ -93,6 +93,15 @@ instance ToTagBy 'Custom Py.ClassDefinition where
|
|||||||
traverse_ tag extraChildren
|
traverse_ tag extraChildren
|
||||||
|
|
||||||
instance ToTagBy 'Custom Py.Call where
|
instance ToTagBy 'Custom Py.Call where
|
||||||
|
tag' Py.Call
|
||||||
|
{ ann = Loc range span
|
||||||
|
, function = Py.IdentifierPrimaryExpression Py.Identifier { bytes = name }
|
||||||
|
, arguments
|
||||||
|
} = do
|
||||||
|
src <- ask @Source
|
||||||
|
let sliced = slice src range
|
||||||
|
yield (Tag name Call span (Just (firstLine sliced)) Nothing)
|
||||||
|
tag arguments
|
||||||
tag' Py.Call {} = pure ()
|
tag' Py.Call {} = pure ()
|
||||||
|
|
||||||
yield :: (Carrier sig m, Member (Writer (Endo [Tag])) sig) => Tag -> m ()
|
yield :: (Carrier sig m, Member (Writer (Endo [Tag])) sig) => Tag -> m ()
|
||||||
|
Loading…
Reference in New Issue
Block a user