Lines Matching refs:Lines
153 // adaptStartOfLine will break after lines starting with /** if the comment
302 unsigned BreakableComment::getLineCount() const { return Lines.size(); }
308 // Don't break lines matching the comment pragmas regex.
338 // Lines starting with '@' commonly have special meaning.
339 // Lines starting with '-', '-#', '+' or '*' are bulleted/numbered lists.
379 .split(Lines, UseCRLF ? "\r\n" : "\n");
382 Content.resize(Lines.size());
383 Content[0] = Lines[0];
384 ContentColumn.resize(Lines.size());
387 Tokens.resize(Lines.size());
388 for (size_t i = 1; i < Lines.size(); ++i)
400 if (Lines.size() >= 2 && Content[1].startswith("**") &&
406 if (Lines.size() == 1 && !FirstInLine) {
409 // lines with the first one.
414 for (size_t i = 1, e = Lines.size(); i < e && !Decoration.empty(); ++i) {
426 for (size_t i = 1, e = Lines.size(); i < e; ++i) {
433 // Align the star in the last '*/' with the stars on the previous lines.
438 // For all other lines, set the start column to 0 if they're empty, so
447 // For all other lines, adjust the line to exclude the star and
465 if ((Lines[0] == "*" || Lines[0].startswith("* ")) && Lines.size() > 1) {
468 } else if (Lines[0].startswith("* ") && Lines.size() == 1) {
474 encoding::columnWidthWithTabs(Lines[0], ContentColumn[0],
484 for (size_t i = 0; i < Lines.size(); ++i) {
487 << "IN=" << (Content[i].data() - Lines[i].data()) << "\n";
495 // Don't break lines matching the comment pragmas regex.
510 size_t EndOfPreviousLine = Lines[LineIndex - 1].size();
511 if (InPPDirective && Lines[LineIndex - 1].endswith("\\"))
516 Lines[LineIndex - 1].find_last_not_of(Blanks, EndOfPreviousLine);
522 size_t StartOfLine = Lines[LineIndex].find_first_not_of(Blanks);
524 StartOfLine = Lines[LineIndex].size();
526 StringRef Whitespace = Lines[LineIndex].substr(0, StartOfLine);
527 // Adjust Lines to only contain relevant text.
529 Content[LineIndex - 1].data() - Lines[LineIndex - 1].data();
530 Content[LineIndex - 1] = Lines[LineIndex - 1].substr(
532 Content[LineIndex] = Lines[LineIndex].substr(StartOfLine);
534 // Adjust the start column uniformly across all lines.
550 if (LineIndex + 1 == Lines.size()) {
607 // the lines except for the last one, where the star in "*/" acts as a
610 if (LineIndex + 1 == Lines.size() &&
653 Lines[0].substr(1).find_first_not_of(Blanks) != StringRef::npos;
685 size_t BreakLength = Lines[0].substr(1).find_first_not_of(Blanks);
696 if (LineIndex + 1 == Lines.size()) {
703 // For other empty lines, if we do have a decoration, adapt it to not
745 if (Lines[LineIndex].ltrim(Blanks).startswith("*")) {
746 IndentContent = Lines[LineIndex].ltrim(Blanks).substr(1);
761 // applied in all following lines
770 size_t FirstLineIndex = Lines.size();
771 TokenText.split(Lines, "\n");
772 Content.resize(Lines.size());
773 ContentColumn.resize(Lines.size());
774 PrefixSpaceChange.resize(Lines.size());
775 Tokens.resize(Lines.size());
776 Prefix.resize(Lines.size());
777 OriginalPrefix.resize(Lines.size());
778 for (size_t i = FirstLineIndex, e = Lines.size(); i < e; ++i) {
779 Lines[i] = Lines[i].ltrim(Blanks);
780 StringRef IndentPrefix = getLineCommentIndentPrefix(Lines[i], Style);
786 // are to be added or removed, all lines after that just get only the
793 Lines[i].size() > IndentPrefix.size() &&
794 isAlphanumeric(Lines[i][IndentPrefix.size()])) {
805 if (Lines[i].size() != IndentPrefix.size()) {
814 assert(Lines[i].size() > IndentPrefix.size());
815 const auto FirstNonSpace = Lines[i][IndentPrefix.size()];
839 Content[i] = Lines[i].substr(IndentPrefix.size());
857 // would split the contents of the enum into two unwrapped lines in this
937 unsigned Offset = Lines[LineIndex - 1].data() +
938 Lines[LineIndex - 1].size() -
943 Lines[LineIndex].data() - tokenAt(LineIndex).TokenText.data() - Offset;
954 Lines[LineIndex].data() - tokenAt(LineIndex).TokenText.data();
956 Content[LineIndex].data() - Lines[LineIndex].data();
982 (Content[LineIndex].data() - Lines[LineIndex].data()) +
1018 if (Lines[LineIndex].startswith("//")) {
1019 IndentContent = Lines[LineIndex].substr(2);