Home | History | Annotate | Download | only in Format

Lines Matching refs:Style

35   AnnotatingParser(const FormatStyle &Style, AnnotatedLine &Line,
37 : Style(Style), Line(Line), CurrentToken(Line.First), AutoFound(false),
61 if (Style.Language == FormatStyle::LK_Java &&
74 Style.Language == FormatStyle::LK_Java) {
264 Style.Language == FormatStyle::LK_Cpp &&
279 } else if (Style.Language == FormatStyle::LK_JavaScript && Parent &&
377 Style.Language != FormatStyle::LK_Cpp)) ||
378 Style.Language == FormatStyle::LK_Proto) &&
382 Style.Language == FormatStyle::LK_JavaScript)
398 Left->Role.reset(new CommaSeparatedList(Style));
444 if (Style.Language == FormatStyle::LK_JavaScript) {
573 if (Style.Language == FormatStyle::LK_JavaScript && Tok->Next &&
586 Style.Language == FormatStyle::LK_JavaScript)
698 if ((Style.Language == FormatStyle::LK_Java &&
718 if (Style.Language == FormatStyle::LK_Proto && Line.Level == 0 &&
754 return Style.Language == FormatStyle::LK_JavaScript &&
863 Contexts.back().IsExpression = Style.Language == FormatStyle::LK_Java;
911 Style.Language == FormatStyle::LK_Java) {
930 if (Style.Language == FormatStyle::LK_JavaScript &&
986 else if (Style.Language == FormatStyle::LK_Java && Current.Previous &&
998 } else if ((Style.Language == FormatStyle::LK_Java ||
999 Style.Language == FormatStyle::LK_JavaScript) &&
1060 // C-style casts are only used in C++ and Java.
1061 if (Style.Language != FormatStyle::LK_Cpp &&
1062 Style.Language != FormatStyle::LK_Java)
1099 if (Style.Language == FormatStyle::LK_Java && Tok.Next->is(tok::l_paren))
1153 if (Style.Language == FormatStyle::LK_JavaScript)
1252 const FormatStyle &Style;
1272 ExpressionParser(const FormatStyle &Style, const AdditionalKeywords &Keywords,
1274 : Style(Style), Keywords(Keywords), Current(Line.First) {}
1378 if ((Style.Language == FormatStyle::LK_Java ||
1379 Style.Language == FormatStyle::LK_JavaScript) &&
1386 if (Style.Language == FormatStyle::LK_Java &&
1450 const FormatStyle &Style;
1479 AnnotatingParser Parser(Style, Line, Keywords);
1484 ExpressionParser ExprParser(Style, Keywords, Line);
1568 if ((Style.AlwaysBreakAfterReturnType == FormatStyle::RTBS_TopLevel ||
1569 Style.AlwaysBreakAfterReturnType ==
1574 switch (Style.AlwaysBreakAfterReturnType) {
1596 Line.First->IsMultiline ? Style.ColumnLimit : Line.First->ColumnWidth;
1607 Current->SpacesRequiredBefore = Style.Cpp11BracedListStyle ? 0 : 1;
1609 Current->SpacesRequiredBefore = Style.SpacesBeforeTrailingComments;
1648 ChildSize = LastOfChild.isTrailingComment() ? Style.ColumnLimit
1656 Current->TotalLength = Prev->TotalLength + Style.ColumnLimit;
1707 if (Style.Language == FormatStyle::LK_Java) {
1714 } else if (Style.Language == FormatStyle::LK_JavaScript) {
1725 if (Style.Language == FormatStyle::LK_Proto)
1742 return Style.PenaltyReturnTypeOnItsOwnLine;
1754 (Right.is(tok::period) && Style.Language == FormatStyle::LK_Proto))
1806 Style.AlignAfterOpenBracket != FormatStyle::BAS_DontAlign)
1818 if (Style.AlignAfterOpenBracket == FormatStyle::BAS_DontAlign)
1820 return Left.ParameterCount > 1 ? Style.PenaltyBreakBeforeFirstCallParameter
1858 if (Style.ObjCSpaceAfterProperty && Line.Type == LT_ObjCProperty &&
1866 return Style.SpaceInEmptyParentheses;
1870 ? Style.SpacesInCStyleCastParentheses
1871 : Style.SpacesInParentheses;
1876 (Line.Type == LT_ObjCDecl && Style.ObjCSpaceBeforeProtocolList)))
1900 (Style.PointerAlignment != FormatStyle::PAS_Left ||
1904 (Style.PointerAlignment != FormatStyle::PAS_Right &&
1914 (Style.PointerAlignment != FormatStyle::PAS_Right &&
1922 Style.SpacesInContainerLiterals && Right.isNot(tok::r_square)) ||
1923 (Left.is(TT_ArraySubscriptLSquare) && Style.SpacesInSquareBrackets &&
1927 ((Style.SpacesInContainerLiterals &&
1929 (Style.SpacesInSquareBrackets &&
1942 return !Style.Cpp11BracedListStyle;
1949 (Style.SpaceBeforeParens != FormatStyle::SBPO_Never &&
1956 (Style.SpaceBeforeParens == FormatStyle::SBPO_Always &&
1991 if (Style.Language == FormatStyle::LK_Cpp) {
1994 } else if (Style.Language == FormatStyle::LK_Proto) {
2002 } else if (Style.Language == FormatStyle::LK_JavaScript) {
2020 } else if (Style.Language == FormatStyle::LK_Java) {
2024 return Style.SpaceBeforeParens != FormatStyle::SBPO_Never;
2055 return Style.SpaceBeforeParens == FormatStyle::SBPO_Always;
2067 return Style.SpacesInContainerLiterals;
2076 return Style.SpaceAfterCStyleCast ||
2081 (Style.Standard != FormatStyle::LS_Cpp11 || Style.SpacesInAngles);
2085 if (!Style.SpaceBeforeAssignmentOperators &&
2090 Style.Standard == FormatStyle::LS_Cpp03) ||
2094 return Style.SpacesInAngles;
2101 return Style.SpaceBeforeParens == FormatStyle::SBPO_Always;
2115 // Returns 'true' if 'Tok' is a brace we'd want to break before in Allman style.
2124 if (Right.NewlinesBefore > 1 && Style.MaxEmptyLinesToKeep > 0)
2127 if (Style.Language == FormatStyle::LK_JavaScript) {
2139 // Object literals on the top level of a file are treated as "enum-style".
2151 return Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_None ||
2152 Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Empty ||
2154 Style.AllowShortFunctionsOnASingleLine ==
2156 } else if (Style.Language == FormatStyle::LK_Java) {
2195 Style.AlwaysBreakTemplateDeclarations)
2198 Style.BreakConstructorInitializersBeforeComma &&
2199 !Style.ConstructorInitializerAllOnOneLineOrOnePerLine)
2207 Style.Language == FormatStyle::LK_Proto)
2213 return (Line.startsWith(tok::kw_enum) && Style.BraceWrapping.AfterEnum) ||
2214 (Line.startsWith(tok::kw_class) && Style.BraceWrapping.AfterClass) ||
2215 (Line.startsWith(tok::kw_struct) && Style.BraceWrapping.AfterStruct);
2216 if (Style.Language == FormatStyle::LK_Proto && Left.isNot(tok::l_brace) &&
2219 if (Left.is(TT_ObjCBlockLBrace) && !Style.AllowShortBlocksOnASingleLine)
2222 if ((Style.Language == FormatStyle::LK_Java ||
2223 Style.Language == FormatStyle::LK_JavaScript) &&
2226 (Line.Last->is(tok::l_brace) || Style.BreakAfterJavaFieldAnnotations))
2237 if (Style.Language == FormatStyle::LK_Java) {
2244 } else if (Style.Language == FormatStyle::LK_JavaScript) {
2259 (Style.PointerAlignment == FormatStyle::PAS_Right &&
2276 return Style.BreakBeforeTernaryOperators;
2278 return !Style.BreakBeforeTernaryOperators;
2341 Style.BreakConstructorInitializersBeforeComma)
2344 Style.BreakConstructorInitializersBeforeComma)
2350 Style.BreakBeforeBinaryOperators != FormatStyle::BOS_None &&
2351 (Style.BreakBeforeBinaryOperators == FormatStyle::BOS_All ||
2360 Style.BreakBeforeBinaryOperators != FormatStyle::BOS_All &&
2361 (Style.BreakBeforeBinaryOperators == FormatStyle::BOS_None ||