1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Unified rendering of terms.

This commit is contained in:
Rob Rix 2015-11-19 17:23:12 -08:00
parent 7abc918f18
commit 8fe1fc6ff2

View File

@ -23,8 +23,8 @@ unified diff before after =
unifiedPatch :: Patch (Term a annotation) -> String
unifiedPatch _ = ""
unifiedTerm :: Term a annotation -> String -> String
unifiedTerm _ _ = ""
unifiedTerm :: Term a Info -> String -> String
unifiedTerm term source = fst $ cata f term
unifiedRange :: Range -> [(String, Maybe Range)] -> String -> String
unifiedRange range children source = out ++ substring Range { start = previous, end = end range } after where