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

Stub in Python diffing for s-expression rendering.

This commit is contained in:
Rob Rix 2017-05-31 11:41:57 -04:00
parent fb587a759a
commit 51592d4003

View File

@ -54,7 +54,9 @@ parseDiffAndRenderBlobPair renderer blobs = case renderer of
terms <- distributeFor blobs (decorate identifierAlgebra <=< parseSource)
diffAndRenderTermPair blobs (runBothWith diffTerms) (uncurry renderJSONDiff) terms
PatchDiffRenderer -> distributeFor blobs parseSource >>= diffAndRenderTermPair blobs (runBothWith diffTerms) (uncurry renderPatch)
SExpressionDiffRenderer -> distributeFor blobs parseSource >>= diffAndRenderTermPair blobs (runBothWith diffTerms) (renderSExpressionDiff . Prologue.snd)
SExpressionDiffRenderer -> case effectiveLanguage of
Just Language.Python -> distributeFor blobs parseSource >>= diffAndRenderTermPair blobs (runBothWith replacing) (renderSExpressionDiff . Prologue.snd)
_ -> distributeFor blobs parseSource >>= diffAndRenderTermPair blobs (runBothWith diffTerms) (renderSExpressionDiff . Prologue.snd)
IdentityDiffRenderer -> do
terms <- distributeFor blobs $ \ blob -> do
term <- parseSource blob