Home | History | Annotate | Download | only in Format

Lines Matching defs:Right

148       // categorize it as an unary operator, so set the right type here.
937 // declarations. Thus, having an identifier on the right-hand side
1347 const FormatToken &Right = Tok;
1351 if (Left.is(tok::comma) || (Right.is(tok::identifier) && Right.Next &&
1352 Right.Next->Type == TT_DictLiteral))
1354 if (Right.is(tok::l_square)) {
1357 if (Right.Type != TT_ObjCMethodExpr && Right.Type != TT_LambdaLSquare)
1360 if (Right.Type == TT_StartOfName ||
1361 Right.Type == TT_FunctionDeclarationName || Right.is(tok::kw_operator)) {
1362 if (Line.First->is(tok::kw_for) && Right.PartOfMultiVariableDeclStmt)
1366 if (InFunctionDecl && Right.NestingLevel == 0)
1370 if (Left.is(tok::equal) && Right.is(tok::l_brace))
1375 (Right.is(tok::period) && Style.Language == FormatStyle::LK_Proto))
1384 if (Right.isMemberAccess()) {
1391 if (Right.Type == TT_TrailingAnnotation &&
1392 (!Right.Next || Right.Next->isNot(tok::l_paren))) {
1398 bool is_short_annotation = Right.TokenText.size() < 10;
1408 if (Right.Type == TT_SelectorName)
1421 if (Right.is(tok::lessless)) {
1447 const FormatToken &Right) {
1449 if (Right.is(tok::period) &&
1453 if (Right.is(tok::l_paren) &&
1460 if (Left.is(tok::kw_return) && Right.isNot(tok::semi))
1465 if (Right.is(tok::hashhash))
1468 return Right.is(tok::hash);
1469 if (Left.is(tok::l_paren) && Right.is(tok::r_paren))
1471 if (Left.is(tok::l_paren) || Right.is(tok::r_paren))
1472 return (Right.Type == TT_CastRParen ||
1477 ((Left.Type == TT_TemplateOpener) != (Right.Type == TT_TemplateCloser)))
1479 if (Right.isOneOf(tok::semi, tok::comma))
1481 if (Right.is(tok::less) &&
1485 if (Left.is(tok::arrow) || Right.is(tok::arrow))
1490 Right.isOneOf(tok::identifier, tok::string_literal, tok::char_constant,
1496 if (Right.is(tok::coloncolon) && Left.isNot(tok::l_brace))
1500 if (Left.is(tok::less) || Right.isOneOf(tok::greater, tok::less))
1502 if (Right.is(tok::ellipsis))
1504 if (Left.is(tok::l_square) && Right.is(tok::amp))
1506 if (Right.Type == TT_PointerOrReference)
1510 if (Right.Type == TT_FunctionTypeLParen && Left.isNot(tok::l_paren) &&
1514 return Right.Tok.isLiteral() || Right.Type == TT_BlockComment ||
1515 ((Right.Type != TT_PointerOrReference) &&
1516 Right.isNot(tok::l_paren) && Style.PointerAlignment != FormatStyle::PAS_Right &&
1519 if (Right.is(tok::star) && Left.is(tok::l_paren))
1523 Style.SpacesInContainerLiterals && Right.isNot(tok::r_square);
1524 if (Right.is(tok::r_square))
1525 return Right.MatchingParen && Style.SpacesInContainerLiterals &&
1526 Right.MatchingParen->Type == TT_ArrayInitializerLSquare;
1527 if (Right.is(tok::l_square) && Right.Type != TT_ObjCMethodExpr &&
1528 Right.Type != TT_LambdaLSquare && Left.isNot(tok::numeric_constant) &&
1535 if (Right.is(tok::l_paren)) {
1548 if (Left.is(tok::at) && Right.Tok.getObjCKeywordID() != tok::objc_not_keyword)
1550 if (Left.is(tok::l_brace) && Right.is(tok::r_brace))
1553 (Right.is(tok::r_brace) && Right.MatchingParen &&
1554 Right.MatchingParen->BlockKind != BK_Block))
1556 if (Right.Type == TT_UnaryOperator)
1562 Right.is(tok::l_brace) && Right.getNextNonComment() &&
1563 Right.BlockKind != BK_Block)
1565 if (Left.is(tok::period) || Right.is(tok::period))
1567 if (Right.is(tok::hash) && Left.is(tok::identifier) && Left.TokenText == "L")
1644 const FormatToken &Right) {
1645 const FormatToken &Left = *Right.Previous;
1646 if (Right.NewlinesBefore > 1)
1648 if (Right.is(tok::comment)) {
1649 return Right.Previous->BlockKind != BK_BracedInit &&
1650 Right.Previous->Type != TT_CtorInitializerColon &&
1651 (Right.NewlinesBefore > 0 && Right.HasUnescapedNewline);
1652 } else if (Right.Previous->isTrailingComment() ||
1653 (Right.isStringLiteral() && Right.Previous->isStringLiteral())) {
1655 } else if (Right.Previous->IsUnterminatedLiteral) {
1657 } else if (Right.is(tok::lessless) && Right.Next &&
1658 Right.Previous->is(tok::string_literal) &&
1659 Right.Next->is(tok::string_literal)) {
1661 } else if (Right.Previous->ClosesTemplateDeclaration &&
1662 Right.Previous->MatchingParen &&
1663 Right.Previous->MatchingParen->NestingLevel == 0 &&
1666 } else if ((Right.Type == TT_CtorInitializerComma ||
1667 Right.Type == TT_CtorInitializerColon) &&
1671 } else if (Right.is(tok::string_literal) &&
1672 Right.TokenText.startswith("R\"")) {
1676 return Right.NewlinesBefore > 0;
1677 } else if (Right.Previous->is(tok::l_brace) && Right.NestingLevel == 1 &&
1681 } else if (isAllmanBrace(Left) || isAllmanBrace(Right)) {
1692 else if (Right.is(tok::r_brace))
1693 BeforeClosingBrace = Right.Previous;
1700 if (Right.is(tok::char_constant) && Left.is(tok::plus) && Left.Previous &&
1709 const FormatToken &Right) {
1710 const FormatToken &Left = *Right.Previous;
1715 if (Right.Type == TT_StartOfName ||
1716 Right.Type == TT_FunctionDeclarationName || Right.is(tok::kw_operator))
1718 if (Right.isTrailingComment())
1725 if (Left.is(tok::question) && Right.is(tok::colon))
1727 if (Right.Type == TT_ConditionalExpr || Right.is(tok::question))
1731 if (Right.Type == TT_InheritanceColon)
1733 if (Right.is(tok::colon) && (Right.Type != TT_CtorInitializerColon &&
1734 Right.Type != TT_InlineASMColon))
1739 if (Right.Type == TT_SelectorName)
1745 if (Right.Type == TT_RangeBasedForLoopColon ||
1746 Right.Type == TT_OverloadedOperatorLParen ||
1747 Right.Type == TT_OverloadedOperator)
1751 if (Right.Type == TT_RangeBasedForLoopColon)
1764 if (Right.Type == TT_ImplicitStringLiteral)
1767 if (Right.is(tok::r_paren) || Right.Type == TT_TemplateCloser)
1772 if (Right.is(tok::r_brace))
1773 return Right.MatchingParen && Right.MatchingParen->BlockKind == BK_Block;
1778 return !Right.isOneOf(tok::l_brace, tok::semi, tok::equal, tok::l_paren,
1781 if (Right.is(tok::kw___attribute))
1784 if (Left.is(tok::identifier) && Right.is(tok::string_literal))
1787 if (Right.is(tok::identifier) && Right.Next &&
1788 Right.Next->Type == TT_DictLiteral)
1794 if (Right.Type == TT_CtorInitializerComma &&
1797 if (Left.is(tok::greater) && Right.is(tok::greater) &&
1800 if (Right.Type == TT_BinaryOperator && Style.BreakBeforeBinaryOperators)
1809 Right.isMemberAccess() ||
1810 Right.isOneOf(tok::lessless, tok::colon, tok::l_square, tok::at) ||
1812 Right.isOneOf(tok::identifier, tok::kw_const)) ||
1813 (Left.is(tok::l_paren) && !Right.is(tok::r_paren));