Lines Matching full:contexts
39 Contexts.push_back(Context(tok::unknown, 1, /*IsExpression=*/false)); in AnnotatingParser()
54 if (Previous.Previous->is(tok::r_paren) && Contexts.size() > 1 && in parseAngle()
61 Left->ParentBracket = Contexts.back().ContextKind; in parseAngle()
66 bool InExprContext = Contexts.back().IsExpression; in parseAngle()
68 Contexts.back().IsExpression = false; in parseAngle()
71 Contexts.back().InTemplateArgument = in parseAngle()
102 Contexts[Contexts.size() - 2].IsExpression && in parseAngle()
116 Left->ParentBracket = Contexts.back().ContextKind; in parseParens()
120 Contexts.back().ColonIsForRangeExpr = in parseParens()
121 Contexts.size() == 2 && Contexts[0].ColonIsForRangeExpr; in parseParens()
136 Contexts.back().IsExpression = false; in parseParens()
140 Contexts.back().IsExpression = false; in parseParens()
147 Contexts.back().IsExpression = true; in parseParens()
153 Contexts.back().IsExpression = false; in parseParens()
157 Contexts.back().IsExpression = false; in parseParens()
162 Contexts.back().IsExpression = false; in parseParens()
165 Contexts.back().IsExpression = true; in parseParens()
166 } else if (Contexts[Contexts.size() - 2].CaretFound) { in parseParens()
168 Contexts.back().IsExpression = false; in parseParens()
173 Contexts.back().IsForEachMacro = true; in parseParens()
174 Contexts.back().IsExpression = false; in parseParens()
177 Contexts.back().IsExpression = false; in parseParens()
181 Contexts.back().IsExpression = !IsForOrCatch; in parseParens()
185 Contexts.back().ColonIsObjCMethodExpr = true; in parseParens()
189 bool MightBeFunctionType = !Contexts[Contexts.size() - 2].IsExpression; in parseParens()
221 Contexts.back().IsExpression = true; in parseParens()
244 if (Contexts.back().FirstObjCSelectorName) { in parseParens()
245 Contexts.back().FirstObjCSelectorName->LongestObjCSelectorName = in parseParens()
246 Contexts.back().LongestObjCSelectorName; in parseParens()
278 Contexts.back().IsExpression = false; in parseParens()
286 Contexts.back().CanBeExpression = true; in parseParens()
306 Left->ParentBracket = Contexts.back().ContextKind; in parseSquare()
310 Contexts.back().CanBeExpression && Left->isNot(TT_LambdaLSquare) && in parseSquare()
325 Contexts.back().ContextKind == tok::l_brace && in parseSquare()
343 Contexts.back().IsExpression = true; in parseSquare()
344 Contexts.back().ColonIsObjCMethodExpr = StartsObjCMethodExpr; in parseSquare()
365 if (Contexts.back().FirstObjCSelectorName) { in parseSquare()
366 Contexts.back().FirstObjCSelectorName->LongestObjCSelectorName = in parseSquare()
367 Contexts.back().LongestObjCSelectorName; in parseSquare()
369 Contexts.back().FirstObjCSelectorName->LongestObjCSelectorName = 0; in parseSquare()
380 Contexts.back().ColonIsObjCMethodExpr = true; in parseSquare()
400 Left->ParentBracket = Contexts.back().ContextKind; in parseBrace()
402 if (Contexts.back().CaretFound) in parseBrace()
404 Contexts.back().CaretFound = false; in parseBrace()
407 Contexts.back().ColonIsDictLiteral = true; in parseBrace()
409 Contexts.back().IsExpression = true; in parseBrace()
424 (!Contexts.back().ColonIsDictLiteral || in parseBrace()
494 if (Contexts.back().ColonIsForRangeExpr || // colon in for loop in consumeToken()
495 (Contexts.size() == 1 && // switch/case labels in consumeToken()
497 Contexts.back().ContextKind == tok::l_paren || // function params in consumeToken()
498 Contexts.back().ContextKind == tok::l_square || // array type in consumeToken()
499 (Contexts.size() == 1 && in consumeToken()
505 if (Contexts.back().ColonIsDictLiteral || in consumeToken()
508 } else if (Contexts.back().ColonIsObjCMethodExpr || in consumeToken()
513 Contexts.back().LongestObjCSelectorName) in consumeToken()
514 Contexts.back().LongestObjCSelectorName = Tok->Previous->ColumnWidth; in consumeToken()
515 if (!Contexts.back().FirstObjCSelectorName) in consumeToken()
516 Contexts.back().FirstObjCSelectorName = Tok->Previous; in consumeToken()
517 } else if (Contexts.back().ColonIsForRangeExpr) { in consumeToken()
521 } else if (Contexts.size() == 1 && in consumeToken()
532 } else if (Contexts.back().ContextKind == tok::l_paren) { in consumeToken()
541 !Contexts.back().IsExpression) in consumeToken()
556 Contexts.back().ColonIsForRangeExpr = true; in consumeToken()
577 if (Line.MustBeDeclaration && Contexts.size() == 1 && in consumeToken()
578 !Contexts.back().IsExpression && !Line.startsWith(TT_ObjCProperty) && in consumeToken()
642 if (Line.MustBeDeclaration && !Contexts.back().IsExpression && in consumeToken()
651 if (Contexts.back().InCtorInitializer) in consumeToken()
653 else if (Contexts.back().FirstStartOfName && in consumeToken()
654 (Contexts.size() == 1 || Line.startsWith(tok::kw_for))) { in consumeToken()
655 Contexts.back().FirstStartOfName->PartOfMultiVariableDeclStmt = true; in consumeToken()
658 if (Contexts.back().IsForEachMacro) in consumeToken()
659 Contexts.back().IsExpression = true; in consumeToken()
748 Contexts.back().IsExpression = true; in parsePreprocessorDirective()
830 if (Contexts.back().FirstObjCSelectorName) in parseLine()
831 Contexts.back().FirstObjCSelectorName->LongestObjCSelectorName = in parseLine()
832 Contexts.back().LongestObjCSelectorName; in parseLine()
871 CurrentToken->NestingLevel = Contexts.size() - 1; in next()
872 CurrentToken->BindingStrength = Contexts.back().BindingStrength; in next()
905 /// \brief Puts a new \c Context onto the stack \c Contexts for the lifetime
913 P.Contexts.push_back(Context(ContextKind, in ScopedContextCreator()
914 P.Contexts.back().BindingStrength + Increase, in ScopedContextCreator()
915 P.Contexts.back().IsExpression)); in ScopedContextCreator()
918 ~ScopedContextCreator() { P.Contexts.pop_back(); } in ~ScopedContextCreator()
928 Contexts.back().IsExpression = true; in modifyContext()
949 Contexts.back().IsExpression = true; in modifyContext()
951 Contexts.back().IsExpression = true; in modifyContext()
953 Contexts.back().IsExpression = false; in modifyContext()
955 Contexts.back().IsExpression = Style.Language == FormatStyle::LK_Java; in modifyContext()
958 Contexts.back().IsExpression = true; in modifyContext()
959 Contexts.back().InCtorInitializer = true; in modifyContext()
965 if (Line.MustBeDeclaration && !Contexts.front().InCtorInitializer) in modifyContext()
966 Contexts.back().IsExpression = false; in modifyContext()
968 Contexts.back().CanBeExpression = false; in modifyContext()
971 Contexts.back().IsExpression = true; in modifyContext()
987 Contexts.back().FirstStartOfName = &Current; in determineTokenType()
999 determineStarAmpUsage(Current, Contexts.back().CanBeExpression && in determineTokenType()
1000 Contexts.back().IsExpression, in determineTokenType()
1001 Contexts.back().InTemplateArgument); in determineTokenType()
1005 Contexts.back().CaretFound = true; in determineTokenType()
1012 Line.MustBeDeclaration && !Contexts.back().IsExpression) { in determineTokenType()
1076 Line.MightBeFunctionDecl && Contexts.size() == 1) { in determineTokenType()
1298 if (IsExpression && !Contexts.back().CaretFound) in determineStarAmpUsage()
1334 SmallVector<Context, 8> Contexts; member in clang::format::__anon7c513deb0111::AnnotatingParser