1
1
mirror of https://github.com/github/semantic.git synced 2024-12-11 08:45:48 +03:00

Simplify how we keep the category.

This commit is contained in:
Rob Rix 2017-05-31 15:33:04 -04:00
parent fc4d4e6e58
commit 08b344c90a

View File

@ -42,7 +42,7 @@ parseBlob renderer blob@SourceBlob{..} = case renderer of
language -> parse (parserForLanguage language) source >>= decorate identifierAlgebra >>= render (renderJSONTerm blob)
SExpressionTermRenderer -> case blobLanguage of
Just Language.Python -> parse pythonParser source >>= decorate constructorLabel >>= render renderSExpressionTerm
language -> parse (parserForLanguage language) source >>= render renderSExpressionTerm . fmap (\ r -> category r :. Nil)
language -> parse (parserForLanguage language) source >>= render renderSExpressionTerm . fmap ((:. Nil) . category)
IdentityTermRenderer -> case blobLanguage of
Just Language.Python -> pure Nothing
language -> Just <$> parse (parserForLanguage language) source