Lines Matching refs:Toks

114     CachedTokens Toks;
115 LexTemplateFunctionForLateParsing(Toks);
120 Actions.MarkAsLateParsedTemplate(FD, FnD, Toks);
131 CachedTokens &Toks = LM->Toks;
136 if (ConsumeAndStoreFunctionPrologue(Toks)) {
148 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false);
154 ConsumeAndStoreUntil(tok::l_brace, Toks, /*StopAtSemi=*/false);
155 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false);
195 CachedTokens &Toks = MI->Toks;
199 Toks.push_back(Tok);
205 Toks.push_back(Tok);
209 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/true);
212 ConsumeAndStoreInitializer(Toks, CIK_DefaultInitializer);
221 Toks.push_back(Eof);
312 if (CachedTokens *Toks = LM.DefaultArgs[I].Toks) {
317 Toks->push_back(Tok); // So that the current token doesn't get lost
318 PP.EnterTokenStream(&Toks->front(), Toks->size(), true, false);
346 assert(Toks->size() >= 3 && "expected a token in default arg");
349 (*Toks)[Toks->size() - 3].getLocation());
363 delete Toks;
364 LM.DefaultArgs[I].Toks = nullptr;
405 assert(!LM.Toks.empty() && "Empty body!");
408 LM.Toks.push_back(Tok);
409 PP.EnterTokenStream(LM.Toks.data(), LM.Toks.size(), true, false);
524 MI.Toks.push_back(Tok);
525 PP.EnterTokenStream(MI.Toks.data(), MI.Toks.size(), true, false);
562 CachedTokens &Toks,
571 Toks.push_back(Tok);
587 Toks.push_back(Tok);
589 ConsumeAndStoreUntil(tok::r_paren, Toks, /*StopAtSemi=*/false);
593 Toks.push_back(Tok);
595 ConsumeAndStoreUntil(tok::r_square, Toks, /*StopAtSemi=*/false);
599 Toks.push_back(Tok);
601 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false);
612 Toks.push_back(Tok);
618 Toks.push_back(Tok);
624 Toks.push_back(Tok);
629 Toks.push_back(Tok);
638 Toks.push_back(Tok);
647 Toks.push_back(Tok);
661 bool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens &Toks) {
663 Toks.push_back(Tok);
673 ConsumeAndStoreUntil(tok::l_brace, tok::r_brace, Toks,
679 Toks.push_back(Tok);
684 Toks.push_back(Tok);
702 Toks.push_back(Tok);
707 Toks.push_back(Tok);
709 if (!ConsumeAndStoreUntil(tok::r_paren, Toks, /*StopAtSemi=*/true)) {
718 Toks.push_back(Tok);
722 Toks.push_back(Tok);
728 Toks.push_back(Tok);
731 Toks.push_back(Tok);
753 if (!ConsumeAndStoreUntil(tok::l_paren, tok::l_brace, Toks,
770 Toks.push_back(Tok);
789 if (!ConsumeAndStoreUntil(CloseKind, Toks, /*StopAtSemi=*/true)) {
797 Toks.push_back(Tok);
804 Toks.push_back(Tok);
821 Toks.push_back(Tok);
833 bool Parser::ConsumeAndStoreConditional(CachedTokens &Toks) {
836 Toks.push_back(Tok);
840 if (!ConsumeAndStoreUntil(tok::question, tok::colon, Toks,
846 if (Tok.is(tok::question) && !ConsumeAndStoreConditional(Toks))
851 Toks.push_back(Tok);
865 Self.ConsumeAndStoreUntil(EndKind, Toks, true, /*ConsumeFinalToken*/false);
874 if (Toks.size()) {
875 Token *Buffer = new Token[Toks.size()];
876 std::copy(Toks.begin() + 1, Toks.end(), Buffer);
877 Buffer[Toks.size() - 1] = Self.Tok;
878 Self.PP.EnterTokenStream(Buffer, Toks.size(), true, /*Owned*/true);
880 Self.Tok = Toks.front();
886 CachedTokens Toks;
894 bool Parser::ConsumeAndStoreInitializer(CachedTokens &Toks,
985 if (!ConsumeAndStoreConditional(Toks))
1010 Toks.push_back(Tok);
1013 Toks.push_back(Tok);
1017 Toks.push_back(Tok);
1026 Toks.push_back(Tok);
1034 Toks.push_back(Tok);
1044 Toks.push_back(Tok);
1046 ConsumeAndStoreUntil(tok::r_paren, Toks, /*StopAtSemi=*/false);
1050 Toks.push_back(Tok);
1052 ConsumeAndStoreUntil(tok::r_square, Toks, /*StopAtSemi=*/false);
1056 Toks.push_back(Tok);
1058 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false);
1082 Toks.push_back(Tok);
1091 Toks.push_back(Tok);
1100 Toks.push_back(Tok);