1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Stringify indexed terms.

This commit is contained in:
Rob Rix 2015-11-02 17:26:28 -05:00
parent 700e2a84a1
commit 1242534be6

View File

@ -3,6 +3,8 @@ private func unified(term: Term, source: String) -> String {
switch syntax {
case .Leaf:
return (String(source.utf16[info.range]), info.range)
case let .Indexed(i):
return (unified(info.range, children: i, source: source), info.range)
default:
return ("", info.range)
}