treeDoWithParent

fun treeDoWithParent(    self: A_Phrase,     parentNode: A_Phrase? = null,     children: (A_Phrase, (A_Phrase) -> Unit) -> Unit = { phrase, withChild -> phrase.childrenDo(withChild) },     aBlock: (A_Phrase, parent: A_Phrase?) -> Unit)

Visit the entire tree with the given consumer, children before parents. The block takes two arguments: the phrase and its parent.

Parameters

self

The current A_Phrase.

parentNode

This phrase's parent, or null. Defaults to null.

aBlock

What to do with each descendant.