Lines Matching defs:Style

40   LevelIndentTracker(const FormatStyle &Style,
43 : Style(Style), Keywords(Keywords), AdditionalIndent(AdditionalIndent) {
45 IndentForLevel.push_back(Style.IndentWidth * i + AdditionalIndent);
60 Indent = Line.Level * Style.IndentWidth + AdditionalIndent;
68 Indent = Line.Level * Style.IndentWidth + Style.ContinuationIndentWidth;
98 if (Style.Language == FormatStyle::LK_Java ||
99 Style.Language == FormatStyle::LK_JavaScript || Style.isCSharp())
108 return Style.IndentAccessModifiers ? -Style.IndentWidth
109 : Style.AccessModifierOffset;
124 return getIndent(IndentForLevel, Level - 1) + Style.IndentWidth;
127 const FormatStyle &Style;
171 LineJoiner(const FormatStyle &Style, const AdditionalKeywords &Keywords,
173 : Style(Style), Keywords(Keywords), End(Lines.end()), Next(Lines.begin()),
184 if (MergedLines > 0 && Style.ColumnLimit == 0)
218 if (Style.ColumnLimit > 0 && Indent > Style.ColumnLimit)
222 Style.ColumnLimit == 0 ? UINT_MAX : Style.ColumnLimit - Indent;
231 !Style.BraceWrapping.SplitEmptyFunction &&
245 return !Style.BraceWrapping.SplitEmptyNamespace && EmptyBlock
253 return !Style.BraceWrapping.SplitEmptyRecord && EmptyBlock
258 Style.BraceWrapping.SplitEmptyRecord && EmptyBlock) {
266 Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All ||
267 (Style.AllowShortFunctionsOnASingleLine >= FormatStyle::SFS_Empty &&
269 (Style.AllowShortFunctionsOnASingleLine & FormatStyle::SFS_InlineOnly &&
272 if (Style.CompactNamespaces) {
315 return Style.AllowShortBlocksOnASingleLine != FormatStyle::SBS_Never
326 Style.BraceWrapping.AfterControlStatement ==
331 return (Style.ColumnLimit == 0 ||
332 TheLine->Last->TotalLength <= Style.ColumnLimit)
338 return (Style.BraceWrapping.AfterControlStatement ==
344 Style.BraceWrapping.AfterControlStatement ==
351 return (Style.ColumnLimit == 0 ||
352 TheLine->Last->TotalLength <= Style.ColumnLimit)
371 if (Style.BraceWrapping.SplitEmptyRecord &&
394 return !Style.BraceWrapping.AfterFunction ||
396 !Style.BraceWrapping.SplitEmptyRecord)
402 Style.BraceWrapping.AfterFunction) {
407 if (Limit <= 2 || (Style.ColumnLimit == 0 && containsMustBreak(TheLine)))
413 (Style.AllowShortFunctionsOnASingleLine >= FormatStyle::SFS_Empty &&
433 (IsElseLine() && (Style.AllowShortIfStatementsOnASingleLine ==
435 return Style.AllowShortIfStatementsOnASingleLine
440 return Style.AllowShortLoopsOnASingleLine
445 return Style.AllowShortCaseLabelsOnASingleLine
474 if (Style.BraceWrapping.AfterControlStatement ==
477 Style.AllowShortBlocksOnASingleLine == FormatStyle::SBS_Never)
496 if (Style.AllowShortIfStatementsOnASingleLine ==
564 if (Style.Language != FormatStyle::LK_Java &&
582 if (Style.AllowShortBlocksOnASingleLine == FormatStyle::SBS_Never)
586 if (!Style.AllowShortIfStatementsOnASingleLine &&
588 !Style.BraceWrapping.AfterControlStatement &&
591 if (!Style.AllowShortIfStatementsOnASingleLine &&
593 Style.BraceWrapping.AfterControlStatement ==
597 if (!Style.AllowShortLoopsOnASingleLine &&
599 !Style.BraceWrapping.AfterControlStatement &&
602 if (!Style.AllowShortLoopsOnASingleLine &&
604 Style.BraceWrapping.AfterControlStatement ==
624 Tok->SpacesRequiredBefore = Style.SpaceInEmptyBlock ? 1 : 0;
677 Style.BraceWrapping.AfterControlStatement ==
688 if (Limit <= 2 || (Style.ColumnLimit == 0 && containsMustBreak(*I)))
692 if (Style.AllowShortBlocksOnASingleLine != FormatStyle::SBS_Never ||
749 const FormatStyle &Style;
780 const FormatStyle &Style,
782 : Indenter(Indenter), Whitespaces(Whitespaces), Style(Style),
825 Previous.Children[0]->Level * Style.IndentWidth;
851 if (Style.ColumnLimit > 0 &&
852 Child->Last->TotalLength + State.Column + 2 > Style.ColumnLimit)
872 const FormatStyle &Style;
881 const FormatStyle &Style,
883 : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {}
908 WhitespaceManager *Whitespaces, const FormatStyle &Style,
910 : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {}
932 const FormatStyle &Style,
934 : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {}
1110 LineJoiner Joiner(Style, Keywords, Lines);
1121 LevelIndentTracker IndentTracker(Style, Keywords, Lines[0]->Level,
1170 (Style.Language != FormatStyle::LK_JavaScript ||
1171 !Style.JavaScriptWrapImports)) ||
1172 (Style.isCSharp() &&
1174 if (Style.ColumnLimit == 0)
1175 NoColumnLimitLineFormatter(Indenter, Whitespaces, Style, this)
1179 Penalty += NoLineBreakFormatter(Indenter, Whitespaces, Style, this)
1183 Penalty += OptimizingLineFormatter(Indenter, Whitespaces, Style, this)
1242 std::min(RootToken.NewlinesBefore, Style.MaxEmptyLinesToKeep + 1);
1259 if (!Style.KeepEmptyLinesAtTheStartOfBlocks && PreviousLine &&
1267 switch (Style.EmptyLineBeforeAccessModifier) {
1299 switch (Style.EmptyLineAfterAccessModifier) {
1320 if (Style.IndentPPDirectives != FormatStyle::PPDIS_BeforeHash &&
1345 return Style.ColumnLimit - (ContinuesPPDirective ? 2 : 0);