visitOtherElement method
Implementation
void visitOtherElement(bool Function(Node current) visitor) {
Node? current = parent;
var success = false;
while (current != null) {
if (success = visitor(current)) return;
current = current.parent;
}
if (!success) {
current = child;
while (current != null) {
if (visitor(current)) return;
current = current.child;
}
}
}