code: function markSpacesAndComments(tokens) {
    var tokensLength = tokens.length;
    var spaces = [-1, -1];
    var type; // Current token's type
  
    // For every token in the token list, mark spaces and line breaks
    // as spaces (set both `ws` and `sc` flags). Mark multiline comments
    // with `sc` flag.
    // If there are several spaces or tabs or line breaks or multiline
    // comments in a row, group them: take the last one's index number
    // and save it to the first token in the group as a reference:
    // e.g., `ws_last = 7` for a group of whitespaces or `sc_last = 9`
    // for a group of whitespaces and comments.
    for (var i = 0; i < tokensLength; i++) {
      type = tokens[i].type;
  
      if (type === TokenType.Space ||
          type === TokenType.Tab ||
          type === TokenType.Newline) {
        markSpace(tokens, i, spaces);
      } else if (type === TokenType.CommentML) {
        markComment(tokens, i, spaces);
      } else {
        markEndOfSpacesAndComments(tokens, i, spaces);
      }
    }
  
    markEndOfSpacesAndComments(tokens, i, spaces);
  }
docs: Mark whitespaces and comments
  @param {Array} tokens