• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/clang/lib/Format/

Lines Matching refs:tok

221   tok::TokenKind ParentBracket = tok::unknown;
328 bool is(tok::TokenKind Kind) const { return Tok.is(Kind); }
333 bool is(tok::PPKeywordKind Kind) const {
347 return is(tok::kw_if) || endsSequence(tok::kw_constexpr, tok::kw_if) ||
348 (endsSequence(tok::identifier, tok::kw_if) && AllowConstexprMacro);
377 bool isStringLiteral() const { return tok::isStringLiteral(Tok.getKind()); }
379 bool isObjCAtKeyword(tok::ObjCKeywordKind Kind) const {
384 return isOneOf(tok::kw_public, tok::kw_protected, tok::kw_private) &&
385 (!ColonRequired || (Next && Next->is(tok::colon)));
392 return is(tok::at) && Next &&
393 (Next->isObjCAtKeyword(tok::objc_public) ||
394 Next->isObjCAtKeyword(tok::objc_protected) ||
395 Next->isObjCAtKeyword(tok::objc_package) ||
396 Next->isObjCAtKeyword(tok::objc_private));
404 if (is(TT_DictLiteral) && is(tok::less))
406 return isOneOf(tok::l_paren, tok::l_brace, tok::l_square,
414 if (is(TT_DictLiteral) && is(tok::greater))
416 return isOneOf(tok::r_paren, tok::r_brace, tok::r_square,
422 return isOneOf(tok::arrow, tok::period, tok::arrowstar) &&
429 case tok::plus:
430 case tok::plusplus:
431 case tok::minus:
432 case tok::minusminus:
433 case tok::exclaim:
434 case tok::tilde:
435 case tok::kw_sizeof:
436 case tok::kw_alignof:
449 return is(tok::comment) &&
457 case tok::kw_throw:
458 case tok::kw_typeid:
459 case tok::kw_return:
460 case tok::kw_sizeof:
461 case tok::kw_alignof:
462 case tok::kw_alignas:
463 case tok::kw_decltype:
464 case tok::kw_noexcept:
465 case tok::kw_static_assert:
466 case tok::kw___attribute:
476 if (!is(tok::string_literal))
505 while (Tok && Tok->is(tok::comment))
513 while (Tok && Tok->is(tok::comment))
522 if (is(tok::l_brace) && BlockKind == BK_BracedInit && Style.isCSharp())
527 (is(tok::l_brace) &&
530 (is(tok::less) && (Style.Language == FormatStyle::LK_Proto ||
537 if (!Style.isCpp() || isNot(tok::l_square))
542 } while (T && T->isOneOf(tok::kw_const, tok::kw_volatile, tok::amp,
543 tok::ampamp));
544 return T && T->is(tok::kw_auto);
558 if (is(tok::comment))
561 if (NamespaceTok && NamespaceTok->isOneOf(tok::kw_inline, tok::kw_export))
564 NamespaceTok->isOneOf(tok::kw_namespace, TT_NamespaceMacro)
576 if (is(tok::comment) && Next)
582 if (is(tok::comment) && Next)
588 if (is(tok::comment) && Previous)
595 if (is(tok::comment) && Previous)
928 case tok::kw_break:
929 case tok::kw_case:
930 case tok::kw_catch:
931 case tok::kw_class:
932 case tok::kw_continue:
933 case tok::kw_const:
934 case tok::kw_default:
935 case tok::kw_delete:
936 case tok::kw_do:
937 case tok::kw_else:
938 case tok::kw_enum:
939 case tok::kw_export:
940 case tok::kw_false:
941 case tok::kw_for:
942 case tok::kw_if:
943 case tok::kw_import:
944 case tok::kw_module:
945 case tok::kw_new:
946 case tok::kw_private:
947 case tok::kw_protected:
948 case tok::kw_public:
949 case tok::kw_return:
950 case tok::kw_static:
951 case tok::kw_switch:
952 case tok::kw_this:
953 case tok::kw_throw:
954 case tok::kw_true:
955 case tok::kw_try:
956 case tok::kw_typeof:
957 case tok::kw_void:
958 case tok::kw_while:
961 case tok::identifier: {
977 #define KEYWORD(X, Y) case tok::kw_##X:
992 case tok::kw_bool:
993 case tok::kw_break:
994 case tok::kw_case:
995 case tok::kw_catch:
996 case tok::kw_char:
997 case tok::kw_class:
998 case tok::kw_const:
999 case tok::kw_continue:
1000 case tok::kw_default:
1001 case tok::kw_do:
1002 case tok::kw_double:
1003 case tok::kw_else:
1004 case tok::kw_enum:
1005 case tok::kw_explicit:
1006 case tok::kw_extern:
1007 case tok::kw_false:
1008 case tok::kw_float:
1009 case tok::kw_for:
1010 case tok::kw_goto:
1011 case tok::kw_if:
1012 case tok::kw_int:
1013 case tok::kw_long:
1014 case tok::kw_namespace:
1015 case tok::kw_new:
1016 case tok::kw_operator:
1017 case tok::kw_private:
1018 case tok::kw_protected:
1019 case tok::kw_public:
1020 case tok::kw_return:
1021 case tok::kw_short:
1022 case tok::kw_sizeof:
1023 case tok::kw_static:
1024 case tok::kw_struct:
1025 case tok::kw_switch:
1026 case tok::kw_this:
1027 case tok::kw_throw:
1028 case tok::kw_true:
1029 case tok::kw_try:
1030 case tok::kw_typeof:
1031 case tok::kw_using:
1032 case tok::kw_virtual:
1033 case tok::kw_void:
1034 case tok::kw_volatile:
1035 case tok::kw_while:
1038 return Tok.is(tok::identifier) &&