code: function cleanAst(node) {
    var copy = {};
  
    Object.keys(node).forEach(function (key, i) {
      if (key !== 'parent' && key !== 'prev' && key !== 'next' && key !== '_items') {
        copy[key] = node[key];
      }
    });
  
    node = copy;
  
    if (node.nodes) {
      var children = node.nodes;
      node.nodes = [];
      children.forEach(function (childNode, i) {
        if (childNode.type) {
          node.nodes.push(cleanAst(childNode));
        } else {
          node.nodes.push(childNode);
        }
      });
    }
  
    return node;
  }
docs: /*
  Converts a node (and its descendants) into plain objects that can be serialized.
  @param {AstNode} node Node to convert.