Traverse the given AST node and its descendants depth-first order and calls the protected preVisit and postVisit methods for each node. When the methods return a different node, the node is replaced with the returned node.
Return
the modified root node.
Parameters
root AST node to traverse.