mirror of
https://github.com/github/semantic.git
synced 2024-12-25 16:02:43 +03:00
Add a property computing a single-element range from an index.
This commit is contained in:
parent
ead261d459
commit
c6ec6fa311
@ -144,6 +144,13 @@ func parserForType(type: String) -> String throws -> Term {
|
||||
}
|
||||
}
|
||||
|
||||
extension ForwardIndexType {
|
||||
/// The range encompassing a single index.
|
||||
var range: Range<Self> {
|
||||
return self..<self.successor()
|
||||
}
|
||||
}
|
||||
|
||||
func refineLeafReplacement(diff: Diff, aString: String, bString: String) -> Diff {
|
||||
switch diff {
|
||||
case let .Pure(.Replace(.Unroll(aExtract, .Leaf), .Unroll(bExtract, .Leaf))):
|
||||
|
Loading…
Reference in New Issue
Block a user