Earlier we had Parent and this is how it was processed:
for rule in graph.outgoing(current_rule, PARENT):
for ancestor in context(current_location):
Edit edit = get_edit(rule, ancestor)
if edit :
return edit
For ParentIterative we do something subtly different. We loop over the ancestors in the outer most loop:
And its processed something like :
for ancestor in context(current_location):
for rule in graph.outgoing(current_rule, PARENT_ITERATIVE):
Edit edit = get_edit(rule, ancestor)
if edit :
return edit
Why suffix iterative? I thought its keeping to iterative-deepening idea from DFS.
I am open to other names.
But this pattern makes it easy to transform builder patterns (As required by Scala upgrade folks)
Earlier we had
Parent
and this is how it was processed:For
ParentIterative
we do something subtly different. We loop over the ancestors in the outer most loop: And its processed something like :Why suffix iterative? I thought its keeping to iterative-deepening idea from DFS. I am open to other names. But this pattern makes it easy to transform builder patterns (As required by Scala upgrade folks)