Lines Matching refs:FormatStyle

73   AnnotatingParser(const FormatStyle &Style, AnnotatedLine &Line,  in AnnotatingParser()
112 if (Style.Language == FormatStyle::LK_Java && in parseAngle()
138 if (Style.Language == FormatStyle::LK_TextProto || in parseAngle()
139 (Style.Language == FormatStyle::LK_Proto && Left->Previous && in parseAngle()
148 Style.Language == FormatStyle::LK_Java) { in parseAngle()
154 !Style.isCSharp() && Style.Language != FormatStyle::LK_Proto && in parseAngle()
155 Style.Language != FormatStyle::LK_TextProto)) in parseAngle()
169 if (Style.Language == FormatStyle::LK_Proto) { in parseAngle()
245 } else if (Style.Language == FormatStyle::LK_JavaScript && in parseParens()
259 } else if (Style.Language == FormatStyle::LK_JavaScript && Left->Previous && in parseParens()
265 } else if (Style.Language == FormatStyle::LK_JavaScript && Left->Previous && in parseParens()
584 } else if (Style.Language == FormatStyle::LK_JavaScript && Parent && in parseSquare()
596 } else if (Style.Language == FormatStyle::LK_Proto || in parseSquare()
597 Style.Language == FormatStyle::LK_TextProto) { in parseSquare()
648 if (Style.Language == FormatStyle::LK_JavaScript && Parent && in parseSquare()
776 if (Style.Language == FormatStyle::LK_JavaScript && Left->Previous && in parseBrace()
785 if (Style.AlignArrayOfStructures != FormatStyle::AIAS_None) { in parseBrace()
803 Style.Language == FormatStyle::LK_Proto || in parseBrace()
804 Style.Language == FormatStyle::LK_TextProto) { in parseBrace()
811 Style.Language == FormatStyle::LK_JavaScript) in parseBrace()
815 if (Style.Language == FormatStyle::LK_JavaScript) in parseBrace()
881 if (Style.Language == FormatStyle::LK_JavaScript) { in consumeToken()
906 Style.Language == FormatStyle::LK_Proto || in consumeToken()
907 Style.Language == FormatStyle::LK_TextProto) { in consumeToken()
909 if (Style.Language == FormatStyle::LK_TextProto) { in consumeToken()
973 if (Style.Language == FormatStyle::LK_JavaScript && in consumeToken()
989 if (Style.Language == FormatStyle::LK_JavaScript) { in consumeToken()
1030 if (Style.Language == FormatStyle::LK_TextProto) { in consumeToken()
1046 if (Style.Language == FormatStyle::LK_TextProto || in consumeToken()
1047 (Style.Language == FormatStyle::LK_Proto && Tok->Previous && in consumeToken()
1070 if (Style.Language != FormatStyle::LK_TextProto) in consumeToken()
1076 if (Style.Language == FormatStyle::LK_TextProto || in consumeToken()
1077 Style.Language == FormatStyle::LK_Proto) in consumeToken()
1098 if (Style.Language == FormatStyle::LK_JavaScript && Tok->Next && in consumeToken()
1111 Style.Language == FormatStyle::LK_JavaScript) in consumeToken()
1244 if (Style.Language == FormatStyle::LK_JavaScript && IsFirstToken) { in parsePreprocessorDirective()
1312 if ((Style.Language == FormatStyle::LK_Java && in parseLine()
1332 if (Style.Language == FormatStyle::LK_Proto && Line.Level == 0 && in parseLine()
1346 if (Style.Language == FormatStyle::LK_JavaScript && in parseLine()
1353 if (Style.Language == FormatStyle::LK_JavaScript) { in parseLine()
1480 if (P.Style.AlignArrayOfStructures != FormatStyle::AIAS_None) { in ~ScopedContextCreator()
1496 !(Style.Language == FormatStyle::LK_JavaScript && in modifyContext()
1528 Contexts.back().IsExpression = Style.Language == FormatStyle::LK_Java; in modifyContext()
1623 if ((Style.Language == FormatStyle::LK_JavaScript || Style.isCSharp()) && in determineTokenType()
1627 Style.Language == FormatStyle::LK_JavaScript in determineTokenType()
1665 Style.Language == FormatStyle::LK_Java) { in determineTokenType()
1694 if (Style.Language == FormatStyle::LK_JavaScript && in determineTokenType()
1705 Style.Language != FormatStyle::LK_TextProto)) { in determineTokenType()
1739 Style.Language != FormatStyle::LK_JavaScript && in determineTokenType()
1740 Style.Language != FormatStyle::LK_Java) { in determineTokenType()
1760 else if (Style.Language == FormatStyle::LK_Java && Current.Previous && in determineTokenType()
1785 } else if ((Style.Language == FormatStyle::LK_Java || in determineTokenType()
1786 Style.Language == FormatStyle::LK_JavaScript) && in determineTokenType()
1816 if (Style.Language == FormatStyle::LK_JavaScript && in isStartOfName()
1852 Style.Language != FormatStyle::LK_Java) in rParenEndsCast()
1901 if (Style.Language == FormatStyle::LK_Java && Tok.Next->is(tok::l_paren)) in rParenEndsCast()
1996 if (Style.Language == FormatStyle::LK_JavaScript) in determineStarAmpUsage()
2105 const FormatStyle &Style;
2125 ExpressionParser(const FormatStyle &Style, const AdditionalKeywords &Keywords, in ExpressionParser()
2225 ((Style.Language == FormatStyle::LK_Proto || in getCurrentPrecedence()
2226 Style.Language == FormatStyle::LK_TextProto) && in getCurrentPrecedence()
2241 if ((Style.Language == FormatStyle::LK_Java || in getCurrentPrecedence()
2242 Style.Language == FormatStyle::LK_JavaScript) && in getCurrentPrecedence()
2245 if (Style.Language == FormatStyle::LK_JavaScript && in getCurrentPrecedence()
2252 if ((Style.Language == FormatStyle::LK_Java || in getCurrentPrecedence()
2253 Style.Language == FormatStyle::LK_JavaScript) && in getCurrentPrecedence()
2315 const FormatStyle &Style;
2346 (Style.IndentPPDirectives != FormatStyle::PPDIS_BeforeHash && in setCommentLineLevels()
2515 if ((Style.AlwaysBreakAfterReturnType == FormatStyle::RTBS_TopLevel || in mustBreakForReturnType()
2517 FormatStyle::RTBS_TopLevelDefinitions) && in mustBreakForReturnType()
2522 case FormatStyle::RTBS_None: in mustBreakForReturnType()
2524 case FormatStyle::RTBS_All: in mustBreakForReturnType()
2525 case FormatStyle::RTBS_TopLevel: in mustBreakForReturnType()
2527 case FormatStyle::RTBS_AllDefinitions: in mustBreakForReturnType()
2528 case FormatStyle::RTBS_TopLevelDefinitions: in mustBreakForReturnType()
2548 (Style.AlignArrayOfStructures != FormatStyle::AIAS_None && in calculateFormattingInformation()
2627 if (Style.Language == FormatStyle::LK_ObjC && in calculateFormattingInformation()
2720 if (Style.Language == FormatStyle::LK_Java) { in splitPenalty()
2727 } else if (Style.Language == FormatStyle::LK_JavaScript) { in splitPenalty()
2743 if (Style.Language == FormatStyle::LK_Proto) in splitPenalty()
2757 (Right.is(tok::period) && Style.Language == FormatStyle::LK_Proto)) in splitPenalty()
2845 Style.AlignAfterOpenBracket != FormatStyle::BAS_DontAlign) in splitPenalty()
2860 if (Style.AlignAfterOpenBracket == FormatStyle::BAS_DontAlign && in splitPenalty()
2908 return Style.SpaceBeforeParens == FormatStyle::SBPO_Always || in spaceRequiredBeforeParens()
2909 (Style.SpaceBeforeParens == FormatStyle::SBPO_NonEmptyParentheses && in spaceRequiredBeforeParens()
2920 if (Left.is(Keywords.kw_assert) && Style.Language == FormatStyle::LK_Java) in spaceRequiredBetween()
2977 if (Style.Language == FormatStyle::LK_TextProto || in spaceRequiredBetween()
2978 (Style.Language == FormatStyle::LK_Proto && in spaceRequiredBetween()
3004 if ((Style.SpaceAroundPointerQualifiers == FormatStyle::SAPQ_After || in spaceRequiredBetween()
3005 Style.SpaceAroundPointerQualifiers == FormatStyle::SAPQ_Both) && in spaceRequiredBetween()
3011 (getTokenPointerOrReferenceAlignment(Right) != FormatStyle::PAS_Left || in spaceRequiredBetween()
3018 (getTokenPointerOrReferenceAlignment(Left) != FormatStyle::PAS_Right && in spaceRequiredBetween()
3024 if ((Style.SpaceAroundPointerQualifiers == FormatStyle::SAPQ_Before || in spaceRequiredBetween()
3025 Style.SpaceAroundPointerQualifiers == FormatStyle::SAPQ_Both) && in spaceRequiredBetween()
3035 FormatStyle::PAS_Right && in spaceRequiredBetween()
3044 return Style.PointerAlignment != FormatStyle::PAS_Right; in spaceRequiredBetween()
3081 return (Style.PointerAlignment != FormatStyle::PAS_Left); in spaceRequiredBetween()
3083 return (Style.PointerAlignment != FormatStyle::PAS_Left) || in spaceRequiredBetween()
3085 FormatStyle::SAPQ_After) || in spaceRequiredBetween()
3086 (Style.SpaceAroundPointerQualifiers == FormatStyle::SAPQ_Both); in spaceRequiredBetween()
3090 [](const FormatToken &LSquareTok, const FormatStyle &Style) { in spaceRequiredBetween()
3092 ((Style.Language == FormatStyle::LK_Proto || in spaceRequiredBetween()
3093 Style.Language == FormatStyle::LK_TextProto) && in spaceRequiredBetween()
3130 return Style.Language == FormatStyle::LK_JavaScript || in spaceRequiredBetween()
3142 FormatStyle::SBPO_ControlStatementsExceptControlMacros && in spaceRequiredBetween()
3146 FormatStyle::SBPO_ControlStatementsExceptControlMacros && in spaceRequiredBetween()
3150 (Style.SpaceBeforeParens != FormatStyle::SBPO_Never && in spaceRequiredBetween()
3204 return getTokenReferenceAlignment(Right) != FormatStyle::PAS_Left; in spaceRequiredBetween()
3222 } else if (Style.Language == FormatStyle::LK_Proto || in spaceRequiredBefore()
3223 Style.Language == FormatStyle::LK_TextProto) { in spaceRequiredBefore()
3310 return Style.SpaceBeforeParens == FormatStyle::SBPO_ControlStatements || in spaceRequiredBefore()
3322 } else if (Style.Language == FormatStyle::LK_JavaScript) { in spaceRequiredBefore()
3413 } else if (Style.Language == FormatStyle::LK_Java) { in spaceRequiredBefore()
3417 return Style.SpaceBeforeParens != FormatStyle::SBPO_Never; in spaceRequiredBefore()
3459 return Style.BitFieldColonSpacing == FormatStyle::BFCS_Both || in spaceRequiredBefore()
3460 Style.BitFieldColonSpacing == FormatStyle::BFCS_After; in spaceRequiredBefore()
3479 return Style.BitFieldColonSpacing == FormatStyle::BFCS_Both || in spaceRequiredBefore()
3480 Style.BitFieldColonSpacing == FormatStyle::BFCS_Before; in spaceRequiredBefore()
3514 if (this->Style.SpacesInAngles == FormatStyle::SIAS_Always) in spaceRequiredBefore()
3516 if (this->Style.SpacesInAngles == FormatStyle::SIAS_Leave) in spaceRequiredBefore()
3522 if (Style.Language == FormatStyle::LK_TextProto || in spaceRequiredBefore()
3523 (Style.Language == FormatStyle::LK_Proto && Left.is(TT_DictLiteral))) in spaceRequiredBefore()
3526 ((Style.Standard < FormatStyle::LS_Cpp11) || in spaceRequiredBefore()
3536 if (Style.Language == FormatStyle::LK_Java && Right.is(tok::coloncolon) && in spaceRequiredBefore()
3548 ((Style.Standard < FormatStyle::LS_Cpp11) || in spaceRequiredBefore()
3559 getTokenReferenceAlignment(Left) != FormatStyle::PAS_Right; in spaceRequiredBefore()
3563 return getTokenReferenceAlignment(Right) != FormatStyle::PAS_Left; in spaceRequiredBefore()
3598 FormatStyle::ShortLambdaStyle ShortLambdaOption) { in isItAnEmptyLambdaAllowed()
3599 return Tok.Children.empty() && ShortLambdaOption != FormatStyle::SLS_None; in isItAnEmptyLambdaAllowed()
3630 } else if (Style.Language == FormatStyle::LK_JavaScript) { in mustBreakBefore()
3657 case FormatStyle::SLS_All: in mustBreakBefore()
3659 case FormatStyle::SLS_None: in mustBreakBefore()
3661 case FormatStyle::SLS_Empty: in mustBreakBefore()
3663 case FormatStyle::SLS_Inline: in mustBreakBefore()
3675 return Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_None || in mustBreakBefore()
3676 Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Empty || in mustBreakBefore()
3679 FormatStyle::SFS_InlineOnly); in mustBreakBefore()
3680 } else if (Style.Language == FormatStyle::LK_Java) { in mustBreakBefore()
3684 } else if (Style.Language == FormatStyle::LK_Cpp || in mustBreakBefore()
3685 Style.Language == FormatStyle::LK_ObjC || in mustBreakBefore()
3686 Style.Language == FormatStyle::LK_Proto || in mustBreakBefore()
3687 Style.Language == FormatStyle::LK_TableGen || in mustBreakBefore()
3688 Style.Language == FormatStyle::LK_TextProto) { in mustBreakBefore()
3720 (Style.Language == FormatStyle::LK_JavaScript && in mustBreakBefore()
3727 (Style.Language == FormatStyle::LK_JavaScript && in mustBreakBefore()
3755 return (Style.AlwaysBreakTemplateDeclarations == FormatStyle::BTDS_Yes); in mustBreakBefore()
3758 Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma && in mustBreakBefore()
3762 Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma && in mustBreakBefore()
3766 if (Style.BreakInheritanceList == FormatStyle::BILS_BeforeComma && in mustBreakBefore()
3769 if (Style.BreakInheritanceList == FormatStyle::BILS_AfterComma && in mustBreakBefore()
3780 Right.NestingLevel == 1 && Style.Language == FormatStyle::LK_Proto) { in mustBreakBefore()
3795 Style.AllowShortBlocksOnASingleLine == FormatStyle::SBS_Never) in mustBreakBefore()
3800 Style.AllowShortLambdasOnASingleLine == FormatStyle::SLS_Inline) in mustBreakBefore()
3803 if (Style.AllowShortLambdasOnASingleLine == FormatStyle::SLS_None || in mustBreakBefore()
3804 Style.AllowShortLambdasOnASingleLine == FormatStyle::SLS_Inline || in mustBreakBefore()
3806 Style.AllowShortLambdasOnASingleLine == FormatStyle::SLS_Empty)) in mustBreakBefore()
3816 if ((Style.Language == FormatStyle::LK_Java || in mustBreakBefore()
3817 Style.Language == FormatStyle::LK_JavaScript) && in mustBreakBefore()
3853 if ((Style.Language == FormatStyle::LK_Proto || in mustBreakBefore()
3854 Style.Language == FormatStyle::LK_TextProto) && in mustBreakBefore()
3914 if ((Style.Language == FormatStyle::LK_Cpp || in mustBreakBefore()
3915 Style.Language == FormatStyle::LK_ObjC) && in mustBreakBefore()
3953 } else if (Style.Language == FormatStyle::LK_Java) { in canBreakBefore()
3960 } else if (Style.Language == FormatStyle::LK_JavaScript) { in canBreakBefore()
4001 return Style.BreakBeforeBinaryOperators == FormatStyle::BOS_None; in canBreakBefore()
4003 return Style.BreakBeforeBinaryOperators != FormatStyle::BOS_None; in canBreakBefore()
4047 FormatStyle::PAS_Right && in canBreakBefore()
4062 Style.BreakConstructorInitializers == FormatStyle::BCIS_AfterColon); in canBreakBefore()
4070 return Style.BreakInheritanceList == FormatStyle::BILS_AfterColon; in canBreakBefore()
4072 return Style.BreakInheritanceList != FormatStyle::BILS_AfterColon; in canBreakBefore()
4081 if (Style.Language == FormatStyle::LK_Proto || in canBreakBefore()
4082 Style.Language == FormatStyle::LK_TextProto) { in canBreakBefore()
4181 return Style.BreakConstructorInitializers == FormatStyle::BCIS_AfterColon; in canBreakBefore()
4183 return Style.BreakConstructorInitializers != FormatStyle::BCIS_AfterColon; in canBreakBefore()
4185 Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma) in canBreakBefore()
4188 Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma) in canBreakBefore()
4191 Style.BreakInheritanceList == FormatStyle::BILS_BeforeComma) in canBreakBefore()
4194 Style.BreakInheritanceList == FormatStyle::BILS_BeforeComma) in canBreakBefore()
4200 Style.BreakBeforeBinaryOperators != FormatStyle::BOS_None && in canBreakBefore()
4201 (Style.BreakBeforeBinaryOperators == FormatStyle::BOS_All || in canBreakBefore()
4210 Style.BreakBeforeBinaryOperators != FormatStyle::BOS_All && in canBreakBefore()
4211 (Style.BreakBeforeBinaryOperators == FormatStyle::BOS_None || in canBreakBefore()
4261 FormatStyle::PointerAlignmentStyle
4265 case FormatStyle::RAS_Pointer: in getTokenReferenceAlignment()
4267 case FormatStyle::RAS_Left: in getTokenReferenceAlignment()
4268 return FormatStyle::PAS_Left; in getTokenReferenceAlignment()
4269 case FormatStyle::RAS_Right: in getTokenReferenceAlignment()
4270 return FormatStyle::PAS_Right; in getTokenReferenceAlignment()
4271 case FormatStyle::RAS_Middle: in getTokenReferenceAlignment()
4272 return FormatStyle::PAS_Middle; in getTokenReferenceAlignment()
4278 FormatStyle::PointerAlignmentStyle
4283 case FormatStyle::RAS_Pointer: in getTokenPointerOrReferenceAlignment()
4285 case FormatStyle::RAS_Left: in getTokenPointerOrReferenceAlignment()
4286 return FormatStyle::PAS_Left; in getTokenPointerOrReferenceAlignment()
4287 case FormatStyle::RAS_Right: in getTokenPointerOrReferenceAlignment()
4288 return FormatStyle::PAS_Right; in getTokenPointerOrReferenceAlignment()
4289 case FormatStyle::RAS_Middle: in getTokenPointerOrReferenceAlignment()
4290 return FormatStyle::PAS_Middle; in getTokenPointerOrReferenceAlignment()