Lines Matching refs:Style

175                             const FormatStyle &Style, unsigned &LineLevel)  in CompoundStatementIndenter()  argument
177 Style.BraceWrapping.AfterControlStatement, in CompoundStatementIndenter()
178 Style.BraceWrapping.IndentBraces) {} in CompoundStatementIndenter()
225 UnwrappedLineParser::UnwrappedLineParser(const FormatStyle &Style, in UnwrappedLineParser() argument
231 CurrentLines(&Lines), Style(Style), Keywords(Keywords), in UnwrappedLineParser()
232 CommentPragmasRegex(Style.CommentPragmas), Tokens(nullptr), in UnwrappedLineParser()
234 IncludeGuard(Style.IndentPPDirectives == FormatStyle::PPDIS_None in UnwrappedLineParser()
241 IncludeGuard = Style.IndentPPDirectives == FormatStyle::PPDIS_None in reset()
303 !Line->InPPDirective && Style.Language != FormatStyle::LK_JavaScript; in parseFile()
306 if (Style.Language == FormatStyle::LK_TextProto) in parseFile()
320 if (Style.Language == FormatStyle::LK_TextProto && in parseFile()
414 if (Style.Language == FormatStyle::LK_JavaScript && in parseLevel()
421 (Style.IndentCaseLabels || (Line->InPPDirective && Line->Level == 1))) in parseLevel()
427 if (Style.isCSharp()) { in parseLevel()
464 if (Style.Language == FormatStyle::LK_JavaScript && PrevTok) { in calculateBraceTypes()
489 if (Style.Language == FormatStyle::LK_Proto) { in calculateBraceTypes()
506 (Style.Language == FormatStyle::LK_JavaScript && in calculateBraceTypes()
509 (Style.isCpp() && NextTok->is(tok::l_paren)) || in calculateBraceTypes()
518 if (!Style.isCSharp() && NextTok->is(tok::l_square)) { in calculateBraceTypes()
592 if (AddLevels > 0 && Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths) in parseBlock()
619 if (AddLevels > 0u && Style.BreakBeforeBraces != FormatStyle::BS_Whitesmiths) in parseBlock()
699 static bool ShouldBreakBeforeBrace(const FormatStyle &Style, in ShouldBreakBeforeBrace() argument
702 return Style.BraceWrapping.AfterNamespace; in ShouldBreakBeforeBrace()
704 return Style.BraceWrapping.AfterClass; in ShouldBreakBeforeBrace()
706 return Style.BraceWrapping.AfterUnion; in ShouldBreakBeforeBrace()
708 return Style.BraceWrapping.AfterStruct; in ShouldBreakBeforeBrace()
716 bool SkipIndent = (Style.Language == FormatStyle::LK_JavaScript && in parseChildBlock()
871 Style.IndentPPDirectives != FormatStyle::PPDIS_None) in parsePPEndIf()
903 if (Style.IndentPPDirectives != FormatStyle::PPDIS_None) in parsePPDefine()
920 if (Style.IndentPPDirectives != FormatStyle::PPDIS_None) in parsePPUnknown()
1091 if (Style.Language == FormatStyle::LK_TableGen && in parseStructuralElement()
1123 if (Style.Language == FormatStyle::LK_Java || in parseStructuralElement()
1124 Style.Language == FormatStyle::LK_JavaScript || Style.isCSharp()) in parseStructuralElement()
1130 if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration) in parseStructuralElement()
1137 if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration) in parseStructuralElement()
1143 if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration) in parseStructuralElement()
1149 if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration) in parseStructuralElement()
1155 if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration) in parseStructuralElement()
1166 if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration) in parseStructuralElement()
1173 if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration) in parseStructuralElement()
1183 if (!Style.IndentExternBlock) { in parseStructuralElement()
1184 if (Style.BraceWrapping.AfterExternBlock) { in parseStructuralElement()
1187 unsigned AddLevels = Style.BraceWrapping.AfterExternBlock ? 1u : 0u; in parseStructuralElement()
1191 Style.IndentExternBlock == FormatStyle::IEBS_Indent ? 1u : 0u; in parseStructuralElement()
1200 if (Style.Language == FormatStyle::LK_JavaScript) { in parseStructuralElement()
1204 if (!Style.isCpp()) in parseStructuralElement()
1226 if (Style.Language == FormatStyle::LK_JavaScript) { in parseStructuralElement()
1230 if (Style.Language == FormatStyle::LK_Proto) { in parseStructuralElement()
1243 if (Style.isCpp() && in parseStructuralElement()
1253 if (Style.isCpp() && FormatTok->is(TT_StatementMacro)) { in parseStructuralElement()
1257 if (Style.isCpp() && FormatTok->is(TT_NamespaceMacro)) { in parseStructuralElement()
1275 } else if (Style.Language == FormatStyle::LK_Java && in parseStructuralElement()
1303 if (Style.BraceWrapping.AfterControlStatement == in parseStructuralElement()
1316 if (Style.BraceWrapping.AfterControlStatement == in parseStructuralElement()
1350 if (!Style.isCpp()) { in parseStructuralElement()
1373 if (Style.Language == FormatStyle::LK_Java && FormatTok && in parseStructuralElement()
1376 if (Style.Language == FormatStyle::LK_JavaScript && FormatTok && in parseStructuralElement()
1393 if (!IsTopLevel || !Style.isCpp() || !Previous || FormatTok->is(tok::eof)) in parseStructuralElement()
1424 if (Style.BraceWrapping.AfterFunction) in parseStructuralElement()
1435 if (Style.Language == FormatStyle::LK_JavaScript && in parseStructuralElement()
1442 if (Style.BraceWrapping.AfterFunction) in parseStructuralElement()
1447 if (Style.isCSharp() && FormatTok->is(Keywords.kw_where) && in parseStructuralElement()
1463 if (Style.Language == FormatStyle::LK_JavaScript && in parseStructuralElement()
1470 if ((Style.Language == FormatStyle::LK_JavaScript || in parseStructuralElement()
1471 Style.Language == FormatStyle::LK_Java) && in parseStructuralElement()
1473 if (Style.Language == FormatStyle::LK_JavaScript) { in parseStructuralElement()
1498 if (Style.isCpp() && FormatTok->is(TT_StatementMacro)) { in parseStructuralElement()
1509 if (Style.Language == FormatStyle::LK_JavaScript) in parseStructuralElement()
1517 parseLabel(!Style.IndentGotoLabels); in parseStructuralElement()
1547 if (Style.isCSharp() && Style.BraceWrapping.AfterFunction == true) { in parseStructuralElement()
1561 if (Style.isCSharp()) in parseStructuralElement()
1565 } else if (Style.Language == FormatStyle::LK_Proto && in parseStructuralElement()
1587 if (!Style.isCSharp()) in tryToParsePropertyAccessor()
1628 if (!IsTrivialPropertyAccessor && Style.BraceWrapping.AfterFunction == true) in tryToParsePropertyAccessor()
1676 if (!Style.isCpp()) { in tryToParseLambda()
1776 FormatTok->isCppStructuredBinding(Style) || Previous->closesScope() || in tryToParseLambdaIntroducer()
1851 if (Style.isCSharp()) { in parseBracedList()
1859 if (Style.isCSharp() && Style.BraceWrapping.AfterFunction == true) { in parseBracedList()
1868 if (Style.Language == FormatStyle::LK_JavaScript) { in parseBracedList()
1891 if (IsEnum && !Style.AllowShortEnumsOnASingleLine) in parseBracedList()
1904 if (Style.isCSharp()) in parseBracedList()
1913 if (Style.Language == FormatStyle::LK_JavaScript) { in parseBracedList()
1927 if (Style.Language == FormatStyle::LK_Proto) { in parseBracedList()
1940 if (Style.Language == FormatStyle::LK_JavaScript) { in parseBracedList()
1951 if (IsEnum && !Style.AllowShortEnumsOnASingleLine) in parseBracedList()
1969 if (Style.Language == FormatStyle::LK_Java && FormatTok->is(tok::l_brace)) in parseParens()
1993 if (Style.isCSharp() && FormatTok->is(TT_FatArrow)) in parseParens()
1999 if (Style.Language == FormatStyle::LK_JavaScript) in parseParens()
2005 if (Style.Language == FormatStyle::LK_JavaScript && in parseParens()
2070 CompoundStatementIndenter Indenter(this, Style, Line->Level); in parseIfThenElse()
2072 if (Style.BraceWrapping.BeforeElse) in parseIfThenElse()
2088 CompoundStatementIndenter Indenter(this, Style, Line->Level); in parseIfThenElse()
2146 if (Style.Language == FormatStyle::LK_Java && FormatTok->is(tok::l_paren)) { in parseTryCatch()
2150 CompoundStatementIndenter Indenter(this, Style, Line->Level); in parseTryCatch()
2152 if (Style.BraceWrapping.BeforeCatch) { in parseTryCatch()
2171 ((Style.Language == FormatStyle::LK_Java || in parseTryCatch()
2172 Style.Language == FormatStyle::LK_JavaScript) && in parseTryCatch()
2188 CompoundStatementIndenter Indenter(this, Style, Line->Level); in parseTryCatch()
2190 if (Style.BraceWrapping.BeforeCatch) in parseTryCatch()
2217 if (ShouldBreakBeforeBrace(Style, InitialToken)) in parseNamespace()
2221 Style.NamespaceIndentation == FormatStyle::NI_All || in parseNamespace()
2222 (Style.NamespaceIndentation == FormatStyle::NI_Inner && in parseNamespace()
2228 Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths; in parseNamespace()
2256 if (Style.isCSharp()) { in parseNew()
2268 if (Style.Language != FormatStyle::LK_Java) in parseNew()
2295 if (Style.Language == FormatStyle::LK_JavaScript && in parseForOrWhileLoop()
2301 CompoundStatementIndenter Indenter(this, Style, Line->Level); in parseForOrWhileLoop()
2316 CompoundStatementIndenter Indenter(this, Style, Line->Level); in parseDoWhile()
2318 if (Style.BraceWrapping.BeforeWhile) in parseDoWhile()
2335 if (Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths) in parseDoWhile()
2350 if (!Style.IndentCaseBlocks && CommentsBeforeNextToken.empty() && in parseLabel()
2354 Style.BraceWrapping.AfterCaseLabel, in parseLabel()
2355 Style.BraceWrapping.IndentBraces); in parseLabel()
2358 if (Style.BraceWrapping.AfterControlStatement == in parseLabel()
2361 if (!Style.IndentCaseBlocks && in parseLabel()
2362 Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths) { in parseLabel()
2397 CompoundStatementIndenter Indenter(this, Style, Line->Level); in parseSwitch()
2440 if (Style.IndentRequires && OriginalLevel != Line->Level) { in parseRequiresExpression()
2447 if (Style.BraceWrapping.AfterFunction) in parseRequiresExpression()
2484 if (Style.BraceWrapping.AfterFunction) in parseConstraintExpression()
2503 if (Style.IndentRequires && OriginalLevel != Line->Level) { in parseConstraintExpression()
2521 if (Style.IndentRequires) { in parseRequires()
2538 if (Style.Language == FormatStyle::LK_JavaScript && in parseEnum()
2543 if (Style.Language == FormatStyle::LK_Proto && FormatTok->is(tok::equal)) in parseEnum()
2561 if (Style.isCpp() && FormatTok->is(tok::identifier)) in parseEnum()
2571 if (Style.Language == FormatStyle::LK_Java) { in parseEnum()
2576 if (Style.Language == FormatStyle::LK_Proto) { in parseEnum()
2581 if (!Style.AllowShortEnumsOnASingleLine) in parseEnum()
2585 if (!Style.AllowShortEnumsOnASingleLine) { in parseEnum()
2591 if (!Style.AllowShortEnumsOnASingleLine) in parseEnum()
2610 if (Style.Language == FormatStyle::LK_Java || in parseStructLike()
2611 Style.Language == FormatStyle::LK_JavaScript || Style.isCSharp()) { in parseStructLike()
2738 ((Style.Language == FormatStyle::LK_Java || in parseRecord()
2739 Style.Language == FormatStyle::LK_JavaScript) && in parseRecord()
2741 if (Style.Language == FormatStyle::LK_JavaScript && in parseRecord()
2788 if (Style.isCSharp() && FormatTok->is(Keywords.kw_where)) { in parseRecord()
2801 if (ShouldBreakBeforeBrace(Style, InitialToken)) in parseRecord()
2804 unsigned AddLevels = Style.IndentAccessModifiers ? 2u : 1u; in parseRecord()
2822 if (Style.BraceWrapping.AfterFunction) in parseObjCMethod()
2895 if (Style.BraceWrapping.AfterObjCDeclaration) in parseObjCInterfaceOrImplementation()
3059 Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths; in addUnwrappedLine()
3224 if (Style.Language != FormatStyle::LK_JavaScript) in nextToken()
3306 if (Style.IndentPPDirectives == FormatStyle::PPDIS_BeforeHash && in readToken()