docs: function(node, parent){
      var debug = this.debug;
  
      if (!node) {
        var msg;
        if (parent) {
          msg = 'A child of ' + parent.type + ' (' + (parent.filename || 'Pug') + ':' + parent.line + ')';
        } else {
          msg = 'A top-level node';
        }
        msg += ' is ' + node + ', expected a Pug AST Node.';
        throw new TypeError(msg);
      }
  
      if (debug && node.debug !== false && node.type !== 'Block') {
        if (node.line) {
          var js = ';pug_debug_line = ' + node.line;
          if (node.filename) js += ';pug_debug_filename = ' + stringify(node.filename);
          this.buf.push(js + ';');
        }
      }
  
      if (!this['visit' + node.type]) {
        var msg;
        if (parent) {
          msg = 'A child of ' + parent.type
        } else {
          msg = 'A top-level node';
        }
        msg += ' (' + (node.filename || 'Pug') + ':' + node.line + ')'
             + ' is of type ' + node.type + ','
             + ' which is not supported by pug-code-gen.'
        switch (node.type) {
        case 'Filter':
          msg += ' Please use pug-filters to preprocess this AST.'
          break;
        case 'Extends':
        case 'Include':
        case 'NamedBlock':
        case 'FileReference': // unlikely but for the sake of completeness
          msg += ' Please use pug-linker to preprocess this AST.'
          break;
        }
        throw new TypeError(msg);
      }
  
      this.visitNode(node);
    }