Lines Matching defs:RootToken
120 auto IsAccessModifier = [&](const FormatToken &RootToken) {
121 if (Line.Type == LT_AccessModifier || RootToken.isObjCAccessSpecifier())
124 const auto *Next = RootToken.Next;
127 if (RootToken.isOneOf(Keywords.kw_signals, Keywords.kw_qsignals) &&
138 return !Next && RootToken.isAccessSpecifier(false);
1556 const auto &RootToken = *Line.First;
1558 std::min(RootToken.NewlinesBefore, Style.MaxEmptyLinesToKeep + 1);
1560 if (RootToken.is(tok::r_brace) &&
1561 (!RootToken.Next ||
1562 (RootToken.Next->is(tok::semi) && !RootToken.Next->Next)) &&
1570 if (Newlines == 0 && !RootToken.IsFirst)
1572 if (RootToken.IsFirst &&
1573 (!Style.KeepEmptyLines.AtStartOfFile || !RootToken.HasUnescapedNewline)) {
1605 if (PreviousLine && RootToken.isAccessSpecifier()) {
1612 Newlines = std::max(RootToken.NewlinesBefore, 1u);
1636 (!PreviousLine->InPPDirective || !RootToken.HasUnescapedNewline)) {
1639 if (!RootToken.isAccessSpecifier()) {
1648 if (RootToken.is(tok::r_brace)) // Do not add at end of class.
1665 FormatToken &RootToken = *Line.First;
1666 if (RootToken.is(tok::eof)) {
1668 RootToken.NewlinesBefore,
1671 Whitespaces->replaceWhitespace(RootToken, Newlines, TokenIndent,
1676 if (RootToken.Newlines < 0) {
1677 RootToken.Newlines =
1679 assert(RootToken.Newlines >= 0);
1682 if (RootToken.Newlines > 0)
1694 Whitespaces->replaceWhitespace(RootToken, RootToken.Newlines, Indent, Indent,
1697 !RootToken.HasUnescapedNewline);