Iterator of :class:`stravalib.model.ActivityComment` objects for this activity.
321796
def comments(self):
        
        if self._comments is None:
            self.assert_bind_client()
            if self.comment_count > 0:
                self._comments = self.bind_client.get_activity_comments(self.id)
            else:
                # Shortcut if we know there aren't any
                self._comments = []
        return self._comments
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
494045
function sortComments(comments) {
    comments.sort(comp);
    $.each(comments, function() {
      this.children = sortComments(this.children);
    });
    return comments;
  }
1126246
@Override
    public R visitComment(CommentTree node, P p) {
        return defaultAction(node, p);
    }
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 '/'");
    }
  }
1336173
void writeClassComment(Definition def, Writer out) throws IOException
   {
      out.write("/**\n");
      out.write(" * " + getClassName(def));
      writeEol(out);
      out.write(" *\n");
      out.write(" * @version $Revision: $\n");
      out.write(" */\n");
   }
1142539
function getCommentLineNumbers(comments) {
            const lines = new Set();

            comments.forEach(comment => {
                for (let i = comment.loc.start.line; i <= comment.loc.end.line; i++) {
                    lines.add(i);
                }
            });

            return lines;
        }
1004640
private void processNestedComment() {
        int nestedCommentsAmount = 1; // Starting with just the initial comment.
        while (templateReader.hasNextCharacter()) {
            final char commentCharacter = templateReader.nextCharacter();
            if (isCommentClosingMarker(commentCharacter) && templateReader.hasNextCharacter()
                    && templateReader.peekCharacter() == syntax.getTagClosing()) {
                // Character was a comment closing sign and the next tag closed the comment.
                templateReader.nextCharacter(); // Polling tag closing.
                if (--nestedCommentsAmount == 0) {
                    // All comments ended. Returning.
                    break;
                }
            }
            if (commentCharacter == syntax.getTagOpening() && templateReader.hasNextCharacter()
                    && isCommentOpeningMarker(templateReader.peekCharacter())) {
                // Another comment was opened inside the currently parsed one.
                templateReader.nextCharacter(); // Polling comment opening marker.
                nestedCommentsAmount++;
            }
        }
    }
1201555
def get_comments(self):
        
        if self.retrieved:
            raise errors.IllegalState('List has already been retrieved.')
        self.retrieved = True
        return objects.CommentList(self._results, runtime=self._runtime)
85382
public static String printComments(String indent, List<JavaComment> comments) {
        final StringBuilder builder = new StringBuilder();
        for (JavaComment comment : comments) {
            builder.append(print(indent, comment));
            builder.append("\n");
        }
        return builder.toString();
    }
578686
def _get_comments(group_tasks):
    
    comments = {}
    for status, human in _COMMENTS:
        num_tasks = _get_number_of_tasks_for(status, group_tasks)
        if num_tasks:
            space = "    " if status in _PENDING_SUB_STATUSES else ""
            comments[status] = '{space}* {num_tasks} {human}:\n'.format(
                space=space,
                num_tasks=num_tasks,
                human=human)
    return comments
614340
protected List<Map<String, ?>> generateComments() {
		final List<Map<String, ?>> list = new ArrayList<>();
		// Block comment
		list.add(pattern(it -> {
			it.delimiters("(/\\*+)", "(\\*/)"); //$NON-NLS-1$ //$NON-NLS-2$
			it.style(BLOCK_COMMENT_STYLE);
			it.beginStyle(BLOCK_COMMENT_DELIMITER_STYLE);
			it.endStyle(BLOCK_COMMENT_DELIMITER_STYLE);
			it.pattern(it2 -> {
				it2.matches("^\\s*(\\*)(?!/)"); //$NON-NLS-1$
				it2.style(BLOCK_COMMENT_DELIMITER_STYLE);
			});
			it.comment("Multiline comments"); //$NON-NLS-1$
		}));
		// Line comment
		list.add(pattern(it -> {
			it.matches("\\s*(//)(.*)$"); //$NON-NLS-1$
			it.substyle(1, LINE_COMMENT_DELIMITER_STYLE);
			it.substyle(2, LINE_COMMENT_STYLE);
			it.comment("Single-line comment"); //$NON-NLS-1$
		}));
		return list;
	}
267320
def get_functions(cls, entry):
        
        comments = []
        query = "./comment[@type='function']"
        for comment in entry.iterfind(query):
            text = comment.find('./text').text
            comments.append(models.Function(text=text))

        return comments
154516
public function getCommentsStatisticByActivity()
    {
        $comments = $this->model::select(['is_active', DB::raw('count(*) as total')])
            ->groupBy('is_active')
            ->get();

        return $comments;
    }
23161
public String[] readComments() throws IOException {
        List<String> list = new LinkedList<String>();
        while (true) {
            mark(1024); // Line length equal 1024 at most
            String line = readTrimmedLine();
            if (line.length() > 0)
                if (line.charAt(0) != '%') {
                    reset();
                    break;
                } else
                    list.add(line.substring(1));
        }
        return list.toArray(new String[list.size()]);
    }
640404
def iter_comments(self, number=-1):
        
        url = self._build_url('comments', base_url=self._api)
        return self._iter(int(number), url, IssueComment)
79316
private List<String> parseComment(List<String> content, String propertyName) {
        List<String> comments = new ArrayList<>();
        String commentEnd = content.get(annotationIndex - 1).trim();
        if (commentEnd.equals("*/")) {
            int startCommentIndex = -1;
            for (int index = annotationIndex - 1; index >= 0; index--) {
                String line = content.get(index).trim();
                if (line.equals("/**")) {
                    startCommentIndex = index + 1;
                    break;
                }
            }
            if (startCommentIndex == -1) {
                throw new BeanCodeGenException("Unable to locate comment start at line " + annotationIndex, beanParser.getFile(), annotationIndex);
            }
            if (startCommentIndex < annotationIndex - 1) {
                for (int i = startCommentIndex; i < annotationIndex - 1; i++) {
                    String commentLine = content.get(i).trim();
                    if (commentLine.startsWith("*")) {
                        commentLine = commentLine.substring(1).trim();
                    }
                    if (commentLine.startsWith("@return") == false && commentLine.startsWith("@param") == false &&
                            commentLine.startsWith("@throws") == false && commentLine.startsWith("@exception") == false) {
                        comments.add(commentLine);
                    }
                }
                String firstLine = comments.get(0);
                if (firstLine.length() > 0) {
                    comments.set(0, firstLine.substring(0, 1).toLowerCase(Locale.ENGLISH) + firstLine.substring(1));
                } else {
                    comments.remove(0);
                }
            }
        } else if (commentEnd.startsWith("/**") && commentEnd.endsWith("*/")) {
            int startPos = commentEnd.indexOf("/**") + 3;
            int endPos = commentEnd.lastIndexOf("*/");
            String comment = commentEnd.substring(startPos, endPos).trim();
            if (comment.length() > 0) {
                comments.add(comment.substring(0, 1).toLowerCase(Locale.ENGLISH) + comment.substring(1));
            }
        }
        if (comments.size() == 0) {
            comments.add("the " + propertyName + ".");
        }
        return comments;
    }