function enqueueNodeWithStartIndex(queue, node) {
  if (typeof node !== 'object' || node === null) {
    return;
  }
  if (node.range) {
    queue.push([node, node.range[0]]);
  } else if (Array.isArray(node)) {
    for (var ii = 0; ii < node.length; ii++) {
      enqueueNodeWithStartIndex(queue, node[ii]);
    }
  }
}
Helper function for analyzeAndTraverse which queues up all of the children
of the given node.

Children can also be found in arrays, so we basically want to merge all of
those arrays together so we can sort them and then traverse the children
in order.

One example is the Program node. It contains `body` and `comments`, both
arrays. Lexographically, comments are interspersed throughout the body
nodes, but esprima's AST groups them together.