docs: function replaceSelectors(source, bareTokenList, getSubstitution){
    var target = new FastArray(new Array(source.length));
    var tokenList = new FastArray(bareTokenList);
    target.endCursor = 0;
  
    for (var i = source.length - 1; i >= 0; i--) {
      var token = tokenList.first();
      if (token && i === token.end) {
        var length = token.end - token.start;
  
        var substitution = getSubstitution(token);
        i -= length;
  
        for (var j = substitution.length - 1; j >= 0; j--) {
          target.push(substitution[j]);
        }
        tokenList.shift();
      } else {
        target.push(source[i]);
      }
    }
  
    return target;
  }