1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 02:44:36 +03:00

Move yield up.

This commit is contained in:
Rob Rix 2019-09-24 16:02:31 -04:00
parent e8c1348d36
commit 2bfb9c3ef8
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -39,6 +39,11 @@ class ToTag t where
=> t Loc
-> m ()
yield :: (Carrier sig m, Member (Writer Tags) sig) => Tag -> m ()
yield = tell . Endo . (:)
instance (ToTagBy strategy t, strategy ~ ToTagInstance t) => ToTag t where
tag = tag' @strategy
@ -108,9 +113,6 @@ instance ToTagBy 'Custom Py.Call where
tag arguments
tag' Py.Call {} = pure ()
yield :: (Carrier sig m, Member (Writer Tags) sig) => Tag -> m ()
yield = tell . Endo . (:)
docComment :: Source -> (Py.CompoundStatement :+: Py.SimpleStatement) Loc -> Maybe Text
docComment src (R1 (Py.ExpressionStatementSimpleStatement (Py.ExpressionStatement { extraChildren = L1 (Py.PrimaryExpressionExpression (Py.StringPrimaryExpression Py.String { ann })) :|_ }))) = Just (toText (slice src (byteRange ann)))
docComment _ _ = Nothing