Home | History | Annotate | Download | only in Lex

Lines Matching defs:Tok

92   if (PeekTok.is(tok::l_paren)) {
98 if (PeekTok.is(tok::code_completion)) {
130 if (PeekTok.isNot(tok::r_paren)) {
132 << "'defined'" << tok::r_paren;
133 PP.Diag(LParenLoc, diag::note_matching) << tok::l_paren;
173 if (PeekTok.is(tok::code_completion)) {
193 II->getTokenID() != tok::kw_true &&
194 II->getTokenID() != tok::kw_false)
196 Result.Val = II->getTokenID() == tok::kw_true;
207 case tok::eod:
208 case tok::r_paren:
212 case tok::numeric_constant: {
272 case tok::char_constant: // 'x'
273 case tok::wide_char_constant: // L'x'
274 case tok::utf16_char_constant: // u'x'
275 case tok::utf32_char_constant: { // U'x'
326 case tok::l_paren: {
335 if (PeekTok.is(tok::r_paren)) {
342 if (PeekTok.isNot(tok::r_paren)) {
345 PP.Diag(Start, diag::note_matching) << tok::l_paren;
354 case tok::plus: {
362 case tok::minus: {
382 case tok::tilde: {
394 case tok::exclaim: {
421 static unsigned getPrecedence(tok::TokenKind Kind) {
424 case tok::percent:
425 case tok::slash:
426 case tok::star: return 14;
427 case tok::plus:
428 case tok::minus: return 13;
429 case tok::lessless:
430 case tok::greatergreater: return 12;
431 case tok::lessequal:
432 case tok::less:
433 case tok::greaterequal:
434 case tok::greater: return 11;
435 case tok::exclaimequal:
436 case tok::equalequal: return 10;
437 case tok::amp: return 9;
438 case tok::caret: return 8;
439 case tok::pipe: return 7;
440 case tok::ampamp: return 6;
441 case tok::pipepipe: return 5;
442 case tok::question: return 4;
443 case tok::comma: return 3;
444 case tok::colon: return 2;
445 case tok::r_paren: return 0;// Lowest priority, end of expr.
446 case tok::eod: return 0;// Lowest priority, end of directive.
474 tok::TokenKind Operator = PeekTok.getKind();
482 if (Operator == tok::ampamp && LHS.Val == 0)
484 else if (Operator == tok::pipepipe && LHS.Val != 0)
486 else if (Operator == tok::question && LHS.Val == 0)
523 if (Operator == tok::question)
525 RHSPrec = getPrecedence(tok::comma);
540 case tok::question: // No UAC for x and y in "x ? y : z".
541 case tok::lessless: // Shift amount doesn't UAC with shift value.
542 case tok::greatergreater: // Shift amount doesn't UAC with shift value.
543 case tok::comma: // Comma operands are not subject to UACs.
544 case tok::pipepipe: // Logical || does not do UACs.
545 case tok::ampamp: // Logical && does not do UACs.
570 case tok::percent:
579 case tok::slash:
592 case tok::star:
598 case tok::lessless: {
611 case tok::greatergreater: {
619 case tok::plus:
625 case tok::minus:
631 case tok::lessequal:
635 case tok::less:
639 case tok::greaterequal:
643 case tok::greater:
647 case tok::exclaimequal:
651 case tok::equalequal:
655 case tok::amp:
658 case tok::caret:
661 case tok::pipe:
664 case tok::ampamp:
668 case tok::pipepipe:
672 case tok::comma:
680 case tok::question: {
682 if (PeekTok.isNot(tok::colon)) {
684 << tok::colon << LHS.getRange() << RHS.getRange();
685 PP.Diag(OpLoc, diag::note_matching) << tok::question;
716 case tok::colon:
750 Token Tok;
751 LexNonComment(Tok);
758 if (EvaluateValue(ResVal, Tok, DT, true, *this)) {
760 if (Tok.isNot(tok::eod))
771 if (Tok.is(tok::eod)) {
784 if (EvaluateDirectiveSubExpr(ResVal, getPrecedence(tok::question),
785 Tok, true, *this)) {
787 if (Tok.isNot(tok::eod))
795 // If we aren't at the tok::eod token, something bad happened, like an extra
797 if (Tok.isNot(tok::eod)) {
798 Diag(Tok, diag::err_pp_expected_eol);