Skip to content

Commit

Permalink
diffs/helper: remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
wti committed Oct 8, 2023
1 parent e2eb1aa commit a69c3ca
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions Tests/Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -241,47 +241,6 @@ func diffString(_ exp: String, _ act: String) -> String {
printLast()
return result
}
// func emitLast(_ current: Int) {
// precondition(current > start)
// if let insertOrRemove = insRemove {
// let prefix = insertOrRemove ? "ins" : "rem"
// let range = "\(start)" + (start == current - 1 ? "" : "-\(current)")
// let snippet: String
// if insertOrRemove { // insert
// let s = act.index(act.startIndex, offsetBy: start)
// let e = act.index(act.startIndex, offsetBy: current)
// snippet = "\(act[s..<e])"
// } else {
// let s = exp.index(exp.startIndex, offsetBy: start)
// let e = exp.index(exp.startIndex, offsetBy: current)
// snippet = "\(exp[s..<e])"
// }
// result += "\(prefix)[\(range)]: \(snippet)\n"
// insRemove = nil
// start = -1
// }
// }
// //let (next_insert, next_change, next_offset) = ico
// switch next {
// case let .insert(offset, c, _):
// if let d = diff, d.insert { // extend?
//
// }
// if insRemove ?? false {
// emitLast(offset)
// insRemove = true
// start = offset
// } // otherwise keep accumulating
// case let .remove(offset, c, _):
// if !(insRemove ?? true) {
// emitLast(offset)
// insRemove = false
// start = offset
// } // otherwise keep accumulating
// }
// }
// return result
//}

func diffSimple(
_ exp: String,
Expand Down

0 comments on commit a69c3ca

Please sign in to comment.