Lines Matching full:lines
153 // adaptStartOfLine will break after lines starting with /** if the comment
347 // Following lines are indented by the width of the brace and space if any.
416 unsigned BreakableComment::getLineCount() const { return Lines.size(); }
422 // Don't break lines matching the comment pragmas regex.
452 // Lines starting with '@' or '\' commonly have special meaning.
453 // Lines starting with '-', '-#', '+' or '*' are bulleted/numbered lists.
493 .split(Lines, UseCRLF ? "\r\n" : "\n");
496 Content.resize(Lines.size());
497 Content[0] = Lines[0];
498 ContentColumn.resize(Lines.size());
501 Tokens.resize(Lines.size());
502 for (size_t i = 1; i < Lines.size(); ++i)
514 if (Lines.size() >= 2 && Content[1].starts_with("**") &&
520 if (Lines.size() == 1 && !FirstInLine) {
523 // lines with the first one.
543 for (size_t i = 1, e = Lines.size(); i < e; ++i) {
550 // Align the star in the last '*/' with the stars on the previous lines.
554 // For all other lines, set the start column to 0 if they're empty, so
563 // For all other lines, adjust the line to exclude the star and
580 if ((Lines[0] == "*" || Lines[0].starts_with("* ")) && Lines.size() > 1) {
583 } else if (Lines[0].starts_with("* ") && Lines.size() == 1) {
589 encoding::columnWidthWithTabs(Lines[0], ContentColumn[0],
599 for (size_t i = 0; i < Lines.size(); ++i) {
602 << "IN=" << (Content[i].data() - Lines[i].data()) << "\n";
610 // Don't break lines matching the comment pragmas regex.
625 size_t EndOfPreviousLine = Lines[LineIndex - 1].size();
626 if (InPPDirective && Lines[LineIndex - 1].ends_with("\\"))
631 Lines[LineIndex - 1].find_last_not_of(Blanks, EndOfPreviousLine);
637 size_t StartOfLine = Lines[LineIndex].find_first_not_of(Blanks);
639 StartOfLine = Lines[LineIndex].size();
641 StringRef Whitespace = Lines[LineIndex].substr(0, StartOfLine);
642 // Adjust Lines to only contain relevant text.
644 Content[LineIndex - 1].data() - Lines[LineIndex - 1].data();
645 Content[LineIndex - 1] = Lines[LineIndex - 1].substr(
647 Content[LineIndex] = Lines[LineIndex].substr(StartOfLine);
649 // Adjust the start column uniformly across all lines.
670 if (LineIndex + 1 == Lines.size()) {
675 bool HasDecoration = Lines[LineIndex].ltrim().starts_with(Decoration);
718 // the lines except for the last one, where the star in "*/" acts as a
721 if (LineIndex + 1 == Lines.size() &&
765 Lines[0].substr(1).find_first_not_of(Blanks) != StringRef::npos;
797 size_t BreakLength = Lines[0].substr(1).find_first_not_of(Blanks);
809 if (LineIndex + 1 == Lines.size()) {
816 // For other empty lines, if we do have a decoration, adapt it to not
856 if (Lines[LineIndex].ltrim(Blanks).starts_with("*"))
857 IndentContent = Lines[LineIndex].ltrim(Blanks).substr(1);
873 // applied in all following lines
882 size_t FirstLineIndex = Lines.size();
883 TokenText.split(Lines, "\n");
884 Content.resize(Lines.size());
885 ContentColumn.resize(Lines.size());
886 PrefixSpaceChange.resize(Lines.size());
887 Tokens.resize(Lines.size());
888 Prefix.resize(Lines.size());
889 OriginalPrefix.resize(Lines.size());
890 for (size_t i = FirstLineIndex, e = Lines.size(); i < e; ++i) {
891 Lines[i] = Lines[i].ltrim(Blanks);
892 StringRef IndentPrefix = getLineCommentIndentPrefix(Lines[i], Style);
899 assert(Lines[i].size() > IndentPrefix.size());
900 const char FirstCommentChar = Lines[i][IndentPrefix.size()];
904 Lines[i].substr(IndentPrefix.size(), FirstCharByteSize),
924 // are to be added or removed, all lines after that just get only the
930 if (SpacesInPrefix < Minimum && Lines[i].size() > IndentPrefix.size() &&
942 if (Lines[i].size() != IndentPrefix.size()) {
950 assert(Lines[i].size() > IndentPrefix.size());
951 const auto FirstNonSpace = Lines[i][IndentPrefix.size()];
978 Content[i] = Lines[i].substr(IndentPrefix.size());
996 // would split the contents of the enum into two unwrapped lines in this
1076 unsigned Offset = Lines[LineIndex - 1].data() +
1077 Lines[LineIndex - 1].size() -
1082 Lines[LineIndex].data() - tokenAt(LineIndex).TokenText.data() - Offset;
1093 Lines[LineIndex].data() - tokenAt(LineIndex).TokenText.data();
1095 Content[LineIndex].data() - Lines[LineIndex].data();
1121 (Content[LineIndex].data() - Lines[LineIndex].data()) +
1156 if (Lines[LineIndex].starts_with("//"))
1157 IndentContent = Lines[LineIndex].substr(2);