Is there a sense to add generic nodes to traversing, such as Expression, Function, Node, Statement, Declaration, Pattern?
That is done in ast-types, and that feature seems to be quite useful.
For example:
visit(ast, {
//walk into any node
Node: function(node){
}
});
Just an idea.