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:
parent
fc4d4e6e58
commit
08b344c90a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user