docs: function(ast) {
      let needCompaction = function(c) {
        return t.isExpressionStatement(c)
                  && t.isAssignmentExpression(c.expression)
                  && c.expression.left.name === 'pug_html'
                  && t.isBinaryExpression(c.expression.right)
                  && c.expression.right.left.name === 'pug_html'
      }
  
      let walk = function (node) {
        Object.keys(node).forEach(function(k) {
          var child = node[k];
          if (child && typeof child === "object" && child.length) {
            child.forEach(function (c) {
              if (c && typeof c.type === 'string') {
                walk(c);
              }
            });
            let i,j;
            for (i=0; i<child.length; i++) {
              let start, end;
              let fragment = [t.identifier('pug_html')]
              if (needCompaction(child[i])) {
                start = i;
                end = i;
                // locate sequential buffer operations
                while (needCompaction(child[end]) && end < child.length && fragment.length < 101) {
                  fragment.push(child[end].expression.right.right)
                  end++;
                }
  
                // join adjacent stringLiterals
                for (j=0; j<fragment.length;j++) {
                  let start, end;
                  if (t.isStringLiteral(fragment[j])) {
                    start = j;
                    end = j;
                    while (t.isStringLiteral(fragment[end]) && end < fragment.length) {
                     end++
                    }
                    let lit = t.stringLiteral(fragment.slice(start, end).map(function(v) { return v.value}).join(''));
                    lit.extra = { rawValue: lit.value, raw: stringify(lit.value)}
                    fragment.splice(start, end-start, lit)
                  }
                }
  
                // join fragments
                let expr =
                  t.expressionStatement(
                    t.assignmentExpression(
                      '=',
                      t.identifier('pug_html'),
                      fragment.reduce(function(acc, val) {
                        return t.binaryExpression('+', acc, val);
                      })
                    )
                  )
                child.splice(start, end-start, expr)
              }
            }
          } else if (child && typeof child.type === 'string') {
            walk(child);
          }
        })      
      };
      walk(ast);
      return ast;
    }