Lines Matching full:left

63 /// With `Left` being '(', check if we're at either `[...](` or
65 static bool isLambdaParameterList(const FormatToken *Left) { in isLambdaParameterList() argument
67 if (Left->Previous && Left->Previous->is(tok::greater) && in isLambdaParameterList()
68 Left->Previous->MatchingParen && in isLambdaParameterList()
69 Left->Previous->MatchingParen->is(TT_TemplateOpener)) { in isLambdaParameterList()
70 Left = Left->Previous->MatchingParen; in isLambdaParameterList()
74 return Left->Previous && Left->Previous->is(tok::r_square) && in isLambdaParameterList()
75 Left->Previous->MatchingParen && in isLambdaParameterList()
76 Left->Previous->MatchingParen->is(TT_LambdaLSquare); in isLambdaParameterList()
175 FormatToken *Left = CurrentToken->Previous; in parseAngle() local
176 Left->ParentBracket = Contexts.back().ContextKind; in parseAngle()
180 const auto *BeforeLess = Left->Previous; in parseAngle()
204 Left->ParentBracket != tok::less && in parseAngle()
216 Left->MatchingParen = CurrentToken; in parseAngle()
217 CurrentToken->MatchingParen = Left; in parseAngle()
258 updateParameterCount(Left, CurrentToken); in parseAngle()
680 FormatToken *Left = CurrentToken->Previous; in parseSquare() local
681 Left->ParentBracket = Contexts.back().ContextKind; in parseSquare()
682 FormatToken *Parent = Left->getPreviousNonComment(); in parseSquare()
694 isCppAttribute(IsCpp, *Left) || IsInnerSquare; in parseSquare()
698 isCSharpAttributeSpecifier(*Left) || in parseSquare()
702 bool IsCppStructuredBinding = Left->isCppStructuredBinding(IsCpp); in parseSquare()
706 Contexts.back().CanBeExpression && Left->isNot(TT_LambdaLSquare) && in parseSquare()
720 Left->setType(TT_StructuredBindingLSquare); in parseSquare()
721 } else if (Left->is(TT_Unknown)) { in parseSquare()
723 Left->setType(TT_ObjCMethodExpr); in parseSquare()
725 Left->setType(TT_InlineASMSymbolicNameLSquare); in parseSquare()
727 Left->setType(TT_AttributeSquare); in parseSquare()
728 if (!IsInnerSquare && Left->Previous) in parseSquare()
729 Left->Previous->EndsCppAttributeGroup = false; in parseSquare()
733 Left->setType(TT_JsComputedPropertyName); in parseSquare()
736 Left->setType(TT_DesignatedInitializerLSquare); in parseSquare()
738 Left->setType(TT_AttributeSquare); in parseSquare()
741 Left->setType(TT_ArraySubscriptLSquare); in parseSquare()
769 Left->setType(TT_ArrayInitializerLSquare); in parseSquare()
770 if (!Left->endsSequence(tok::l_square, tok::numeric_constant, in parseSquare()
772 !Left->endsSequence(tok::l_square, tok::numeric_constant, in parseSquare()
774 !Left->endsSequence(tok::l_square, tok::colon, TT_SelectorName)) { in parseSquare()
775 Left->setType(TT_ProtoExtensionLSquare); in parseSquare()
784 Left->setType(TT_ArrayInitializerLSquare); in parseSquare()
787 Left->setType(TT_ArraySubscriptLSquare); in parseSquare()
812 CurrentToken->Previous->Previous == Left)) && in parseSquare()
813 Left->is(TT_ObjCMethodExpr)) { in parseSquare()
819 Left->setType(TT_Unknown); in parseSquare()
821 if (StartsObjCMethodExpr && CurrentToken->Previous != Left) { in parseSquare()
841 Left->MatchingParen = CurrentToken; in parseSquare()
842 CurrentToken->MatchingParen = Left; in parseSquare()
854 Left->ParameterCount = in parseSquare()
860 if (Left->BlockParameterCount > 1) in parseSquare()
863 if (Style.isTableGen() && Left->is(TT_TableGenListOpener)) in parseSquare()
878 Left->isOneOf(TT_ArraySubscriptLSquare, in parseSquare()
880 Left->setType(TT_ObjCMethodExpr); in parseSquare()
890 if (CurrentToken->is(tok::comma) && Left->is(TT_ObjCMethodExpr) && in parseSquare()
892 Left->setType(TT_ArrayInitializerLSquare); in parseSquare()
905 updateParameterCount(Left, Tok); in parseSquare()
910 updateParameterCount(Left, Tok); in parseSquare()
1246 void updateParameterCount(FormatToken *Left, FormatToken *Current) { in updateParameterCount() argument
1251 ++Left->BlockParameterCount; in updateParameterCount()
1253 ++Left->ParameterCount; in updateParameterCount()
1254 if (!Left->Role) in updateParameterCount()
1255 Left->Role.reset(new CommaSeparatedList(Style)); in updateParameterCount()
1256 Left->Role->CommaFound(Current); in updateParameterCount()
1257 } else if (Left->ParameterCount == 0 && Current->isNot(tok::comment)) { in updateParameterCount()
1258 Left->ParameterCount = 1; in updateParameterCount()
1517 // In the following example all 4 left parentheses will be treated as in consumeToken()
1838 // We still want to format the whitespace left of the first token of the in parseWarningOrError()
2703 // If there is a closing parenthesis left of the current in rParenEndsCast()
4144 const FormatToken &Left = *Tok.Previous; in splitPenalty() local
4147 if (Left.is(tok::semi)) in splitPenalty()
4156 if (Left.is(tok::comma) && Left.NestingLevel == 0) in splitPenalty()
4159 if (Right.is(Keywords.kw_function) && Left.isNot(tok::comma)) in splitPenalty()
4161 if (Left.is(TT_JsTypeColon)) in splitPenalty()
4163 if ((Left.is(TT_TemplateString) && Left.TokenText.ends_with("${")) || in splitPenalty()
4168 if (Left.opensScope() && Right.closesScope()) in splitPenalty()
4180 if (Left.is(tok::r_square)) in splitPenalty()
4183 if (Right.is(TT_LambdaLSquare) && Left.is(tok::equal)) in splitPenalty()
4192 if (Left.is(tok::coloncolon)) in splitPenalty()
4198 if (Left.is(TT_StartOfName)) in splitPenalty()
4208 if (Left.is(tok::equal) && Right.is(tok::l_brace)) in splitPenalty()
4210 if (Left.is(TT_CastRParen)) in splitPenalty()
4212 if (Left.isOneOf(tok::kw_class, tok::kw_struct, tok::kw_union)) in splitPenalty()
4214 if (Left.is(tok::comment)) in splitPenalty()
4217 if (Left.isOneOf(TT_RangeBasedForLoopColon, TT_InheritanceColon, in splitPenalty()
4259 return (Left.is(tok::r_paren) ? 100 : 120) + (is_short_annotation ? 50 : 0); in splitPenalty()
4263 if (Line.startsWith(tok::kw_for) && Left.is(tok::equal)) in splitPenalty()
4270 if (Left.is(tok::colon) && Left.is(TT_ObjCMethodExpr)) in splitPenalty()
4276 if (Line.Type == LT_ObjCDecl && Left.is(tok::l_paren) && Left.Previous && in splitPenalty()
4277 Left.Previous->isOneOf(tok::identifier, tok::greater)) { in splitPenalty()
4281 if (Left.is(tok::l_paren) && Style.PenaltyBreakOpenParenthesis != 0) in splitPenalty()
4283 if (Left.is(tok::l_paren) && InFunctionDecl && in splitPenalty()
4287 if (Left.is(tok::l_paren) && Left.Previous && in splitPenalty()
4288 (Left.Previous->isOneOf(tok::kw_for, tok::kw__Generic) || in splitPenalty()
4289 Left.Previous->isIf())) { in splitPenalty()
4292 if (Left.is(tok::equal) && InFunctionDecl) in splitPenalty()
4296 if (Left.is(TT_TemplateOpener)) in splitPenalty()
4298 if (Left.opensScope()) { in splitPenalty()
4303 (Left.ParameterCount <= 1 || Style.AllowAllArgumentsOnNextLine)) { in splitPenalty()
4306 if (Left.is(tok::l_brace) && !Style.Cpp11BracedListStyle) in splitPenalty()
4308 return Left.ParameterCount > 1 ? Style.PenaltyBreakBeforeFirstCallParameter in splitPenalty()
4311 if (Left.is(TT_JavaAnnotation)) in splitPenalty()
4314 if (Left.is(TT_UnaryOperator)) in splitPenalty()
4316 if (Left.isOneOf(tok::plus, tok::comma) && Left.Previous && in splitPenalty()
4317 Left.Previous->isLabelString() && in splitPenalty()
4318 (Left.NextOperator || Left.OperatorIndex != 0)) { in splitPenalty()
4321 if (Right.is(tok::plus) && Left.isLabelString() && in splitPenalty()
4325 if (Left.is(tok::comma)) in splitPenalty()
4327 if (Right.is(tok::lessless) && Left.isLabelString() && in splitPenalty()
4333 if (Left.isNot(tok::r_paren) || Right.OperatorIndex > 0) { in splitPenalty()
4339 if (Left.ClosesTemplateDeclaration) in splitPenalty()
4341 if (Left.ClosesRequiresClause) in splitPenalty()
4343 if (Left.is(TT_ConditionalExpr)) in splitPenalty()
4345 prec::Level Level = Left.getPrecedence(); in splitPenalty()
4371 const FormatToken &Left, in spaceRequiredBetween() argument
4373 if (Left.is(tok::kw_return) && in spaceRequiredBetween()
4377 if (Left.is(tok::kw_throw) && Right.is(tok::l_paren) && Right.MatchingParen && in spaceRequiredBetween()
4381 if (Left.is(Keywords.kw_assert) && Style.Language == FormatStyle::LK_Java) in spaceRequiredBetween()
4384 Left.Tok.getObjCKeywordID() == tok::objc_property) { in spaceRequiredBetween()
4388 return Left.is(tok::hash); in spaceRequiredBetween()
4389 if (Left.isOneOf(tok::hashhash, tok::hash)) in spaceRequiredBetween()
4391 if (Left.is(BK_Block) && Right.is(tok::r_brace) && in spaceRequiredBetween()
4392 Right.MatchingParen == &Left && Line.Children.empty()) { in spaceRequiredBetween()
4395 if ((Left.is(tok::l_paren) && Right.is(tok::r_paren)) || in spaceRequiredBetween()
4396 (Left.is(tok::l_brace) && Left.isNot(BK_Block) && in spaceRequiredBetween()
4402 Left.is(tok::r_paren) && Right.is(tok::r_paren)) { in spaceRequiredBetween()
4403 auto *InnerLParen = Left.MatchingParen; in spaceRequiredBetween()
4411 if (Left.is(tok::l_paren)) in spaceRequiredBetween()
4412 LeftParen = &Left; in spaceRequiredBetween()
4424 if (Left.is(tok::kw_auto) && Right.isOneOf(TT_LambdaLBrace, TT_FunctionLBrace, in spaceRequiredBetween()
4431 if (Left.is(tok::kw_auto) && Right.isOneOf(tok::l_paren, tok::l_brace)) in spaceRequiredBetween()
4434 const auto *BeforeLeft = Left.Previous; in spaceRequiredBetween()
4437 if (Right.is(tok::l_paren) && Left.is(tok::kw_co_await) && BeforeLeft && in spaceRequiredBetween()
4442 if (Left.isOneOf(tok::kw_co_await, tok::kw_co_yield, tok::kw_co_return) && in spaceRequiredBetween()
4447 if (Left.is(tok::l_paren) || Right.is(tok::r_paren)) { in spaceRequiredBetween()
4449 (Left.MatchingParen && Left.MatchingParen->is(TT_CastRParen))) in spaceRequiredBetween()
4461 if (Right.is(tok::less) && Left.is(tok::kw_template)) in spaceRequiredBetween()
4463 if (Left.isOneOf(tok::exclaim, tok::tilde)) in spaceRequiredBetween()
4465 if (Left.is(tok::at) && in spaceRequiredBetween()
4471 if (Left.is(tok::colon)) in spaceRequiredBetween()
4472 return Left.isNot(TT_ObjCMethodExpr); in spaceRequiredBetween()
4473 if (Left.is(tok::coloncolon)) in spaceRequiredBetween()
4475 if (Left.is(tok::less) || Right.isOneOf(tok::greater, tok::less)) { in spaceRequiredBetween()
4478 (Left.is(TT_DictLiteral) || Right.is(TT_DictLiteral)))) { in spaceRequiredBetween()
4480 if (Left.is(tok::less) && Right.is(tok::greater)) in spaceRequiredBetween()
4489 return Left.Tok.isLiteral() || (Left.is(tok::identifier) && BeforeLeft && in spaceRequiredBetween()
4492 if (Left.is(tok::l_square) && Right.is(tok::amp)) in spaceRequiredBetween()
4495 if (Left.is(tok::r_paren) && Line.MightBeFunctionDecl) { in spaceRequiredBetween()
4496 if (!Left.MatchingParen) in spaceRequiredBetween()
4499 Left.MatchingParen->getPreviousNonComment(); in spaceRequiredBetween()
4500 if (!TokenBeforeMatchingParen || Left.isNot(TT_TypeDeclarationParen)) in spaceRequiredBetween()
4508 (Left.is(TT_AttributeRParen) || in spaceRequiredBetween()
4509 Left.canBePointerOrReferenceQualifier())) { in spaceRequiredBetween()
4512 if (Left.Tok.isLiteral()) in spaceRequiredBetween()
4515 if (Left.isTypeOrIdentifier(LangOpts) && Right.Next && Right.Next->Next && in spaceRequiredBetween()
4520 return !Left.isOneOf(TT_PointerOrReference, tok::l_paren) && in spaceRequiredBetween()
4524 (Left.NestingLevel == 0 || in spaceRequiredBetween()
4525 (Left.NestingLevel == 1 && startsWithInitStatement(Line))))); in spaceRequiredBetween()
4527 if (Right.is(TT_FunctionTypeLParen) && Left.isNot(tok::l_paren) && in spaceRequiredBetween()
4528 (Left.isNot(TT_PointerOrReference) || in spaceRequiredBetween()
4529 (getTokenPointerOrReferenceAlignment(Left) != FormatStyle::PAS_Right && in spaceRequiredBetween()
4533 if (Left.is(TT_PointerOrReference)) { in spaceRequiredBetween()
4560 return getTokenPointerOrReferenceAlignment(Left) != in spaceRequiredBetween()
4567 if (getTokenPointerOrReferenceAlignment(Left) == FormatStyle::PAS_Right) in spaceRequiredBetween()
4576 (Left.NestingLevel == Line.First->NestingLevel || in spaceRequiredBetween()
4577 ((Left.NestingLevel == Line.First->NestingLevel + 1) && in spaceRequiredBetween()
4584 if (Left.isNot(tok::star)) in spaceRequiredBetween()
4596 if (Left.is(tok::ellipsis) && BeforeLeft && in spaceRequiredBetween()
4601 if (Right.is(tok::star) && Left.is(tok::l_paren)) in spaceRequiredBetween()
4603 if (Left.is(tok::star) && Right.isPointerOrReference()) in spaceRequiredBetween()
4606 const FormatToken *Previous = &Left; in spaceRequiredBetween()
4645 if (Style.isCSharp() && Left.is(Keywords.kw_is) && Right.is(tok::l_square)) in spaceRequiredBetween()
4654 if (Left.is(tok::l_square)) { in spaceRequiredBetween()
4655 return (Left.is(TT_ArrayInitializerLSquare) && Right.isNot(tok::r_square) && in spaceRequiredBetween()
4656 SpaceRequiredForArrayInitializerLSquare(Left, Style)) || in spaceRequiredBetween()
4657 (Left.isOneOf(TT_ArraySubscriptLSquare, TT_StructuredBindingLSquare, in spaceRequiredBetween()
4675 !Left.isOneOf(tok::numeric_constant, TT_DictLiteral) && in spaceRequiredBetween()
4676 !(Left.isNot(tok::r_square) && Style.SpaceBeforeSquareBrackets && in spaceRequiredBetween()
4680 if (Left.is(tok::l_brace) && Right.is(tok::r_brace)) in spaceRequiredBetween()
4681 return !Left.Children.empty(); // No spaces in "{}". in spaceRequiredBetween()
4682 if ((Left.is(tok::l_brace) && Left.isNot(BK_Block)) || in spaceRequiredBetween()
4687 if (Left.is(TT_BlockComment)) { in spaceRequiredBetween()
4689 return Style.isJavaScript() || !Left.TokenText.ends_with("=*/"); in spaceRequiredBetween()
4694 if (Left.is(TT_TemplateCloser) && Right.is(TT_AttributeSquare)) in spaceRequiredBetween()
4698 if (Left.is(TT_TemplateCloser) && Right.isNot(TT_FunctionTypeLParen)) in spaceRequiredBetween()
4700 if (Left.isOneOf(TT_RequiresClause, in spaceRequiredBetween()
4705 if (Left.is(TT_RequiresExpression)) { in spaceRequiredBetween()
4709 if (Left.is(TT_AttributeRParen) || in spaceRequiredBetween()
4710 (Left.is(tok::r_square) && Left.is(TT_AttributeSquare))) { in spaceRequiredBetween()
4713 if (Left.is(TT_ForEachMacro)) { in spaceRequiredBetween()
4717 if (Left.is(TT_IfMacro)) { in spaceRequiredBetween()
4722 Left.isOneOf(tok::kw_new, tok::kw_delete) && in spaceRequiredBetween()
4724 !(Line.MightBeFunctionDecl && Left.is(TT_FunctionDeclarationName))) { in spaceRequiredBetween()
4729 if (Left.is(tok::semi)) in spaceRequiredBetween()
4731 if (Left.isOneOf(tok::pp_elif, tok::kw_for, tok::kw_while, tok::kw_switch, in spaceRequiredBetween()
4733 Left.isIf(Line.Type != LT_PreprocessorDirective) || in spaceRequiredBetween()
4753 if (Line.Type != LT_PreprocessorDirective && Left.is(tok::r_square) && in spaceRequiredBetween()
4754 Left.MatchingParen && Left.MatchingParen->is(TT_LambdaLSquare)) { in spaceRequiredBetween()
4759 if (Left.isOneOf(tok::kw_try, Keywords.kw___except, tok::kw_catch)) { in spaceRequiredBetween()
4763 if (Left.isOneOf(tok::kw_new, tok::kw_delete)) { in spaceRequiredBetween()
4769 if (Left.is(tok::r_square) && Left.MatchingParen && in spaceRequiredBetween()
4770 Left.MatchingParen->Previous && in spaceRequiredBetween()
4771 Left.MatchingParen->Previous->is(tok::kw_delete)) { in spaceRequiredBetween()
4778 (Left.Tok.getIdentifierInfo() || Left.is(tok::r_paren))) { in spaceRequiredBetween()
4783 if (Left.is(tok::at) && Right.Tok.getObjCKeywordID() != tok::objc_not_keyword) in spaceRequiredBetween()
4786 return !Left.isOneOf(tok::l_paren, tok::l_square, tok::at) && in spaceRequiredBetween()
4787 (Left.isNot(tok::colon) || Left.isNot(TT_ObjCMethodExpr)); in spaceRequiredBetween()
4794 (Left.isOneOf(tok::identifier, tok::greater, tok::r_square, in spaceRequiredBetween()
4796 Left.isTypeName(LangOpts)) && in spaceRequiredBetween()
4801 if (Left.is(tok::period) || Right.is(tok::period)) in spaceRequiredBetween()
4805 if (Right.is(tok::hash) && Left.is(tok::identifier) && in spaceRequiredBetween()
4806 (Left.TokenText == "L" || Left.TokenText == "u" || in spaceRequiredBetween()
4807 Left.TokenText == "U" || Left.TokenText == "u8" || in spaceRequiredBetween()
4808 Left.TokenText == "LR" || Left.TokenText == "uR" || in spaceRequiredBetween()
4809 Left.TokenText == "UR" || Left.TokenText == "u8R")) { in spaceRequiredBetween()
4812 if (Left.is(TT_TemplateCloser) && Left.MatchingParen && in spaceRequiredBetween()
4813 Left.MatchingParen->Previous && in spaceRequiredBetween()
4814 (Left.MatchingParen->Previous->is(tok::period) || in spaceRequiredBetween()
4815 Left.MatchingParen->Previous->is(tok::coloncolon))) { in spaceRequiredBetween()
4821 if (Left.is(TT_TemplateCloser) && Right.is(tok::l_square)) in spaceRequiredBetween()
4823 if (Left.is(tok::l_brace) && Left.endsSequence(TT_DictLiteral, tok::at)) { in spaceRequiredBetween()
4833 Left.isOneOf(tok::kw_const, tok::kw_volatile) && in spaceRequiredBetween()
4846 const FormatToken &Left = *Right.Previous; in spaceRequiredBefore() local
4850 if (Left.Finalized) in spaceRequiredBefore()
4858 Keywords.isWordLike(Left, IsVerilog)) { in spaceRequiredBefore()
4864 if (Left.is(tok::star) && Right.is(tok::comment)) in spaceRequiredBefore()
4868 if (Left.is(TT_OverloadedOperator) && in spaceRequiredBefore()
4873 if (Right.is(tok::period) && Left.is(tok::numeric_constant)) in spaceRequiredBefore()
4877 if (Left.is(Keywords.kw_import) && Right.isOneOf(tok::less, tok::ellipsis)) in spaceRequiredBefore()
4880 if (Left.isOneOf(Keywords.kw_module, Keywords.kw_import) && in spaceRequiredBefore()
4885 if (Left.is(tok::identifier) && Right.is(TT_ModulePartitionColon)) in spaceRequiredBefore()
4888 if (Left.is(TT_ModulePartitionColon) && in spaceRequiredBefore()
4892 if (Left.is(tok::ellipsis) && Right.is(tok::identifier) && in spaceRequiredBefore()
4897 if (Left.isOneOf(TT_AttributeRParen, TT_AttributeMacro) && in spaceRequiredBefore()
4902 if (Left.is(tok::kw_operator)) in spaceRequiredBefore()
4905 !Left.opensScope() && Style.SpaceBeforeCpp11BracedList) { in spaceRequiredBefore()
4908 if (Left.is(tok::less) && Left.is(TT_OverloadedOperator) && in spaceRequiredBefore()
4913 if (Left.is(tok::identifier) && Right.is(tok::numeric_constant)) in spaceRequiredBefore()
4915 // `Left` is a keyword (including C++ alternative operator) or identifier. in spaceRequiredBefore()
4916 if (Left.Tok.getIdentifierInfo() && Right.Tok.isLiteral()) in spaceRequiredBefore()
4920 Left.isOneOf(Keywords.kw_optional, Keywords.kw_required, in spaceRequiredBefore()
4925 Left.isOneOf(Keywords.kw_returns, Keywords.kw_option)) { in spaceRequiredBefore()
4928 if (Right.isOneOf(tok::l_brace, tok::less) && Left.is(TT_SelectorName)) in spaceRequiredBefore()
4931 if (Left.is(tok::slash) || Right.is(tok::slash)) in spaceRequiredBefore()
4933 if (Left.MatchingParen && in spaceRequiredBefore()
4934 Left.MatchingParen->is(TT_ProtoExtensionLSquare) && in spaceRequiredBefore()
4939 if (Left.is(tok::percent)) in spaceRequiredBefore()
4943 if (Left.is(tok::numeric_constant) && Right.is(tok::percent)) in spaceRequiredBefore()
4946 if (Right.is(tok::colon) && Left.is(tok::string_literal)) in spaceRequiredBefore()
4954 if (Left.is(tok::kw_this) && Right.is(tok::l_square)) in spaceRequiredBefore()
4958 if (Left.is(tok::kw_new) && Right.is(tok::l_paren)) in spaceRequiredBefore()
4966 if (Left.is(tok::l_brace) && Right.isNot(tok::r_brace)) in spaceRequiredBefore()
4969 if (Left.isNot(tok::l_brace) && Right.is(tok::r_brace)) in spaceRequiredBefore()
4973 if (Left.is(TT_FatArrow) || Right.is(TT_FatArrow)) in spaceRequiredBefore()
4977 if (Left.is(TT_AttributeColon) || Right.is(TT_AttributeColon)) in spaceRequiredBefore()
4981 if (Left.is(TT_TemplateCloser) && Right.is(TT_StartOfName)) in spaceRequiredBefore()
4985 if (Left.is(tok::l_square) || Right.is(tok::r_square)) in spaceRequiredBefore()
4997 if (Left.is(tok::comma) && Right.is(tok::comma)) in spaceRequiredBefore()
5001 if (Left.is(Keywords.kw_var) && Right.is(tok::l_paren)) in spaceRequiredBefore()
5006 if (Left.isOneOf(tok::kw_using, Keywords.kw_async, Keywords.kw_when, in spaceRequiredBefore()
5015 if ((Left.isAccessSpecifierKeyword() || in spaceRequiredBefore()
5016 Left.isOneOf(tok::kw_virtual, tok::kw_extern, tok::kw_static, in spaceRequiredBefore()
5024 if (Left.is(TT_FatArrow)) in spaceRequiredBefore()
5027 if (Right.is(tok::l_paren) && Left.is(Keywords.kw_await) && Left.Previous && in spaceRequiredBefore()
5028 Left.Previous->is(tok::kw_for)) { in spaceRequiredBefore()
5031 if (Left.is(Keywords.kw_async) && Right.is(tok::l_paren) && in spaceRequiredBefore()
5039 if ((Left.is(TT_TemplateString) && Left.TokenText.ends_with("${")) || in spaceRequiredBefore()
5045 if (Keywords.isJavaScriptIdentifier(Left, in spaceRequiredBefore()
5051 Left.isOneOf(Keywords.kw_function, Keywords.kw_yield)) { in spaceRequiredBefore()
5055 Left.isOneOf(Keywords.kw_function, Keywords.kw_yield, in spaceRequiredBefore()
5061 if (Line.MustBeDeclaration && Left.Tok.getIdentifierInfo()) in spaceRequiredBefore()
5065 if (Left.Previous && Left.Previous->is(tok::period) && in spaceRequiredBefore()
5066 Left.Tok.getIdentifierInfo()) { in spaceRequiredBefore()
5070 if (Left.isOneOf(tok::kw_throw, Keywords.kw_await, Keywords.kw_typeof, in spaceRequiredBefore()
5076 if (Left.endsSequence(tok::kw_const, Keywords.kw_as)) in spaceRequiredBefore()
5078 if ((Left.isOneOf(Keywords.kw_let, Keywords.kw_var, Keywords.kw_in, in spaceRequiredBefore()
5083 (Left.is(Keywords.kw_of) && Left.Previous && in spaceRequiredBefore()
5084 (Left.Previous->is(tok::identifier) || in spaceRequiredBefore()
5085 Left.Previous->isOneOf(tok::r_square, tok::r_brace)))) && in spaceRequiredBefore()
5086 (!Left.Previous || Left.Previous->isNot(tok::period))) { in spaceRequiredBefore()
5089 if (Left.isOneOf(tok::kw_for, Keywords.kw_as) && Left.Previous && in spaceRequiredBefore()
5090 Left.Previous->is(tok::period) && Right.is(tok::l_paren)) { in spaceRequiredBefore()
5093 if (Left.is(Keywords.kw_as) && in spaceRequiredBefore()
5097 if (Left.is(tok::kw_default) && Left.Previous && in spaceRequiredBefore()
5098 Left.Previous->is(tok::kw_export)) { in spaceRequiredBefore()
5101 if (Left.is(Keywords.kw_is) && Right.is(tok::l_brace)) in spaceRequiredBefore()
5105 if (Left.is(TT_JsTypeOperator) || Right.is(TT_JsTypeOperator)) in spaceRequiredBefore()
5107 if ((Left.is(tok::l_brace) || Right.is(tok::r_brace)) && in spaceRequiredBefore()
5111 if (Left.is(tok::ellipsis)) in spaceRequiredBefore()
5113 if (Left.is(TT_TemplateCloser) && in spaceRequiredBefore()
5123 if (Left.is(TT_NonNullAssertion) && in spaceRequiredBefore()
5128 if (Left.is(TT_CaseLabelArrow) || Right.is(TT_CaseLabelArrow)) in spaceRequiredBefore()
5130 if (Left.is(tok::r_square) && Right.is(tok::l_brace)) in spaceRequiredBefore()
5133 if (Left.is(tok::l_square) || Right.is(tok::r_square)) in spaceRequiredBefore()
5136 if (Left.is(Keywords.kw_synchronized) && Right.is(tok::l_paren)) { in spaceRequiredBefore()
5140 if ((Left.isAccessSpecifierKeyword() || in spaceRequiredBefore()
5141 Left.isOneOf(tok::kw_static, Keywords.kw_final, Keywords.kw_abstract, in spaceRequiredBefore()
5148 if (Left.is(tok::identifier) && Left.TokenText[0] == '\\') in spaceRequiredBefore()
5152 if ((Left.is(TT_VerilogTableItem) && in spaceRequiredBefore()
5154 (Right.is(TT_VerilogTableItem) && Left.isNot(tok::l_paren))) { in spaceRequiredBefore()
5159 if (Left.isNot(TT_BinaryOperator) && in spaceRequiredBefore()
5160 Left.isOneOf(Keywords.kw_verilogHash, Keywords.kw_verilogHashHash)) { in spaceRequiredBefore()
5165 (Left.endsSequence(tok::numeric_constant, Keywords.kw_verilogHash) || in spaceRequiredBefore()
5166 Left.endsSequence(tok::numeric_constant, in spaceRequiredBefore()
5168 (Left.is(tok::r_paren) && Left.MatchingParen && in spaceRequiredBefore()
5169 Left.MatchingParen->endsSequence(tok::l_paren, tok::at)))) { in spaceRequiredBefore()
5174 if (Left.is(Keywords.kw_apostrophe) || in spaceRequiredBefore()
5175 (Left.is(TT_VerilogNumberBase) && Right.is(tok::numeric_constant))) { in spaceRequiredBefore()
5179 if (Left.is(tok::arrow) || Right.is(tok::arrow)) in spaceRequiredBefore()
5184 if (Left.is(tok::at) && Right.isOneOf(tok::l_paren, tok::star, tok::at)) in spaceRequiredBefore()
5188 Left.isOneOf(TT_VerilogDimensionedTypeName, Keywords.kw_function)) { in spaceRequiredBefore()
5193 Keywords.isVerilogIdentifier(Left) && Left.getPreviousNonComment() && in spaceRequiredBefore()
5194 Left.getPreviousNonComment()->is(Keywords.kw_tagged)) { in spaceRequiredBefore()
5202 !(Left.isOneOf(Keywords.kw_assign, Keywords.kw_unique) || in spaceRequiredBefore()
5203 Keywords.isVerilogWordOperator(Left)) && in spaceRequiredBefore()
5204 (Left.isOneOf(tok::r_square, tok::r_paren, tok::r_brace, in spaceRequiredBefore()
5206 Keywords.isWordLike(Left))) { in spaceRequiredBefore()
5210 if ((Right.is(tok::star) && Left.is(tok::coloncolon)) || in spaceRequiredBefore()
5211 (Left.is(tok::star) && Right.is(tok::semi))) { in spaceRequiredBefore()
5215 if (Left.endsSequence(tok::star, tok::l_paren) && Right.is(tok::identifier)) in spaceRequiredBefore()
5221 if ((Left.is(tok::l_brace) && in spaceRequiredBefore()
5223 (Left.endsSequence(tok::lessless, tok::l_brace) || in spaceRequiredBefore()
5224 Left.endsSequence(tok::greatergreater, tok::l_brace))) { in spaceRequiredBefore()
5229 if (Left.is(tok::l_square) && Right.is(tok::l_brace)) in spaceRequiredBefore()
5231 if (Left.is(tok::r_brace) && Right.is(tok::r_square)) in spaceRequiredBefore()
5236 Left.isOneOf(TT_TableGenDAGArgListColon, in spaceRequiredBefore()
5242 if (Left.isOneOf(TT_TableGenDAGArgOperatorID, in spaceRequiredBefore()
5249 Left.isOneOf(TT_TableGenBangOperator, TT_TableGenCondOperator)) { in spaceRequiredBefore()
5254 if (Left.is(TT_TableGenTrailingPasteOperator) && in spaceRequiredBefore()
5259 if (Left.is(tok::hash) || Right.is(tok::hash)) in spaceRequiredBefore()
5262 if (Keywords.isTableGenDefinition(Left)) in spaceRequiredBefore()
5266 if (Left.is(TT_ImplicitStringLiteral)) in spaceRequiredBefore()
5269 if (Left.is(TT_ObjCMethodSpecifier)) in spaceRequiredBefore()
5271 if (Left.is(tok::r_paren) && Left.isNot(TT_AttributeRParen) && in spaceRequiredBefore()
5280 (Right.is(tok::equal) || Left.is(tok::equal))) { in spaceRequiredBefore()
5285 Left.isOneOf(TT_TrailingReturnArrow, TT_LambdaArrow)) { in spaceRequiredBefore()
5288 if (Left.is(tok::comma) && Right.isNot(TT_OverloadedOperatorLParen) && in spaceRequiredBefore()
5291 (Left.Children.empty() || !Left.MacroParent)) { in spaceRequiredBefore()
5306 if (Left.is(TT_BitFieldColon)) { in spaceRequiredBefore()
5320 if (Left.is(tok::question)) in spaceRequiredBefore()
5322 if (Right.is(TT_InlineASMColon) && Left.is(tok::coloncolon)) in spaceRequiredBefore()
5339 if ((Left.isOneOf(tok::minus, tok::minusminus) && in spaceRequiredBefore()
5341 (Left.isOneOf(tok::plus, tok::plusplus) && in spaceRequiredBefore()
5345 if (Left.is(TT_UnaryOperator)) { in spaceRequiredBefore()
5348 if (Left.is(tok::amp) && Right.is(tok::r_square)) in spaceRequiredBefore()
5350 return Style.SpaceAfterLogicalNot && Left.is(tok::exclaim); in spaceRequiredBefore()
5355 if (Left.is(TT_CastRParen)) { in spaceRequiredBefore()
5368 if (Left.is(tok::greater) && Right.is(tok::greater)) { in spaceRequiredBefore()
5370 (Style.Language == FormatStyle::LK_Proto && Left.is(TT_DictLiteral))) { in spaceRequiredBefore()
5373 return Right.is(TT_TemplateCloser) && Left.is(TT_TemplateCloser) && in spaceRequiredBefore()
5378 Left.isOneOf(tok::arrow, tok::period, tok::arrowstar, tok::periodstar) || in spaceRequiredBefore()
5382 if (!Style.SpaceBeforeAssignmentOperators && Left.isNot(TT_TemplateCloser) && in spaceRequiredBefore()
5387 (Left.is(tok::identifier) || Left.is(tok::kw_this))) { in spaceRequiredBefore()
5390 if (Right.is(tok::coloncolon) && Left.is(tok::identifier)) { in spaceRequiredBefore()
5397 !Left.isOneOf(tok::l_brace, tok::comment, tok::l_paren)) { in spaceRequiredBefore()
5399 return (Left.is(TT_TemplateOpener) && in spaceRequiredBefore()
5402 !(Left.isOneOf(tok::l_paren, tok::r_paren, tok::l_square, in spaceRequiredBefore()
5405 (Left.is(tok::l_paren) && Style.SpacesInParensOptions.Other); in spaceRequiredBefore()
5407 if ((Left.is(TT_TemplateOpener)) != (Right.is(TT_TemplateCloser))) in spaceRequiredBefore()
5411 return !Left.isOneOf(tok::amp, tok::ampamp) || in spaceRequiredBefore()
5412 getTokenReferenceAlignment(Left) != FormatStyle::PAS_Right; in spaceRequiredBefore()
5419 if ((Right.is(TT_BinaryOperator) && Left.isNot(tok::l_paren)) || in spaceRequiredBefore()
5420 (Left.isOneOf(TT_BinaryOperator, TT_ConditionalExpr) && in spaceRequiredBefore()
5424 if (Right.is(TT_TemplateOpener) && Left.is(tok::r_paren) && in spaceRequiredBefore()
5425 Left.MatchingParen && in spaceRequiredBefore()
5426 Left.MatchingParen->is(TT_OverloadedOperatorLParen)) { in spaceRequiredBefore()
5429 if (Right.is(tok::less) && Left.isNot(tok::l_paren) && in spaceRequiredBefore()
5435 if (Left.is(TT_RegexLiteral)) in spaceRequiredBefore()
5437 return spaceRequiredBetween(Line, Left, Right); in spaceRequiredBefore()
5465 const FormatToken &Left = *Right.Previous; in mustBreakBefore() local
5470 Line.mightBeFunctionDefinition() && Left.MightBeFunctionDeclParen && in mustBreakBefore()
5471 Left.ParameterCount > 0) { in mustBreakBefore()
5475 const auto *BeforeLeft = Left.Previous; in mustBreakBefore()
5479 if (Left.is(TT_FatArrow) && Right.is(tok::l_brace) && in mustBreakBefore()
5484 Left.is(TT_CSharpNamedArgumentColon)) { in mustBreakBefore()
5496 if (Left.is(TT_AttributeSquare) && Left.is(tok::r_square) && in mustBreakBefore()
5502 if (Left.is(TT_AttributeSquare) && Right.is(TT_AttributeSquare) && in mustBreakBefore()
5503 Left.is(tok::r_square) && Right.is(tok::l_square)) { in mustBreakBefore()
5508 if (Right.is(tok::string_literal) && Left.is(tok::plus) && BeforeLeft && in mustBreakBefore()
5512 if (Left.is(TT_DictLiteral) && Left.is(tok::l_brace) && Line.Level == 0 && in mustBreakBefore()
5523 if (Left.is(tok::l_brace) && Line.Level == 0 && in mustBreakBefore()
5532 if (Right.is(tok::r_brace) && Left.is(tok::l_brace) && BeforeLeft && in mustBreakBefore()
5541 return !Left.Children.empty(); in mustBreakBefore()
5545 return (Left.NestingLevel == 0 && Line.Level == 0) && in mustBreakBefore()
5546 !Left.Children.empty(); in mustBreakBefore()
5551 if (Right.is(tok::r_brace) && Left.is(tok::l_brace) && in mustBreakBefore()
5552 !Left.Children.empty()) { in mustBreakBefore()
5556 (Left.NestingLevel == 0 && Line.Level == 0 && in mustBreakBefore()
5561 if (Right.is(tok::plus) && Left.is(tok::string_literal) && AfterRight && in mustBreakBefore()
5567 if (Left.is(TT_VerilogAssignComma)) in mustBreakBefore()
5570 if (Left.is(TT_VerilogTypeComma)) in mustBreakBefore()
5575 (Left.is(TT_VerilogInstancePortComma) || in mustBreakBefore()
5576 (Left.is(tok::r_paren) && Keywords.isVerilogIdentifier(Right) && in mustBreakBefore()
5577 Left.MatchingParen && in mustBreakBefore()
5578 Left.MatchingParen->is(TT_VerilogInstancePortLParen)))) { in mustBreakBefore()
5583 if (!Keywords.isVerilogBegin(Right) && Keywords.isVerilogEndOfLabel(Left)) in mustBreakBefore()
5588 if (Left.isStringLiteral() && Right.isStringLiteral()) in mustBreakBefore()
5597 if (Left.is(TT_DictLiteral) && Left.is(tok::l_brace)) in mustBreakBefore()
5600 if ((Left.is(TT_ArrayInitializerLSquare) && Left.is(tok::l_square) && in mustBreakBefore()
5602 Left.is(tok::comma)) { in mustBreakBefore()
5619 if (Left.is(TT_TableGenCondOperatorComma)) in mustBreakBefore()
5621 if (Left.is(TT_TableGenDAGArgOperatorToBreak) && in mustBreakBefore()
5625 if (Left.is(TT_TableGenDAGArgListCommaToBreak)) in mustBreakBefore()
5629 &Left != Right.MatchingParen->Next) { in mustBreakBefore()
5646 if ((Left.isOneOf(tok::l_brace, TT_ArrayInitializerLSquare) || in mustBreakBefore()
5647 (Style.isJavaScript() && Left.is(tok::l_paren))) && in mustBreakBefore()
5648 Left.isNot(BK_Block) && Left.MatchingParen) { in mustBreakBefore()
5649 BeforeClosingBrace = Left.MatchingParen->Previous; in mustBreakBefore()
5655 BeforeClosingBrace = &Left; in mustBreakBefore()
5664 return Left.isNot(BK_BracedInit) && Left.isNot(TT_CtorInitializerColon) && in mustBreakBefore()
5667 if (Left.isTrailingComment()) in mustBreakBefore()
5669 if (Left.IsUnterminatedLiteral) in mustBreakBefore()
5673 Left.is(tok::string_literal) && Right.is(tok::lessless) && AfterRight && in mustBreakBefore()
5688 if (Left.ClosesTemplateDeclaration && Left.MatchingParen && in mustBreakBefore()
5689 Left.MatchingParen->NestingLevel == 0) { in mustBreakBefore()
5699 if (Left.ClosesRequiresClause && Right.isNot(tok::semi)) { in mustBreakBefore()
5710 (Left.is(TT_CtorInitializerComma) || in mustBreakBefore()
5716 Left.isOneOf(TT_CtorInitializerColon, TT_CtorInitializerComma)) { in mustBreakBefore()
5733 Left.is(TT_CtorInitializerColon)) { in mustBreakBefore()
5743 Left.is(TT_InheritanceComma)) { in mustBreakBefore()
5752 if ((Left.is(tok::l_brace) || in mustBreakBefore()
5753 (Left.is(tok::less) && BeforeLeft && BeforeLeft->is(tok::equal))) && in mustBreakBefore()
5762 if (isAllmanBrace(Left) || isAllmanBrace(Right)) { in mustBreakBefore()
5797 if (Left.is(TT_ObjCBlockLBrace) && in mustBreakBefore()
5803 if (Left.isOneOf(TT_AttributeRParen, TT_AttributeMacro) && in mustBreakBefore()
5808 if (Left.is(TT_LambdaLBrace)) { in mustBreakBefore()
5809 if (IsFunctionArgument(Left) && in mustBreakBefore()
5816 (!Left.Children.empty() && in mustBreakBefore()
5823 (Left.isPointerOrReference() || Left.is(TT_TemplateCloser))) { in mustBreakBefore()
5829 Left.is(TT_LeadingJavaAnnotation) && in mustBreakBefore()
5869 if (Left.is(tok::at)) in mustBreakBefore()
5897 // If Left.ParameterCount is 0, then this submessage entry is not the in mustBreakBefore()
5899 // If Left.ParameterCount is greater than 0, then its parent submessage in mustBreakBefore()
5903 if (Left.ParameterCount == 0) in mustBreakBefore()
5906 // submessage, Left.ParameterCount might be 1 in some cases. in mustBreakBefore()
5913 // left---. .---right in mustBreakBefore()
5918 if (Left.isOneOf(tok::r_brace, tok::greater, tok::r_square)) in mustBreakBefore()
5927 const FormatToken &Left = *Right.Previous; in canBreakBefore() local
5930 if (Left.isOneOf(TT_CSharpNamedArgumentColon, TT_AttributeColon) || in canBreakBefore()
5936 return Left.is(TT_CSharpGenericTypeConstraintComma); in canBreakBefore()
5941 if (Left.isOneOf(Keywords.kw_throws, Keywords.kw_extends, in canBreakBefore()
5962 (Left.Tok.getIdentifierInfo() || in canBreakBefore()
5963 Left.isOneOf(tok::r_square, tok::r_paren)) && in canBreakBefore()
5971 if (Left.is(TT_FatArrow) && Right.is(tok::l_brace)) in canBreakBefore()
5973 if (Left.is(TT_JsTypeColon)) in canBreakBefore()
5976 if (Left.is(tok::exclaim) && Right.is(tok::colon)) in canBreakBefore()
5993 if (Left.is(Keywords.kw_in)) in canBreakBefore()
6005 if (Left.is(Keywords.kw_as)) in canBreakBefore()
6007 if (Left.is(TT_NonNullAssertion)) in canBreakBefore()
6009 if (Left.is(Keywords.kw_declare) && in canBreakBefore()
6018 if (Left.isOneOf(Keywords.kw_module, tok::kw_namespace) && in canBreakBefore()
6026 if (Left.is(tok::identifier) && Right.is(TT_TemplateString)) in canBreakBefore()
6028 if (Left.is(TT_TemplateString) && Left.opensScope()) in canBreakBefore()
6032 if (Keywords.isTableGenDefinition(Left)) in canBreakBefore()
6036 return !Left.isOneOf(TT_TableGenBangOperator, TT_TableGenCondOperator, in canBreakBefore()
6040 if (Left.is(TT_TableGenValueSuffix)) in canBreakBefore()
6043 if (Left.is(tok::hash) || Right.is(tok::hash)) in canBreakBefore()
6045 if (Left.isOneOf(TT_TableGenBangOperator, TT_TableGenCondOperator)) in canBreakBefore()
6049 if (Left.is(tok::at)) in canBreakBefore()
6051 if (Left.Tok.getObjCKeywordID() == tok::objc_interface) in canBreakBefore()
6053 if (Left.isOneOf(TT_JavaAnnotation, TT_LeadingJavaAnnotation)) in canBreakBefore()
6065 if (Left.is(TT_PointerOrReference)) in canBreakBefore()
6073 return Left.is(BK_BracedInit) || in canBreakBefore()
6074 (Left.is(TT_CtorInitializerColon) && Right.NewlinesBefore > 0 && in canBreakBefore()
6077 if (Left.is(tok::question) && Right.is(tok::colon)) in canBreakBefore()
6081 if (Left.is(TT_ConditionalExpr) || Left.is(tok::question)) in canBreakBefore()
6083 if (Left.is(TT_InheritanceColon)) in canBreakBefore()
6088 Left.isNot(TT_SelectorName)) { in canBreakBefore()
6096 if (Left.is(tok::colon) && Left.isOneOf(TT_DictLiteral, TT_ObjCMethodExpr)) { in canBreakBefore()
6138 return Left.isNot(tok::period); // FIXME: Properly parse ObjC calls. in canBreakBefore()
6140 if (Left.is(tok::r_paren) && Line.Type == LT_ObjCProperty) in canBreakBefore()
6146 if (Left.ClosesTemplateDeclaration) { in canBreakBefore()
6150 if (Left.is(TT_FunctionAnnotationRParen)) in canBreakBefore()
6152 if (Left.ClosesRequiresClause) in canBreakBefore()
6158 if (Left.is(TT_RangeBasedForLoopColon)) in canBreakBefore()
6162 if (Left.is(TT_TemplateCloser) && Right.is(TT_TemplateOpener)) in canBreakBefore()
6164 if ((Left.is(tok::greater) && Right.is(tok::greater)) || in canBreakBefore()
6165 (Left.is(tok::less) && Right.is(tok::less))) { in canBreakBefore()
6174 if (Left.isOneOf(TT_TemplateCloser, TT_UnaryOperator) || in canBreakBefore()
6175 Left.is(tok::kw_operator)) { in canBreakBefore()
6178 if (Left.is(tok::equal) && !Right.isOneOf(tok::kw_default, tok::kw_delete) && in canBreakBefore()
6179 Line.Type == LT_VirtualFunctionDecl && Left.NestingLevel == 0) { in canBreakBefore()
6182 if (Left.is(tok::equal) && Right.is(tok::l_brace) && in canBreakBefore()
6186 if (Left.is(TT_AttributeLParen) || in canBreakBefore()
6187 (Left.is(tok::l_paren) && Left.is(TT_TypeDeclarationParen))) { in canBreakBefore()
6190 if (Left.is(tok::l_paren) && Left.Previous && in canBreakBefore()
6191 (Left.Previous->isOneOf(TT_BinaryOperator, TT_CastRParen))) { in canBreakBefore()
6228 if (Left.is(TT_TrailingAnnotation)) { in canBreakBefore()
6237 return Left.isNot(TT_AttributeSquare); in canBreakBefore()
6239 if (Left.is(tok::identifier) && Right.is(tok::string_literal)) in canBreakBefore()
6245 if (Left.is(TT_CtorInitializerColon)) { in canBreakBefore()
6251 if (Left.is(TT_CtorInitializerComma) && in canBreakBefore()
6259 if (Left.is(TT_InheritanceComma) && in canBreakBefore()
6267 if (Left.is(TT_ArrayInitializerLSquare)) in canBreakBefore()
6269 if (Right.is(tok::kw_typename) && Left.isNot(tok::kw_const)) in canBreakBefore()
6271 if ((Left.isBinaryOperator() || Left.is(TT_BinaryOperator)) && in canBreakBefore()
6272 !Left.isOneOf(tok::arrowstar, tok::lessless) && in canBreakBefore()
6275 Left.getPrecedence() == prec::Assignment)) { in canBreakBefore()
6278 if ((Left.is(TT_AttributeSquare) && Right.is(tok::l_square)) || in canBreakBefore()
6279 (Left.is(tok::r_square) && Right.is(TT_AttributeSquare))) { in canBreakBefore()
6285 if (isAllmanLambdaBrace(Left)) in canBreakBefore()
6286 return !isItAnEmptyLambdaAllowed(Left, ShortLambdaOption); in canBreakBefore()
6302 return Left.isOneOf(tok::comma, tok::coloncolon, tok::semi, tok::l_brace, in canBreakBefore()
6307 (Left.is(tok::r_paren) && in canBreakBefore()
6309 (Left.is(tok::l_paren) && Right.isNot(tok::r_paren)) || in canBreakBefore()
6310 (Left.is(TT_TemplateOpener) && Right.isNot(TT_TemplateCloser)); in canBreakBefore()