Reads a comment and returns its body.
17908
private String readComment() {
    if (pos == data.length || data[pos] != '/') throw new AssertionError();
    pos++;
    int commentType = pos < data.length ? data[pos++] : -1;
    if (commentType == '*') {
      StringBuilder result = new StringBuilder();
      boolean startOfLine = true;

      for (; pos + 1 < data.length; pos++) {
        char c = data[pos];
        if (c == '*' && data[pos + 1] == '/') {
          pos += 2;
          return result.toString().trim();
        }
        if (c == '\n') {
          result.append('\n');
          newline();
          startOfLine = true;
        } else if (!startOfLine) {
          result.append(c);
        } else if (c == '*') {
          if (data[pos + 1] == ' ') {
            pos += 1; // Skip a single leading space, if present.
          }
          startOfLine = false;
        } else if (!Character.isWhitespace(c)) {
          result.append(c);
          startOfLine = false;
        }
      }
      throw unexpected("unterminated comment");
    } else if (commentType == '/') {
      if (pos < data.length && data[pos] == ' ') {
        pos += 1; // Skip a single leading space, if present.
      }
      int start = pos;
      while (pos < data.length) {
        char c = data[pos++];
        if (c == '\n') {
          newline();
          break;
        }
      }
      return new String(data, start, pos - 1 - start);
    } else {
      throw unexpected("unexpected '/'");
    }
  }
1136606
private static boolean isTargetComment(final String comment) {
		return comment != null
				&& comment.length() > 0
				&& (Character.isJavaIdentifierStart(comment.charAt(0)) || '#' == comment.charAt(0) || '(' == comment
						.charAt(0));
	}
203860
def get_comments_content_object(parser, token):
    
    keywords = token.contents.split()
    if len(keywords) != 5:
        raise template.TemplateSyntaxError(
            "'%s' tag takes exactly 2 arguments" % (keywords[0],))
    if keywords[1] != 'for':
        raise template.TemplateSyntaxError(
            "first argument to '%s' tag must be 'for'" % (keywords[0],))
    if keywords[3] != 'as':
        raise template.TemplateSyntaxError(
            "first argument to '%s' tag must be 'as'" % (keywords[0],))
    return GetCommentsContentObject(keywords[2], keywords[4])
699638
def handle_comment(self, comment):
        

        match = _COND_COMMENT_PATTERN.match(comment)
        if match is not None:
            cond = match.group(1)
            content = match.group(2)

            self._buffer.append(_COND_COMMENT_START_FORMAT % cond)
            self._push_status()
            self.feed(content)
            self._pop_status()
            self._buffer.append(_COND_COMMENT_END_FORMAT)
        elif not self.remove_comments:
            self._buffer.append(_COMMENT_FORMAT % comment)
390463
def handle_comment(self, comment):
        '''
            
        '''
        inTag = self._inTag
        if len(inTag) > 0:
            inTag[-1].appendText('<!-- %s -->' %(comment,))
        else:
            raise MultipleRootNodeException()
54263
protected void parseComment() {
        String comment = tokenizer.getToken();
        if (isTargetComment(comment)) {
            if (isIfComment(comment)) {
                parseIf();
            } else if (isBeginComment(comment)) {
                parseBegin();
            } else if (isEndComment(comment)) {
                return;
            } else {
                parseCommentBindVariable();
            }
        } else if(isHintComment(comment)){
            peek().addChild(new SqlNode("/*" + comment + "*/"));
        }
    }
1039395
def _parse_comment(self):
        """"""
        self._head += 4
        reset = self._head - 1
        self._push()
        while True:
            this = self._read()
            if this == self.END:
                self._pop()
                self._head = reset
                self._emit_text("<!--")
                return
            if this == self._read(1) == "-" and self._read(2) == ">":
                self._emit_first(tokens.CommentStart())
                self._emit(tokens.CommentEnd())
                self._emit_all(self._pop())
                self._head += 2
                if self._context & contexts.FAIL_NEXT:
                    # _verify_safe() sets this flag while parsing a template
                    # or link when it encounters what might be a comment -- we
                    # must unset it to let _verify_safe() know it was correct:
                    self._context ^= contexts.FAIL_NEXT
                return
            self._emit_text(this)
            self._head += 1
774587
def parse_comment(raw)
      c = nil
      if raw =~ /\A\((.+?)\)(.+)\z/
        c, raw = [$2, $1]
      end
      if raw =~ /\A(.+)\((.+?)\)\z/
        raw, c = [$1, $2]
      end
      [raw, c]
    end
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();
    }
  }
599537
def get_comment(self, id):
        """"""
        url = self._base_url + "/3/comment/{0}".format(id)
        json = self._send_request(url)
        return Comment(json, self)
672527
def getComment(self, repo_user, repo_name, comment_id):
        
        return self.api.makeRequest(
            ['repos', repo_user, repo_name,
             'pulls', 'comments', str(comment_id)])
622744
def _get_remarks_component(self, string, initial_pos):
    '''  '''
    remarks_code = string[initial_pos:initial_pos + self.ADDR_CODE_LENGTH]
    if remarks_code != 'REM':
      raise ish_reportException("Parsing remarks. Expected REM but got %s." % (remarks_code,))

    expected_length = int(string[0:4]) + self.PREAMBLE_LENGTH
    position = initial_pos + self.ADDR_CODE_LENGTH
    while position < expected_length:
      key = string[position:position + self.ADDR_CODE_LENGTH]
      if key == 'EQD':
        break
      chars_to_read = string[position + self.ADDR_CODE_LENGTH:position + \
                      (self.ADDR_CODE_LENGTH * 2)]
      chars_to_read = int(chars_to_read)
      position += (self.ADDR_CODE_LENGTH * 2)
      string_value = string[position:position + chars_to_read]
      self._remarks[key] = string_value
      position += chars_to_read
797014
def parse(source, remove_comments=True, **kw):
    """"""
    return ElementTree.parse(source, SourceLineParser(), **kw)
639518
protected function scanComment()
    {
        if (preg_match('/^ *\/\/(-)?([^\n]*)/', $this->input, $matches)) {
            $this->consume($matches[0]);
            $token         = $this->token('comment', isset($matches[2]) ? $matches[2] : '');
            $token->buffer = '-' !== $matches[1];

            return $token;
        }
    }
227954
private void parseComment() throws Exception {
        boolean saved = expandPE;

        expandPE = false;
        parseUntil(endDelimComment);
        require('>');
        expandPE = saved;
        handler.comment(dataBuffer, 0, dataBufferPos);
        dataBufferPos = 0;
    }
507971
def body(self):
        """"""

        if self._decoded_body == None:
            # Try to decode the JSON body. But raise an error if the
            # content-type is unexpected, or the JSON is invalid.

            raw_content_type = self.request.headers.get("content-type") or ""
            content_type = raw_content_type.split(";")[0].strip().lower()

            if content_type == "application/json":
                try:
                    self._decoded_body = escape.json_decode(self.request.body)
                except:
                    raise oz.json_api.ApiError("Bad JSON body")
            else:
                raise oz.json_api.ApiError("JSON body expected")

        return self._decoded_body
1103204
def _handle_comment(self, token):
        """"""
        self._push()
        while self._tokens:
            token = self._tokens.pop()
            if isinstance(token, tokens.CommentEnd):
                contents = self._pop()
                return Comment(contents)
            else:
                self._write(self._handle_token(token))
        raise ParserError("_handle_comment() missed a close token")