code: function verify(visitor) {
    if (visitor._verified) return;
  
    if (typeof visitor === "function") {
      throw new Error(messages.get("traverseVerifyRootFunction"));
    }
  
    for (var nodeType in visitor) {
      if (shouldIgnoreKey(nodeType)) continue;
  
      if (t.TYPES.indexOf(nodeType) < 0) {
        throw new Error(messages.get("traverseVerifyNodeType", nodeType));
      }
  
      var visitors = visitor[nodeType];
      if (typeof visitors === "object") {
        for (var visitorKey in visitors) {
          if (visitorKey === "enter" || visitorKey === "exit") continue;
          throw new Error(messages.get("traverseVerifyVisitorProperty", nodeType, visitorKey));
        }
      }
    }
  
    visitor._verified = true;
  }
docs: [Please add a description.]