docs: function(){
      var ast = [];
      if (this.pp) {
        ast.push(t.variableDeclaration('var', [t.variableDeclarator(t.identifier('pug_indent'), t.arrayExpression())]));
      }
      
      push.apply(ast, this.visit(this.node));
      
      if (!this.dynamicMixins) {
        // if there are no dynamic mixins we can remove any un-used mixins
        var mixinNames = Object.keys(this.mixins);
        for (var i = 0; i < mixinNames.length; i++) {
          var mixin = this.mixins[mixinNames[i]];
          if (!mixin.used) {
            for (var x = 0; x < mixin.instances.length; x++) {
              mixin.instances[x].stmt.type = "EmptyStatement";
              delete mixin.instances[x].stmt.expression;
            }
          }
        }
      }
  
      
      if (this.options.self) {
        ast = [
          t.variableDeclaration('var', [
            t.variableDeclarator(t.identifier('self'), t.logicalExpression('||', t.identifier('locals'), t.objectExpression([])))
          ])
        ].concat(ast);
      } else {
        // transform `ast` into `with(locals || {}) { ast }`
        ast = this.ast_with(ast);
      }
  
  
      if (this.debug) {
        if (this.options.includeSources) {
          ast.unshift(t.variableDeclaration('var', [
            t.variableDeclarator(t.identifier('pug_debug_sources'), this.parseExpr(stringify(this.options.includeSources)))
          ]))
        }
  
   
        var rethrowArgs = [
                  t.identifier('err'),
                  t.identifier('pug_debug_filename'),
                  t.identifier('pug_debug_line')
                ]
        if (this.options.includeSources) {
            rethrowArgs.push(t.memberExpression(t.identifier('pug_debug_sources'), t.identifier('pug_debug_filename'), true))
        } 
        ast = [
          t.variableDeclaration('var', [
            t.variableDeclarator(t.identifier('pug_debug_filename'), null),
            t.variableDeclarator(t.identifier('pug_debug_line'), null)
          ]),
          t.tryStatement(
            t.blockStatement(ast),
            t.catchClause(
              t.identifier('err'),
              t.blockStatement([t.expressionStatement(t.callExpression(
                (this.inlineRuntimeFunctions ? t.identifier('pug_rethrow') : t.memberExpression(t.identifier('pug'), t.identifier('rethrow'))),
                rethrowArgs
              ))])
            )
          )
        ]
  
      }
  
      ast = t.functionDeclaration(
        t.identifier(this.options.templateName || 'template'),
        this.templateVars.map(function(v) { return t.identifier(v)}),
        t.blockStatement([this.ast_variableDeclaration()].concat(ast, this.ast_return()))
      )
  
      ast = this.ast_postprocess(ast);
  
      return buildRuntime(this.runtimeFunctionsUsed) + gen.default(ast).code;
    }