code: function ancestor(node, visitors, base, state) {
    if (!base) base = exports.base;
    if (!state) state = [];(function c(node, st, override) {
      var type = override || node.type,
          found = visitors[type];
      if (node != st[st.length - 1]) {
        st = st.slice();
        st.push(node);
      }
      base[type](node, st, c);
      if (found) found(node, st);
    })(node, state);
  }
docs: An ancestor walk builds up an array of ancestor nodes (including the current node) and passes them to the callback as the state parameter.