Home | History | Annotate | Download | only in Format

Lines Matching refs:NewLines

110   void replaceWhitespace(const AnnotatedToken &Tok, unsigned NewLines,
113 // 2+ newlines mean an empty line separating logic scopes.
114 if (NewLines >= 2)
134 Comment.NewLines = NewLines;
136 NewLines > 0 ? Spaces : WhitespaceStartColumn + Spaces;
151 storeReplacement(Tok.FormatTok, getNewLineText(NewLines, Spaces));
155 /// backslashes to escape newlines inside a preprocessor directive.
158 /// \c Newlines == 0.
159 void replacePPWhitespace(const AnnotatedToken &Tok, unsigned NewLines,
164 getNewLineText(NewLines, Spaces, WhitespaceStartColumn, Style));
226 std::string getNewLineText(unsigned NewLines, unsigned Spaces) {
227 return std::string(NewLines, '\n') + std::string(Spaces, ' ');
231 getNewLineText(unsigned NewLines, unsigned Spaces,
234 if (NewLines > 0) {
237 for (unsigned i = 0; i < NewLines; ++i) {
251 unsigned NewLines;
281 storeReplacement(I->Tok, std::string(I->NewLines, '\n') +
572 unsigned NewLines = 1;
574 NewLines =
575 std::max(NewLines, std::min(Current.FormatTok.NewlinesBefore,
578 Whitespaces.replaceWhitespace(Current, NewLines, State.Column,
581 Whitespaces.replacePPWhitespace(Current, NewLines, State.Column,
1086 unsigned Newlines = Text.count('\n');
1087 if (Newlines > 0)
1091 FormatTok.NewlinesBefore += Newlines;
1092 FormatTok.HasUnescapedNewline |= EscapedNewlines != Newlines;
1104 // In case the token starts with escaped newlines, we want to
1108 // spaces or newlines in the middle of tokens?
1200 unsigned NewLines = std::min(FirstTok.NewlinesBefore, 1u);
1201 Whitespaces.replaceWhitespace(TheLine.First, NewLines, /*Indent*/ 0,
1500 unsigned Newlines =
1502 if (Newlines == 0 && !Tok.IsFirst)
1503 Newlines = 1;
1506 Whitespaces.replaceWhitespace(RootToken, Newlines, Indent, 0, Style);
1508 Whitespaces.replacePPWhitespace(RootToken, Newlines, Indent,