1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

Stringify keyed terms.

This commit is contained in:
Rob Rix 2015-11-02 17:28:21 -05:00
parent 02c31d7be4
commit 84e111c1c1

View File

@ -7,8 +7,13 @@ private func unified(term: Term, source: String) -> String {
return (unified(info.range, children: i, source: source), info.range)
case let .Fixed(f):
return (unified(info.range, children: f, source: source), info.range)
default:
return ("", info.range)
case let .Keyed(k):
return (unified(info.range, children: k.values.sort { a, b in
if let a = a.1, b = b.1 {
return a.startIndex < b.startIndex
}
return false
}, source: source), info.range)
}
}.0
}