Lines Matching refs:Tok
371 Token Tok;
372 L.LexFromRawLexer(Tok);
374 while (Tok.isNot(tok::eof)) {
377 unsigned TokOffs = SM.getFileOffset(Tok.getLocation());
378 unsigned TokLen = Tok.getLength();
379 switch (Tok.getKind()) {
381 case tok::identifier:
382 llvm_unreachable("tok::identifier in raw lexing mode!");
383 case tok::raw_identifier: {
386 PP.LookUpIdentifierInfo(Tok);
389 if (Tok.isNot(tok::identifier))
394 case tok::comment:
398 case tok::utf8_string_literal:
403 case tok::wide_string_literal:
404 case tok::utf16_string_literal:
405 case tok::utf32_string_literal:
410 case tok::string_literal:
415 case tok::hash: {
417 if (!Tok.isAtStartOfLine())
423 L.LexFromRawLexer(Tok);
424 while (!Tok.isAtStartOfLine() && Tok.isNot(tok::eof)) {
425 TokEnd = SM.getFileOffset(Tok.getLocation())+Tok.getLength();
426 L.LexFromRawLexer(Tok);
438 L.LexFromRawLexer(Tok);
457 Token Tok;
458 L.LexFromRawLexer(Tok);
463 if (Tok.is(tok::hash) && Tok.isAtStartOfLine())
468 if (Tok.is(tok::hashhash))
469 Tok.setKind(tok::unknown);
474 if (Tok.is(tok::raw_identifier))
475 PP.LookUpIdentifierInfo(Tok);
477 TokenStream.push_back(Tok);
479 if (Tok.is(tok::eof)) break;
510 Token Tok;
511 TmpPP.Lex(Tok);
512 while (Tok.isNot(tok::eof)) {
514 if (!Tok.getLocation().isMacroID()) {
515 TmpPP.Lex(Tok);
523 SM.getExpansionRange(Tok.getLocation());
527 TmpPP.Lex(Tok);
534 std::string Expansion = EscapeText(TmpPP.getSpelling(Tok));
538 Token PrevTok = Tok;
540 TmpPP.Lex(Tok);
545 while (!Tok.is(tok::eof) &&
546 SM.getExpansionLoc(Tok.getLocation()) == LLoc.first) {
557 if (Tok.hasLeadingSpace() ||
558 ConcatInfo.AvoidConcat(PrevPrevTok, PrevTok, Tok))
562 Expansion += EscapeText(TmpPP.getSpelling(Tok));
566 PrevTok = Tok;
567 TmpPP.Lex(Tok);