Recursively replace nodes in ast. The visitor function is called on each node. If
visitor returns a node or an array of nodes, those nodes replace the node passed to visitor.
If null is returned, the node is deleted. If undefined is returned, no replacement happens.
Recursively replace nodes in
ast
. Thevisitor
function is called on each node. Ifvisitor
returns a node or an array of nodes, those nodes replace the node passed tovisitor
. Ifnull
is returned, the node is deleted. Ifundefined
is returned, no replacement happens.