1
1
mirror of https://github.com/github/semantic.git synced 2025-01-02 20:41:38 +03:00

Include all nodes in indices.

This commit is contained in:
Rob Rix 2017-04-28 14:35:04 -04:00
parent ca93b0f6cf
commit 743935b098

View File

@ -76,10 +76,7 @@ instance ToJSONFields Identifier where
indexTerm :: (ToJSONFields (Record fields), HasField fields (Maybe Identifier)) => Term (Syntax Text) (Record fields) -> [Record fields]
indexTerm = cata combine
where combine (a :< f) | Nothing <- getField a :: Maybe Identifier = Prologue.concat f
| Leaf _ <- f = Prologue.concat f
| otherwise = a : Prologue.concat f
indexTerm = cata $ \ (a :< f) -> a : Prologue.concat f
runParseTreeRenderer :: (Monoid output, StringConv output ByteString) => ParseTreeRenderer fields output -> [(SourceBlob, Term (Syntax Text) (Record fields))] -> output
runParseTreeRenderer = foldMap . uncurry . resolveParseTreeRenderer