Lines Matching refs:Style
39 LevelIndentTracker(const FormatStyle &Style,
42 : Style(Style), Keywords(Keywords), AdditionalIndent(AdditionalIndent) {
44 IndentForLevel.push_back(Style.IndentWidth * i + AdditionalIndent);
59 Indent = Line.Level * Style.IndentWidth + AdditionalIndent;
88 if (Style.Language == FormatStyle::LK_Java ||
89 Style.Language == FormatStyle::LK_JavaScript)
95 return Style.AccessModifierOffset;
109 return getIndent(IndentForLevel, Level - 1) + Style.IndentWidth;
112 const FormatStyle &Style;
131 LineJoiner(const FormatStyle &Style, const AdditionalKeywords &Keywords,
133 : Style(Style), Keywords(Keywords), End(Lines.end()),
145 if (MergedLines > 0 && Style.ColumnLimit == 0)
177 if (Style.ColumnLimit > 0 && Indent > Style.ColumnLimit)
181 Style.ColumnLimit == 0 ? UINT_MAX : Style.ColumnLimit - Indent;
191 Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All ||
192 (Style.AllowShortFunctionsOnASingleLine >= FormatStyle::SFS_Empty &&
194 (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Inline &&
202 return !Style.BraceWrapping.AfterFunction
207 Style.BraceWrapping.AfterFunction) {
212 if (Limit <= 2 || (Style.ColumnLimit == 0 && containsMustBreak(TheLine)))
227 return Style.AllowShortIfStatementsOnASingleLine
232 return Style.AllowShortLoopsOnASingleLine
237 return Style.AllowShortCaseLabelsOnASingleLine
266 if (Style.BraceWrapping.AfterControlStatement &&
267 (I[1]->First->is(tok::l_brace) && !Style.AllowShortBlocksOnASingleLine))
326 if (Style.Language != FormatStyle::LK_Java &&
331 // are in a control flow statements as well as several style flags.
338 if (!Style.AllowShortBlocksOnASingleLine)
340 if (!Style.AllowShortIfStatementsOnASingleLine &&
343 if (!Style.AllowShortLoopsOnASingleLine &&
446 const FormatStyle &Style;
476 const FormatStyle &Style,
478 : Indenter(Indenter), Whitespaces(Whitespaces), Style(Style),
521 Previous.Children[0]->Level * Style.IndentWidth;
546 if (Style.ColumnLimit > 0 &&
548 Style.ColumnLimit)
567 const FormatStyle &Style;
576 const FormatStyle &Style,
578 : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {}
603 WhitespaceManager *Whitespaces, const FormatStyle &Style,
605 : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {}
625 const FormatStyle &Style,
627 : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {}
800 LineJoiner Joiner(Style, Keywords, Lines);
811 LevelIndentTracker IndentTracker(Style, Keywords, Lines[0]->Level,
852 if (Style.ColumnLimit == 0)
853 NoColumnLimitLineFormatter(Indenter, Whitespaces, Style, this)
856 Penalty += NoLineBreakFormatter(Indenter, Whitespaces, Style, this)
859 Penalty += OptimizingLineFormatter(Indenter, Whitespaces, Style, this)
914 std::min(RootToken.NewlinesBefore, Style.MaxEmptyLinesToKeep + 1);
926 if (!Style.KeepEmptyLinesAtTheStartOfBlocks && PreviousLine &&
961 return Style.ColumnLimit - (ContinuesPPDirective ? 2 : 0);