mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
Reformat the guard clause for ToC term rendering.
This commit is contained in:
parent
b179269ed6
commit
eedceb2a7f
@ -46,7 +46,9 @@ parseBlob renderer blob@Blob{..} = case (renderer, blobLanguage) of
|
|||||||
(ToCTermRenderer, Just Language.Python) -> parse pythonParser blob >>= decorate (declarationAlgebra blob) >>= render (renderToCTerm blob)
|
(ToCTermRenderer, Just Language.Python) -> parse pythonParser blob >>= decorate (declarationAlgebra blob) >>= render (renderToCTerm blob)
|
||||||
(ToCTermRenderer, Just Language.TypeScript) -> parse typescriptParser blob >>= decorate (declarationAlgebra blob) >>= render (renderToCTerm blob)
|
(ToCTermRenderer, Just Language.TypeScript) -> parse typescriptParser blob >>= decorate (declarationAlgebra blob) >>= render (renderToCTerm blob)
|
||||||
(ToCTermRenderer, Just Language.Ruby) -> parse rubyParser blob >>= decorate (declarationAlgebra blob) >>= render (renderToCTerm blob)
|
(ToCTermRenderer, Just Language.Ruby) -> parse rubyParser blob >>= decorate (declarationAlgebra blob) >>= render (renderToCTerm blob)
|
||||||
(ToCTermRenderer, _) | Just syntaxParser <- syntaxParser -> parse syntaxParser blob >>= decorate (syntaxDeclarationAlgebra blob) >>= render (renderToCTerm blob)
|
(ToCTermRenderer, _)
|
||||||
|
| Just syntaxParser <- syntaxParser ->
|
||||||
|
parse syntaxParser blob >>= decorate (syntaxDeclarationAlgebra blob) >>= render (renderToCTerm blob)
|
||||||
(JSONTermRenderer, lang)
|
(JSONTermRenderer, lang)
|
||||||
| Just (SomeParser parser) <- lang >>= someParser (Proxy :: Proxy '[ConstructorName, Foldable, Functor]) ->
|
| Just (SomeParser parser) <- lang >>= someParser (Proxy :: Proxy '[ConstructorName, Foldable, Functor]) ->
|
||||||
parse parser blob >>= decorate constructorLabel >>= render (renderJSONTerm blob)
|
parse parser blob >>= decorate constructorLabel >>= render (renderJSONTerm blob)
|
||||||
|
Loading…
Reference in New Issue
Block a user