Please fix me if I am wrong, but I believe for the cases when we have really big children nodes in the $children array property, the code might be crashed to the memory limit when we take $this->getChildren() in visitors.
In fact, would be great to make each visitor (TraversalPreOrder, TraversalPostOrder) via generators.
There is a yield visitor, but in fact, it does not have anything in common with the generator
Please fix me if I am wrong, but I believe for the cases when we have really big children nodes in the
$childrenarray property, the code might be crashed to the memory limit when we take$this->getChildren()in visitors.In fact, would be great to make each visitor (TraversalPreOrder, TraversalPostOrder) via generators.
There is a yield visitor, but in fact, it does not have anything in common with the generator