code: function convertAcornCommentToEsprimaComment(
    block,
    text,
    start,
    end,
    startLoc,
    endLoc
  ) {
    const comment = {
      type: block ? 'Block' : 'Line',
      value: text
    };
  
    if (typeof start === 'number') {
      comment.start = start;
      comment.end = end;
      comment.range = [start, end];
    }
  
    if (typeof startLoc === 'object') {
      comment.loc = {
        start: startLoc,
        end: endLoc
      };
    }
  
    return comment;
  }
docs: From espree