Get node with a single-line comment.
@return {Array} `['commentSL', x]` where `x` is comment's message
(without `//`)
428359
function getCommentSL() {
  const type = NodeType.CommentSLType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  const content = tokens[pos++].value.substring(2);
  const end = !content ? [line, column + 1]
    : getLastPosition(content, line, column + 2);

  return newNode(type, content, line, column, end);
}
147109
function findLeadingComments(comments, index, beginIndex, first) {
    const leadComments = [];
    if (first && ignoreComment.test(comments[index].raw)) {
        return leadComments;
    }
    let backIndex = index - 1;
    while (backIndex >= beginIndex &&
        (comments[backIndex].loc.end.line + 1 === comments[backIndex + 1].loc.start.line
            || comments[backIndex].loc.end.line === comments[backIndex + 1].loc.start.line)) {
        if (first && ignoreComment.test(comments[backIndex].raw)) {
            break;
        }
        backIndex -= 1;
    }
    for (let ind = backIndex + 1; ind <= index; ind += 1) {
        leadComments.push(comments[ind]);
    }
    return leadComments;
}
304319
function parse_comments_xml(data, opts) {
	/* 18.7.6 CT_Comments */
	if(data.match(/<(?:\w+:)?comments *\/>/)) return [];
	var authors = [];
	var commentList = [];
	var authtag = data.match(/<(?:\w+:)?authors>([\s\S]*)<\/(?:\w+:)?authors>/);
	if(authtag && authtag[1]) authtag[1].split(/<\/\w*:?author>/).forEach(function(x) {
		if(x === "" || x.trim() === "") return;
		var a = x.match(/<(?:\w+:)?author[^>]*>(.*)/);
		if(a) authors.push(a[1]);
	});
	var cmnttag = data.match(/<(?:\w+:)?commentList>([\s\S]*)<\/(?:\w+:)?commentList>/);
	if(cmnttag && cmnttag[1]) cmnttag[1].split(/<\/\w*:?comment>/).forEach(function(x) {
		if(x === "" || x.trim() === "") return;
		var cm = x.match(/<(?:\w+:)?comment[^>]*>/);
		if(!cm) return;
		var y = parsexmltag(cm[0]);
		var comment = ({ author: y.authorId && authors[y.authorId] || "sheetjsghost", ref: y.ref, guid: y.guid });
		var cell = decode_cell(y.ref);
		if(opts.sheetRows && opts.sheetRows <= cell.r) return;
		var textMatch = x.match(/<(?:\w+:)?text>([\s\S]*)<\/(?:\w+:)?text>/);
		var rt = !!textMatch && !!textMatch[1] && parse_si(textMatch[1]) || {r:"",t:"",h:""};
		comment.r = rt.r;
		if(rt.r == "<t></t>") rt.t = rt.h = "";
		comment.t = rt.t.replace(/\r\n/g,"\n").replace(/\r/g,"\n");
		if(opts.cellHTML) comment.h = rt.h;
		commentList.push(comment);
	});
	return commentList;
}
1265412
function getDescriptions(comments) {
  var ret = {
    component: comments.description || null,
    props: {}
  };
  comments.tags.forEach(function (tag) {
    if (tag.name) {
      ret.props[tag.name] = tag.description || null;
    }
  });
  return ret;
}
622896
function isCommentLine (line) {
  var isCmnt = commentRE.test(line);
  if (isCmnt) {
    debug('removing comment: %s', line);
  }
  return !isCmnt;
}
827294
function getComments(comments) {
  if (!comments || !comments.body) return {};

  Object.assign(comments, {
    create_time: formatTime(comments.created_at),
    update_time: formatTime(comments.updated_at)
  })

  return comments;
}
774041
function getLastCommentLineOfBlock(commentStartLine) {
            const currentCommentEnd = commentEndLine[commentStartLine];

            return commentEndLine[currentCommentEnd + 1] ? getLastCommentLineOfBlock(currentCommentEnd + 1) : currentCommentEnd;
        }
118080
protected function getComment() {
		$comment_body = elgg_view('output/longtext', array(
			'value' => $this->comment->description,
		));
//		if (elgg_view_exists('output/linkify')) {
//			$comment_body = elgg_view('output/linkify', array(
//				'value' => $comment_body
//			));
//		}
		$comment_body .= elgg_view('output/attached', array(
			'entity' => $this->comment,
		));

		$attachments = $this->comment->getAttachments(array('limit' => 0));
		if ($attachments && count($attachments)) {
			$attachments = array_map(__NAMESPACE__ . '\\get_linked_entity_name', $attachments);
			$attachments_text = implode(', ', array_filter($attachments));
			if ($attachments_text) {
				$comment_body .= elgg_echo('interactions:attachments:labelled', array($attachments_text));
			}
		}

		return strip_tags($comment_body, '<p><strong><em><span><ul><li><ol><blockquote><img><a>');
	}
713738
public static String getTextFromComment(Comment comment) {
    switch (comment.getStyle()) {
      case BLOCK:
        return comment.getText().replaceAll("^\\s*/\\*\\s*(.*?)\\s*\\*/\\s*", "$1");
      case LINE:
        return comment.getText().replaceAll("^\\s*//\\s*", "");
      default:
        return comment.getText();
    }
  }
638021
def comment(parent, indent)
      return unless accept :comment

      # Get first comment line
      buffer = accept(:line_feed)
      buffer += accept(:newline) || ''

      # Get indented comment lines
      buffer += get_indented_lines indent

      # If we have a comment which is visible in the output, we will
      # create a new comment element. Otherwise, we ignore the current
      # gathered text and we simply begin the root parsing again
      if buffer[0] == '!'
        offset = 1
        options = {}

        # Allow leading comment newline
        if buffer[1] == '^'
          offset = 2
          options[:newline] = true
        end

        parent[@children] << [
          :comment,
          buffer[offset..-1].strip,
          options,
          nil,
          indent
        ]
      end

      parent
    end
412092
def comment(text)
      comment_node = ::Nokogiri::XML::Comment.new(doc, " #{text} ")
      current_element.add_child(comment_node)
    end
92937
def mkcomments(commentfile)
      unless commentfile.nil?
        comms = Comments.new()
        File.open(@destination + '/xl/'+commentfile.gsub('../', ''), 'r') do |f|
          Ox.sax_parse(comms, f)
        end
        return comms.commarray
      end
    end
376821
function () {
                var comment;

                if (input.charAt(i) !== '/') return;

                if (input.charAt(i + 1) === '/') {
                    return new(tree.Comment)($(/^\/\/.*/), true);
                } else if (comment = $(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/)) {
                    return new(tree.Comment)(comment);
                }
            }
324217
function(node, desc) {
    node.content = ' ' + (desc || node.type);
    node.type = NodeType.COMMENT;
    return false;
  }
36301
function collectComments(content, comments) {

    const table = []

    let from = 0
    let end

    while (true) {

        let start = content.indexOf('/*', from)

        if (start > -1) {

            end = content.indexOf('*/', start + 2)

            if (end > -1) {
                comments.push(content.slice(start + 2, end))
                table.push(content.slice(from, start))
                table.push('/*___PRESERVE_CANDIDATE_COMMENT_' + (comments.length - 1) + '___*/')
                from = end + 2

            } else {
                // unterminated comment
                end = -2
                break
            }

        } else {
            break
        }
    }

    table.push(content.slice(end + 2))

    return table.join('')
}
1254450
function(comment){
    var ast = [];
    if (!comment.buffer) return;
    if (this.pp) push.apply(ast, this.prettyIndent(1, true));
    push.apply(ast, this.buffer('<!--' + (comment.val || '')));
    push.apply(ast, this.visit(comment.block, comment));
    if (this.pp) push.apply(ast, this.prettyIndent(1, true));
    push.apply(ast, this.buffer('-->'));
    return ast;
  }
1043923
function comment() {
        whitespace();

        if (css[0] !== '/' || css[1] !== '*') {
            return;
        }

        let i = 2;

        while (css[i] && (css[i] !== '*' || css[i + 1] !== '/')) {
            i++;
        }

        if (!css[i]) {
            return error('end of comment is missing');
        }

        const str = css.slice(2, i);

        css = css.slice(i + 2);

        return {
            type   : 'comment',
            comment: str
        };
    }