code: function split(nodes, filters) {
      var result = {};
      var nNodes = nodes.length, nFilters = filters.length;
      var iNode = 0;
      for (var iFilter = 0; iFilter < nFilters; iFilter++) {
          var filter = filters[iFilter];
          var next = [];
          while (iNode < nNodes && nodes[iNode].type === filter.type) {
              next.push(nodes[iNode]);
              iNode++;
          }
          result[filter.name] = next;
      }
      return result;
  }
docs: ([AST], [{ name: string, type: string }]) -> { string: AST, ... }