[walker] Allow recursive walks without building a new walker obj

This commit is contained in:
Marijn Haverbeke 2013-01-08 13:17:37 +01:00
parent cc5971f617
commit e6485e61fd

View File

@ -34,7 +34,7 @@
// their child nodes (by calling their third argument on these
// nodes).
exports.recursive = function(node, state, funcs, base) {
var visitor = exports.make(funcs, base);
var visitor = funcs ? exports.make(funcs, base) : base;
function c(node, st, override) {
visitor[override || node.type](node, st, c);
}