1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

Format the terms.

This commit is contained in:
Rob Rix 2015-11-02 17:30:41 -05:00
parent 8c2e1f6f50
commit a78564506b

View File

@ -21,8 +21,8 @@ private func isOrderedBefore(a: (String, Range<Int>?), _ b: (String, Range<Int>?
}
private func unified(patch: Patch<Term>, before: String, after: String) -> String {
return (patch.state.before.map { "{-\($0)-}" } ?? "")
+ (patch.state.after.map { "{+\($0)+}" } ?? "")
return (patch.state.before.map { "{-\(unified($0, source: before))-}" } ?? "")
+ (patch.state.after.map { "{+\(unified($0, source: after))+}" } ?? "")
}
private func range(patch: Patch<Term>) -> Range<Int>? {