Lines Matching refs:Style

175                             const FormatStyle &Style, unsigned &LineLevel)
177 Style.BraceWrapping.AfterControlStatement,
178 Style.BraceWrapping.IndentBraces) {}
225 UnwrappedLineParser::UnwrappedLineParser(const FormatStyle &Style,
231 CurrentLines(&Lines), Style(Style), Keywords(Keywords),
232 CommentPragmasRegex(Style.CommentPragmas), Tokens(nullptr),
234 IncludeGuard(Style.IndentPPDirectives == FormatStyle::PPDIS_None
241 IncludeGuard = Style.IndentPPDirectives == FormatStyle::PPDIS_None
303 !Line->InPPDirective && Style.Language != FormatStyle::LK_JavaScript;
306 if (Style.Language == FormatStyle::LK_TextProto)
320 if (Style.Language == FormatStyle::LK_TextProto &&
414 if (Style.Language == FormatStyle::LK_JavaScript &&
421 (Style.IndentCaseLabels || (Line->InPPDirective && Line->Level == 1)))
427 if (Style.isCSharp()) {
464 if (Style.Language == FormatStyle::LK_JavaScript && PrevTok) {
489 if (Style.Language == FormatStyle::LK_Proto) {
506 (Style.Language == FormatStyle::LK_JavaScript &&
509 (Style.isCpp() && NextTok->is(tok::l_paren)) ||
518 if (!Style.isCSharp() && NextTok->is(tok::l_square)) {
592 if (AddLevels > 0 && Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths)
619 if (AddLevels > 0u && Style.BreakBeforeBraces != FormatStyle::BS_Whitesmiths)
699 static bool ShouldBreakBeforeBrace(const FormatStyle &Style,
702 return Style.BraceWrapping.AfterNamespace;
704 return Style.BraceWrapping.AfterClass;
706 return Style.BraceWrapping.AfterUnion;
708 return Style.BraceWrapping.AfterStruct;
716 bool SkipIndent = (Style.Language == FormatStyle::LK_JavaScript &&
869 Style.IndentPPDirectives != FormatStyle::PPDIS_None)
901 if (Style.IndentPPDirectives != FormatStyle::PPDIS_None)
918 if (Style.IndentPPDirectives != FormatStyle::PPDIS_None)
1044 if (Style.Language == FormatStyle::LK_TableGen &&
1076 if (Style.Language == FormatStyle::LK_Java ||
1077 Style.Language == FormatStyle::LK_JavaScript || Style.isCSharp())
1083 if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration)
1090 if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration)
1096 if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration)
1102 if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration)
1108 if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration)
1119 if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration)
1126 if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration)
1136 if (!Style.IndentExternBlock) {
1137 if (Style.BraceWrapping.AfterExternBlock) {
1140 unsigned AddLevels = Style.BraceWrapping.AfterExternBlock ? 1u : 0u;
1144 Style.IndentExternBlock == FormatStyle::IEBS_Indent ? 1u : 0u;
1153 if (Style.Language == FormatStyle::LK_JavaScript) {
1157 if (!Style.isCpp())
1179 if (Style.Language == FormatStyle::LK_JavaScript) {
1183 if (Style.Language == FormatStyle::LK_Proto) {
1196 if (Style.isCpp() &&
1206 if (Style.isCpp() && FormatTok->is(TT_StatementMacro)) {
1210 if (Style.isCpp() && FormatTok->is(TT_NamespaceMacro)) {
1228 } else if (Style.Language == FormatStyle::LK_Java &&
1256 if (Style.BraceWrapping.AfterControlStatement ==
1269 if (Style.BraceWrapping.AfterControlStatement ==
1303 if (!Style.isCpp()) {
1326 if (Style.Language == FormatStyle::LK_Java && FormatTok &&
1329 if (Style.Language == FormatStyle::LK_JavaScript && FormatTok &&
1366 if (Style.BraceWrapping.AfterFunction)
1377 if (Style.Language == FormatStyle::LK_JavaScript &&
1384 if (Style.BraceWrapping.AfterFunction)
1389 if (Style.isCSharp() && FormatTok->is(Keywords.kw_where) &&
1405 if (Style.Language == FormatStyle::LK_JavaScript &&
1412 if ((Style.Language == FormatStyle::LK_JavaScript ||
1413 Style.Language == FormatStyle::LK_Java) &&
1415 if (Style.Language == FormatStyle::LK_JavaScript) {
1440 if (Style.isCpp() && FormatTok->is(TT_StatementMacro)) {
1451 if (Style.Language == FormatStyle::LK_JavaScript)
1459 parseLabel(!Style.IndentGotoLabels);
1489 if (Style.isCSharp() && Style.BraceWrapping.AfterFunction == true) {
1503 if (Style.isCSharp())
1507 } else if (Style.Language == FormatStyle::LK_Proto &&
1529 if (!Style.isCSharp())
1570 if (!IsTrivialPropertyAccessor && Style.BraceWrapping.AfterFunction == true)
1618 if (!Style.isCpp()) {
1718 FormatTok->isCppStructuredBinding(Style) || Previous->closesScope() ||
1793 if (Style.isCSharp()) {
1804 if (Style.Language == FormatStyle::LK_JavaScript) {
1827 if (IsEnum && !Style.AllowShortEnumsOnASingleLine)
1840 if (Style.isCSharp())
1849 if (Style.Language == FormatStyle::LK_JavaScript) {
1863 if (Style.Language == FormatStyle::LK_Proto) {
1876 if (Style.Language == FormatStyle::LK_JavaScript) {
1887 if (IsEnum && !Style.AllowShortEnumsOnASingleLine)
1905 if (Style.Language == FormatStyle::LK_Java && FormatTok->is(tok::l_brace))
1929 if (Style.Language == FormatStyle::LK_JavaScript)
1935 if (Style.Language == FormatStyle::LK_JavaScript &&
2000 CompoundStatementIndenter Indenter(this, Style, Line->Level);
2002 if (Style.BraceWrapping.BeforeElse)
2018 CompoundStatementIndenter Indenter(this, Style, Line->Level);
2068 if (Style.Language == FormatStyle::LK_Java && FormatTok->is(tok::l_paren)) {
2072 CompoundStatementIndenter Indenter(this, Style, Line->Level);
2074 if (Style.BraceWrapping.BeforeCatch) {
2093 ((Style.Language == FormatStyle::LK_Java ||
2094 Style.Language == FormatStyle::LK_JavaScript) &&
2110 CompoundStatementIndenter Indenter(this, Style, Line->Level);
2112 if (Style.BraceWrapping.BeforeCatch)
2139 if (ShouldBreakBeforeBrace(Style, InitialToken))
2143 Style.NamespaceIndentation == FormatStyle::NI_All ||
2144 (Style.NamespaceIndentation == FormatStyle::NI_Inner &&
2150 Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths;
2178 if (Style.isCSharp()) {
2190 if (Style.Language != FormatStyle::LK_Java)
2217 if (Style.Language == FormatStyle::LK_JavaScript &&
2223 CompoundStatementIndenter Indenter(this, Style, Line->Level);
2238 CompoundStatementIndenter Indenter(this, Style, Line->Level);
2240 if (Style.BraceWrapping.BeforeWhile)
2257 if (Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths)
2272 if (!Style.IndentCaseBlocks && CommentsBeforeNextToken.empty() &&
2276 Style.BraceWrapping.AfterCaseLabel,
2277 Style.BraceWrapping.IndentBraces);
2280 if (Style.BraceWrapping.AfterControlStatement ==
2283 if (!Style.IndentCaseBlocks &&
2284 Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths) {
2319 CompoundStatementIndenter Indenter(this, Style, Line->Level);
2362 if (Style.IndentRequires && OriginalLevel != Line->Level) {
2369 if (Style.BraceWrapping.AfterFunction)
2406 if (Style.BraceWrapping.AfterFunction)
2425 if (Style.IndentRequires && OriginalLevel != Line->Level) {
2443 if (Style.IndentRequires) {
2460 if (Style.Language == FormatStyle::LK_JavaScript &&
2465 if (Style.Language == FormatStyle::LK_Proto && FormatTok->is(tok::equal))
2483 if (Style.isCpp() && FormatTok->is(tok::identifier))
2493 if (Style.Language == FormatStyle::LK_Java) {
2498 if (Style.Language == FormatStyle::LK_Proto) {
2503 if (!Style.AllowShortEnumsOnASingleLine)
2507 if (!Style.AllowShortEnumsOnASingleLine) {
2513 if (!Style.AllowShortEnumsOnASingleLine)
2532 if (Style.Language == FormatStyle::LK_Java ||
2533 Style.Language == FormatStyle::LK_JavaScript || Style.isCSharp()) {
2660 ((Style.Language == FormatStyle::LK_Java ||
2661 Style.Language == FormatStyle::LK_JavaScript) &&
2663 if (Style.Language == FormatStyle::LK_JavaScript &&
2710 if (Style.isCSharp() && FormatTok->is(Keywords.kw_where)) {
2723 if (ShouldBreakBeforeBrace(Style, InitialToken))
2726 unsigned AddLevels = Style.IndentAccessModifiers ? 2u : 1u;
2744 if (Style.BraceWrapping.AfterFunction)
2817 if (Style.BraceWrapping.AfterObjCDeclaration)
2981 Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths;
3146 if (Style.Language != FormatStyle::LK_JavaScript)
3228 if (Style.IndentPPDirectives == FormatStyle::PPDIS_BeforeHash &&