mirror of
https://github.com/github/semantic.git
synced 2024-11-29 02:44:36 +03:00
Extract the term from a split patch.
This commit is contained in:
parent
8b3c726542
commit
c92107a70a
@ -124,6 +124,12 @@ splitPatchToClassName patch = stringValue $ "patch " ++ case patch of
|
||||
SplitDelete _ -> "delete"
|
||||
SplitReplace _ -> "replace"
|
||||
|
||||
-- | Get the term from a split patch.
|
||||
getSplitTerm :: SplitPatch a -> a
|
||||
getSplitTerm (SplitInsert a) = a
|
||||
getSplitTerm (SplitDelete a) = a
|
||||
getSplitTerm (SplitReplace a) = a
|
||||
|
||||
-- | Split a diff, which may span multiple lines, into rows of split diffs.
|
||||
splitDiffByLines :: Diff leaf Info -> (Int, Int) -> (Source Char, Source Char) -> ([Row (SplitDiff leaf Info)], (Range, Range))
|
||||
splitDiffByLines diff (prevLeft, prevRight) sources = case diff of
|
||||
|
Loading…
Reference in New Issue
Block a user