mirror of
https://github.com/github/semantic.git
synced 2024-11-25 11:04:00 +03:00
Tags always have lines.
This commit is contained in:
parent
e816d60260
commit
b5cffe8ebe
@ -10,7 +10,7 @@ data Tag = Tag
|
||||
{ name :: Text
|
||||
, kind :: Kind
|
||||
, span :: Span
|
||||
, line :: Maybe Text
|
||||
, line :: Text
|
||||
, docs :: Maybe Text
|
||||
}
|
||||
deriving (Eq, Show)
|
||||
|
@ -73,7 +73,7 @@ instance ToTagBy 'Custom Py.FunctionDefinition where
|
||||
src <- ask @Source
|
||||
let docs = listToMaybe extraChildren >>= docComment src
|
||||
sliced = slice src (Range start end)
|
||||
yield (Tag name Function span (Just (firstLine sliced)) docs)
|
||||
yield (Tag name Function span (firstLine sliced) docs)
|
||||
tag parameters
|
||||
traverse_ tag returnType
|
||||
traverse_ tag extraChildren
|
||||
@ -88,7 +88,7 @@ instance ToTagBy 'Custom Py.ClassDefinition where
|
||||
src <- ask @Source
|
||||
let docs = listToMaybe extraChildren >>= docComment src
|
||||
sliced = slice src (Range start end)
|
||||
yield (Tag name Class span (Just (firstLine sliced)) docs)
|
||||
yield (Tag name Class span (firstLine sliced) docs)
|
||||
traverse_ tag superclasses
|
||||
traverse_ tag extraChildren
|
||||
|
||||
@ -100,7 +100,7 @@ instance ToTagBy 'Custom Py.Call where
|
||||
} = do
|
||||
src <- ask @Source
|
||||
let sliced = slice src range
|
||||
yield (Tag name Call span (Just (firstLine sliced)) Nothing)
|
||||
yield (Tag name Call span (firstLine sliced) Nothing)
|
||||
tag arguments
|
||||
tag' Py.Call {} = pure ()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user