1
1
mirror of https://github.com/github/semantic.git synced 2024-12-27 17:05:33 +03:00

.Recursive replaces.

This commit is contained in:
Rob Rix 2015-10-15 11:47:27 -04:00
parent 2dbfd51f15
commit 7771edccf5

View File

@ -33,7 +33,8 @@ public struct Interpreter<Term: TermType> {
return recur(f(.Keyed(Dictionary(elements: b.keys.map { ($0, self.run(a[$0]!, b[$0]!)) }))))
default:
return nil
// This must not call `recur` directly with `a` and `b`, as that would infinite loop if actually recursive.
return recur(f(.Replace(a, b)))
}
default: