Lines Matching refs:tok

362   tok::TokenKind ParentBracket = tok::unknown;
442 bool is(tok::TokenKind Kind) const { return Tok.is(Kind); }
447 bool is(tok::PPKeywordKind Kind) const {
464 return is(tok::kw_if) || endsSequence(tok::kw_constexpr, tok::kw_if) ||
465 (endsSequence(tok::identifier, tok::kw_if) && AllowConstexprMacro);
494 bool isStringLiteral() const { return tok::isStringLiteral(Tok.getKind()); }
496 bool isObjCAtKeyword(tok::ObjCKeywordKind Kind) const {
501 return isOneOf(tok::kw_public, tok::kw_protected, tok::kw_private) &&
502 (!ColonRequired || (Next && Next->is(tok::colon)));
506 return isOneOf(tok::kw_const, tok::kw_restrict, tok::kw_volatile,
507 tok::kw___attribute, tok::kw__Nonnull, tok::kw__Nullable,
508 tok::kw__Null_unspecified, tok::kw___ptr32, tok::kw___ptr64,
516 return is(tok::at) && Next &&
517 (Next->isObjCAtKeyword(tok::objc_public) ||
518 Next->isObjCAtKeyword(tok::objc_protected) ||
519 Next->isObjCAtKeyword(tok::objc_package) ||
520 Next->isObjCAtKeyword(tok::objc_private));
528 if (is(TT_DictLiteral) && is(tok::less))
530 return isOneOf(tok::l_paren, tok::l_brace, tok::l_square,
538 if (is(TT_DictLiteral) && is(tok::greater))
540 return isOneOf(tok::r_paren, tok::r_brace, tok::r_square,
546 return isOneOf(tok::arrow, tok::period, tok::arrowstar) &&
553 case tok::plus:
554 case tok::plusplus:
555 case tok::minus:
556 case tok::minusminus:
557 case tok::exclaim:
558 case tok::tilde:
559 case tok::kw_sizeof:
560 case tok::kw_alignof:
573 return is(tok::comment) &&
581 case tok::kw_throw:
582 case tok::kw_typeid:
583 case tok::kw_return:
584 case tok::kw_sizeof:
585 case tok::kw_alignof:
586 case tok::kw_alignas:
587 case tok::kw_decltype:
588 case tok::kw_noexcept:
589 case tok::kw_static_assert:
590 case tok::kw__Atomic:
591 case tok::kw___attribute:
592 case tok::kw___underlying_type:
593 case tok::kw_requires:
603 if (!is(tok::string_literal))
632 while (Tok && Tok->is(tok::comment))
640 while (Tok && Tok->is(tok::comment))
649 if (is(tok::l_brace) && getBlockKind() == BK_BracedInit && Style.isCSharp())
654 (is(tok::l_brace) &&
657 (is(tok::less) && (Style.Language == FormatStyle::LK_Proto ||
664 if (!Style.isCpp() || isNot(tok::l_square))
669 } while (T && T->isOneOf(tok::kw_const, tok::kw_volatile, tok::amp,
670 tok::ampamp));
671 return T && T->is(tok::kw_auto);
685 if (is(tok::comment))
688 if (NamespaceTok && NamespaceTok->isOneOf(tok::kw_inline, tok::kw_export))
691 NamespaceTok->isOneOf(tok::kw_namespace, TT_NamespaceMacro)
705 if (is(tok::comment) && Next)
711 if (is(tok::comment) && Next)
717 if (is(tok::comment) && Previous)
724 if (is(tok::comment) && Previous)
1055 case tok::kw_break:
1056 case tok::kw_case:
1057 case tok::kw_catch:
1058 case tok::kw_class:
1059 case tok::kw_continue:
1060 case tok::kw_const:
1061 case tok::kw_default:
1062 case tok::kw_delete:
1063 case tok::kw_do:
1064 case tok::kw_else:
1065 case tok::kw_enum:
1066 case tok::kw_export:
1067 case tok::kw_false:
1068 case tok::kw_for:
1069 case tok::kw_if:
1070 case tok::kw_import:
1071 case tok::kw_module:
1072 case tok::kw_new:
1073 case tok::kw_private:
1074 case tok::kw_protected:
1075 case tok::kw_public:
1076 case tok::kw_return:
1077 case tok::kw_static:
1078 case tok::kw_switch:
1079 case tok::kw_this:
1080 case tok::kw_throw:
1081 case tok::kw_true:
1082 case tok::kw_try:
1083 case tok::kw_typeof:
1084 case tok::kw_void:
1085 case tok::kw_while:
1088 case tok::identifier: {
1104 #define KEYWORD(X, Y) case tok::kw_##X:
1119 case tok::kw_bool:
1120 case tok::kw_break:
1121 case tok::kw_case:
1122 case tok::kw_catch:
1123 case tok::kw_char:
1124 case tok::kw_class:
1125 case tok::kw_const:
1126 case tok::kw_continue:
1127 case tok::kw_default:
1128 case tok::kw_do:
1129 case tok::kw_double:
1130 case tok::kw_else:
1131 case tok::kw_enum:
1132 case tok::kw_explicit:
1133 case tok::kw_extern:
1134 case tok::kw_false:
1135 case tok::kw_float:
1136 case tok::kw_for:
1137 case tok::kw_goto:
1138 case tok::kw_if:
1139 case tok::kw_int:
1140 case tok::kw_long:
1141 case tok::kw_namespace:
1142 case tok::kw_new:
1143 case tok::kw_operator:
1144 case tok::kw_private:
1145 case tok::kw_protected:
1146 case tok::kw_public:
1147 case tok::kw_return:
1148 case tok::kw_short:
1149 case tok::kw_sizeof:
1150 case tok::kw_static:
1151 case tok::kw_struct:
1152 case tok::kw_switch:
1153 case tok::kw_this:
1154 case tok::kw_throw:
1155 case tok::kw_true:
1156 case tok::kw_try:
1157 case tok::kw_typeof:
1158 case tok::kw_using:
1159 case tok::kw_virtual:
1160 case tok::kw_void:
1161 case tok::kw_volatile:
1162 case tok::kw_while:
1165 return Tok.is(tok::identifier) &&