Home | History | Annotate | Download | only in Format

Lines Matching defs:Left

43     FormatToken *Left = CurrentToken->Previous;
47 Left->MatchingParen = CurrentToken;
48 CurrentToken->MatchingParen = Left;
67 updateParameterCount(Left, CurrentToken);
84 FormatToken *Left = CurrentToken->Previous;
87 Left->Type = TT_ObjCBlockLParen;
88 } else if (FormatToken *MaybeSel = Left->Previous) {
96 if (Left->Previous && Left->Previous->is(tok::kw_static_assert))
101 Left->Type = TT_ObjCMethodExpr;
131 Left->Type = TT_FunctionTypeLParen;
132 Left->MatchingParen = CurrentToken;
133 CurrentToken->MatchingParen = Left;
144 Left->PackingKind = PPK_Inconclusive;
146 Left->PackingKind = PPK_BinPacked;
148 Left->PackingKind = PPK_OnePerLine;
159 updateParameterCount(Left, CurrentToken);
179 FormatToken *Left = CurrentToken->Previous;
180 FormatToken *Parent = Left->getPreviousNonComment();
194 Left->Type = TT_ObjCMethodExpr;
196 Left->Type = TT_ObjCArrayLiteral;
205 Left->Type = TT_Unknown;
217 Left->MatchingParen = CurrentToken;
218 CurrentToken->MatchingParen = Left;
227 updateParameterCount(Left, CurrentToken);
237 FormatToken *Left = CurrentToken->Previous;
239 FormatToken *Parent = Left->getPreviousNonComment();
243 Left->Type = TT_ObjCDictLiteral;
250 Left->MatchingParen = CurrentToken;
251 CurrentToken->MatchingParen = Left;
257 updateParameterCount(Left, CurrentToken);
267 void updateParameterCount(FormatToken *Left, FormatToken *Current) {
269 ++Left->ParameterCount;
270 } else if (Left->ParameterCount == 0 && Current->isNot(tok::comment)) {
271 Left->ParameterCount = 1;
442 // We still want to format the whitespace left of the first token of the
1026 const FormatToken &Left = *Tok.Previous;
1029 if (Left.is(tok::semi))
1031 if (Left.is(tok::comma))
1039 if (Left.Type == TT_StartOfName)
1047 if (Left.is(tok::equal) && Right.is(tok::l_brace))
1049 if (Left.Type == TT_CastRParen)
1051 if (Left.is(tok::coloncolon))
1053 if (Left.isOneOf(tok::kw_class, tok::kw_struct))
1056 if (Left.Type == TT_RangeBasedForLoopColon ||
1057 Left.Type == TT_InheritanceColon)
1062 if (Left.isOneOf(tok::r_paren, tok::r_square) && Left.MatchingParen &&
1063 Left.MatchingParen->ParameterCount > 0)
1069 if (Left.is(tok::r_paren) && Line.Type != LT_ObjCProperty &&
1075 if (Line.First->is(tok::kw_for) && Left.is(tok::equal))
1082 if (Left.is(tok::colon) && Left.Type == TT_ObjCMethodExpr)
1085 if (Left.is(tok::l_paren) && Line.MightBeFunctionDecl)
1087 if (Left.opensScope())
1088 return Left.ParameterCount > 1 ? prec::Comma : 20;
1091 if (Left.is(tok::string_literal)) {
1092 StringRef Content = Left.TokenText;
1100 if (Left.Type == TT_ConditionalExpr)
1102 prec::Level Level = Left.getPrecedence();
1111 const FormatToken &Left,
1114 return Left.is(tok::hash);
1115 if (Left.isOneOf(tok::hashhash, tok::hash))
1120 (Left.is(tok::kw_template) ||
1123 if (Left.is(tok::arrow) || Right.is(tok::arrow))
1125 if (Left.isOneOf(tok::exclaim, tok::tilde))
1127 if (Left.is(tok::at) &&
1132 if (Left.is(tok::coloncolon))
1135 return !Left.isOneOf(tok::identifier, tok::greater, tok::l_paren);
1136 if (Left.is(tok::less) || Right.isOneOf(tok::greater, tok::less))
1141 return Left.Tok.isLiteral() ||
1142 ((Left.Type != TT_PointerOrReference) && Left.isNot(tok::l_paren) &&
1144 if (Right.Type == TT_FunctionTypeLParen && Left.isNot(tok::l_paren) &&
1145 (Left.Type != TT_PointerOrReference || Style.PointerBindsToType))
1147 if (Left.Type == TT_PointerOrReference)
1151 Left.Previous &&
1152 !Left.Previous->isOneOf(tok::l_paren, tok::coloncolon));
1153 if (Right.is(tok::star) && Left.is(tok::l_paren))
1155 if (Left.is(tok::l_square))
1156 return Left.Type == TT_ObjCArrayLiteral && Right.isNot(tok::r_square);
1161 if (Left.is(tok::colon))
1162 return Left.Type != TT_ObjCMethodExpr;
1164 return Right.Type != TT_ObjCMethodExpr && !Left.is(tok::question);
1165 if (Left.is(tok::l_paren))
1168 if (Left.is(tok::r_paren) && Left.MatchingParen &&
1169 Left.MatchingParen->Previous &&
1170 Left.MatchingParen->Previous->is(tok::kw___attribute))
1173 Left.isOneOf(tok::kw_if, tok::kw_for, tok::kw_while, tok::kw_switch,
1177 if (Left.is(tok::at) && Right.Tok.getObjCKeywordID() != tok::objc_not_keyword)
1179 if (Left.is(tok::l_brace) && Right.is(tok::r_brace))
1181 if (Left.is(tok::l_brace) || Right.is(tok::r_brace))
1184 return !Left.isOneOf(tok::l_paren, tok::l_square, tok::at) &&
1185 (Left.isNot(tok::colon) || Left.Type != TT_ObjCMethodExpr);
1186 if (Left.isOneOf(tok::identifier, tok::greater, tok::r_square) &&
1189 if (Left.is(tok::period) || Right.is(tok::period))
1191 if (Left.Type == TT_BlockComment && Left.TokenText.endswith("=*/"))
1253 const FormatToken &Left = *Right.Previous;
1259 if (Left.is(tok::colon) &&
1260 (Left.Type == TT_ObjCDictLiteral || Left.Type == TT_ObjCMethodExpr))
1264 if (Left.is(tok::r_paren) && Line.Type == LT_ObjCProperty)
1266 if (Left.ClosesTemplateDeclaration)
1269 !(Right.is(tok::colon) && Left.is(tok::question))) ||
1275 if (Left.Type == TT_RangeBasedForLoopColon)
1279 if (Left.Type == TT_PointerOrReference || Left.Type == TT_TemplateCloser ||
1280 Left.Type == TT_UnaryOperator || Left.Type == TT_ConditionalExpr ||
1281 Left.isOneOf(tok::question, tok::kw_operator))
1283 if (Left.is(tok::equal) && Line.Type == LT_VirtualFunctionDecl)
1285 if (Left.Previous) {
1286 if (Left.is(tok::l_paren) && Right.is(tok::l_paren) &&
1287 Left.Previous->is(tok::kw___attribute))
1289 if (Left.is(tok::l_paren) && (Left.Previous->Type == TT_BinaryOperator ||
1290 Left.Previous->Type == TT_CastRParen))
1307 if (Left.is(tok::kw_const) && Left.Previous != NULL &&
1308 Left.Previous->is(tok::r_paren))
1314 if (Left.is(tok::identifier) && Right.is(tok::string_literal))
1317 if (Left.Type == TT_CtorInitializerComma &&
1322 return (Left.isBinaryOperator() && Left.isNot(tok::lessless) &&
1324 Left.isOneOf(tok::comma, tok::coloncolon, tok::semi, tok::l_brace,
1327 (Left.is(tok::r_paren) &&
1329 (Left.is(tok::l_paren) && !Right.is(tok::r_paren)) ||