mirror of
https://github.com/github/semantic.git
synced 2024-12-20 21:31:48 +03:00
22 lines
433 B
Swift
22 lines
433 B
Swift
func unified(patch: Patch<Term>, source: String) -> String {
|
|
return (patch.state.before.map { "{-\($0)-}" } ?? "")
|
|
+ (patch.state.after.map { "{+\($0)+}" } ?? "")
|
|
}
|
|
|
|
private func range(patch: Patch<Term>) -> Range<Int> {
|
|
return 0..<0
|
|
}
|
|
|
|
func unified(diff: Diff, before: String, after: String) -> String {
|
|
switch diff {
|
|
case let .Pure(patch):
|
|
return unified(patch, source: after)
|
|
|
|
case .Roll:
|
|
return ""
|
|
}
|
|
}
|
|
|
|
|
|
import Doubt
|