Home | History | Annotate | Download | only in Parse

Lines Matching refs:tok

51   switch (Tok.getKind()) {
53 case tok::kw_asm:
55 case tok::kw_namespace:
58 case tok::kw_using:
60 case tok::kw_static_assert:
61 case tok::kw__Static_assert:
154 if (Tok.is(tok::kw_typeof))
157 if (Tok.is(tok::annot_cxxscope))
161 if (getLangOpts().ObjC1 && Tok.is(tok::less))
168 if (Tok.isNot(tok::l_paren)) {
181 if (Tok.isNot(tok::semi) && (!AllowForRangeDecl || Tok.isNot(tok::colon)))
212 if (Tok.is(tok::kw_asm) || Tok.is(tok::kw___attribute))
216 if (Tok.is(tok::l_paren)) {
219 if (!SkipUntil(tok::r_paren))
221 } else if (Tok.is(tok::equal) || isTokIdentifier_in()) {
239 if (Tok.isNot(tok::comma))
275 if (Tok.is(tok::kw_typeof))
280 if (getLangOpts().ObjC1 && Tok.is(tok::less))
283 assert(Tok.is(tok::l_paren) && "Expected '('");
295 if (Tok.is(tok::equal) ||
296 Tok.is(tok::kw_asm) || Tok.is(tok::kw___attribute))
298 else if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace))
352 if (Tok.is(tok::kw_typeof))
357 if (getLangOpts().ObjC1 && Tok.is(tok::less))
361 assert(Tok.is(tok::l_paren) && "Expected '('");
373 if (Context == TypeIdInParens && Tok.is(tok::r_paren)) {
381 (Tok.is(tok::greater) || Tok.is(tok::comma) ||
382 (getLangOpts().CPlusPlus11 && Tok.is(tok::greatergreater)))) {
432 if (Tok.is(tok::kw_alignas))
435 if (Tok.isNot(tok::l_square) || NextToken().isNot(tok::l_square))
451 bool IsAttribute = SkipUntil(tok::r_square, false);
452 IsAttribute &= Tok.is(tok::r_square);
474 bool IsAttribute = Tok.is(tok::r_square);
495 while (Tok.isNot(tok::r_square)) {
496 if (Tok.is(tok::comma)) {
512 if (Tok.is(tok::coloncolon)) {
521 if (Tok.is(tok::l_paren)) {
523 if (!SkipUntil(tok::r_paren, false)) {
529 if (Tok.is(tok::ellipsis))
532 if (Tok.isNot(tok::comma))
540 if (Tok.is(tok::r_square)) {
542 IsAttribute = Tok.is(tok::r_square);
616 if (Tok.is(tok::coloncolon) || Tok.is(tok::identifier))
620 if (Tok.is(tok::star) || Tok.is(tok::amp) || Tok.is(tok::caret) ||
621 Tok.is(tok::ampamp) ||
622 (Tok.is(tok::annot_cxxscope) && NextToken().is(tok::star))) {
625 while (Tok.is(tok::kw_const) ||
626 Tok.is(tok::kw_volatile) ||
627 Tok.is(tok::kw_restrict))
636 if (Tok.is(tok::ellipsis))
639 if ((Tok.is(tok::identifier) ||
640 (Tok.is(tok::annot_cxxscope) && NextToken().is(tok::identifier))) &&
643 if (Tok.is(tok::annot_cxxscope))
646 TentativelyDeclaredIdentifiers.push_back(Tok.getIdentifierInfo());
648 } else if (Tok.is(tok::l_paren)) {
651 (Tok.is(tok::r_paren) || // 'int()' is a function.
653 (Tok.is(tok::ellipsis) && NextToken().is(tok::r_paren)) ||
664 if (Tok.is(tok::kw___attribute) ||
665 Tok.is(tok::kw___declspec) ||
666 Tok.is(tok::kw___cdecl) ||
667 Tok.is(tok::kw___stdcall) ||
668 Tok.is(tok::kw___fastcall) ||
669 Tok.is(tok::kw___thiscall) ||
670 Tok.is(tok::kw___unaligned))
675 if (Tok.isNot(tok::r_paren))
687 if (Tok.is(tok::ellipsis))
690 if (Tok.is(tok::l_paren)) {
702 } else if (Tok.is(tok::l_square)) {
718 Parser::isExpressionOrTypeSpecifierSimple(tok::TokenKind Kind) {
721 case tok::numeric_constant:
722 case tok::char_constant:
723 case tok::wide_char_constant:
724 case tok::utf16_char_constant:
725 case tok::utf32_char_constant:
726 case tok::string_literal:
727 case tok::wide_string_literal:
728 case tok::utf8_string_literal:
729 case tok::utf16_string_literal:
730 case tok::utf32_string_literal:
731 case tok::l_square:
732 case tok::l_paren:
733 case tok::amp:
734 case tok::ampamp:
735 case tok::star:
736 case tok::plus:
737 case tok::plusplus:
738 case tok::minus:
739 case tok::minusminus:
740 case tok::tilde:
741 case tok::exclaim:
742 case tok::kw_sizeof:
743 case tok::kw___func__:
744 case tok::kw_const_cast:
745 case tok::kw_delete:
746 case tok::kw_dynamic_cast:
747 case tok::kw_false:
748 case tok::kw_new:
749 case tok::kw_operator:
750 case tok::kw_reinterpret_cast:
751 case tok::kw_static_cast:
752 case tok::kw_this:
753 case tok::kw_throw:
754 case tok::kw_true:
755 case tok::kw_typeid:
756 case tok::kw_alignof:
757 case tok::kw_noexcept:
758 case tok::kw_nullptr:
759 case tok::kw__Alignof:
760 case tok::kw___null:
761 case tok::kw___alignof:
762 case tok::kw___builtin_choose_expr:
763 case tok::kw___builtin_offsetof:
764 case tok::kw___builtin_types_compatible_p:
765 case tok::kw___builtin_va_arg:
766 case tok::kw___imag:
767 case tok::kw___real:
768 case tok::kw___FUNCTION__:
769 case tok::kw_L__FUNCTION__:
770 case tok::kw___PRETTY_FUNCTION__:
771 case tok::kw___has_nothrow_assign:
772 case tok::kw___has_nothrow_copy:
773 case tok::kw___has_nothrow_constructor:
774 case tok::kw___has_trivial_assign:
775 case tok::kw___has_trivial_copy:
776 case tok::kw___has_trivial_constructor:
777 case tok::kw___has_trivial_destructor:
778 case tok::kw___has_virtual_destructor:
779 case tok::kw___is_abstract:
780 case tok::kw___is_base_of:
781 case tok::kw___is_class:
782 case tok::kw___is_convertible_to:
783 case tok::kw___is_empty:
784 case tok::kw___is_enum:
785 case tok::kw___is_interface_class:
786 case tok::kw___is_final:
787 case tok::kw___is_literal:
788 case tok::kw___is_literal_type:
789 case tok::kw___is_pod:
790 case tok::kw___is_polymorphic:
791 case tok::kw___is_trivial:
792 case tok::kw___is_trivially_assignable:
793 case tok::kw___is_trivially_constructible:
794 case tok::kw___is_trivially_copyable:
795 case tok::kw___is_union:
796 case tok::kw___uuidof:
800 case tok::kw_char:
801 case tok::kw_const:
802 case tok::kw_double:
803 case tok::kw_enum:
804 case tok::kw_half:
805 case tok::kw_float:
806 case tok::kw_int:
807 case tok::kw_long:
808 case tok::kw___int64:
809 case tok::kw___int128:
810 case tok::kw_restrict:
811 case tok::kw_short:
812 case tok::kw_signed:
813 case tok::kw_struct:
814 case tok::kw_union:
815 case tok::kw_unsigned:
816 case tok::kw_void:
817 case tok::kw_volatile:
818 case tok::kw__Bool:
819 case tok::kw__Complex:
820 case tok::kw_class:
821 case tok::kw_typename:
822 case tok::kw_wchar_t:
823 case tok::kw_char16_t:
824 case tok::kw_char32_t:
825 case tok::kw___underlying_type:
826 case tok::kw_thread_local:
827 case tok::kw__Decimal32:
828 case tok::kw__Decimal64:
829 case tok::kw__Decimal128:
830 case tok::kw___thread:
831 case tok::kw_typeof:
832 case tok::kw___cdecl:
833 case tok::kw___stdcall:
834 case tok::kw___fastcall:
835 case tok::kw___thiscall:
836 case tok::kw___unaligned:
837 case tok::kw___vector:
838 case tok::kw___pixel:
839 case tok::kw__Atomic:
840 case tok::kw_image1d_t:
841 case tok::kw_image1d_array_t:
842 case tok::kw_image1d_buffer_t:
843 case tok::kw_image2d_t:
844 case tok::kw_image2d_array_t:
845 case tok::kw_image3d_t:
846 case tok::kw_sampler_t:
847 case tok::kw_event_t:
848 case tok::kw___unknown_anytype:
969 switch (Tok.getKind()) {
970 case tok::identifier: {
978 if (!getLangOpts().ObjC1 && Next.is(tok::identifier))
981 if (Next.isNot(tok::coloncolon) && Next.isNot(tok::less)) {
1003 assert(Tok.isNot(tok::identifier) &&
1015 if (Tok.is(tok::identifier))
1023 case tok::kw_typename: // typename T::type
1030 case tok::coloncolon: { // ::foo::bar
1032 if (Next.is(tok::kw_new) || // ::new
1033 Next.is(tok::kw_delete)) // ::delete
1037 case tok::kw_decltype:
1051 case tok::kw_friend:
1052 case tok::kw_typedef:
1053 case tok::kw_constexpr:
1055 case tok::kw_register:
1056 case tok::kw_static:
1057 case tok::kw_extern:
1058 case tok::kw_mutable:
1059 case tok::kw_auto:
1060 case tok::kw___thread:
1062 case tok::kw_inline:
1063 case tok::kw_virtual:
1064 case tok::kw_explicit:
1067 case tok::kw___module_private__:
1070 case tok::kw___unknown_anytype:
1082 case tok::kw_class:
1083 case tok::kw_struct:
1084 case tok::kw_union:
1086 case tok::kw_enum:
1088 case tok::kw_const:
1089 case tok::kw_volatile:
1092 case tok::kw_restrict:
1093 case tok::kw__Complex:
1094 case tok::kw___attribute:
1098 case tok::kw___declspec:
1099 case tok::kw___cdecl:
1100 case tok::kw___stdcall:
1101 case tok::kw___fastcall:
1102 case tok::kw___thiscall:
1103 case tok::kw___w64:
1104 case tok::kw___ptr64:
1105 case tok::kw___ptr32:
1106 case tok::kw___forceinline:
1107 case tok::kw___unaligned:
1111 case tok::kw___pascal:
1115 case tok::kw___vector:
1118 case tok::annot_template_id: {
1119 TemplateIdAnnotation *TemplateId = takeTemplateIdAnnotation(Tok);
1124 assert(Tok.is(tok::annot_typename));
1128 case tok::annot_cxxscope: // foo::bar or ::foo::bar, but already parsed
1132 if (!Tok.is(tok::annot_typename)) {
1135 if (Tok.is(tok::annot_cxxscope) && NextToken().is(tok::identifier)) {
1137 Actions.RestoreNestedNameSpecifierAnnotation(Tok.getAnnotationValue(),
1138 Tok.getAnnotationRange(),
1144 bool isIdentifier = Tok.is(tok::identifier);
1178 assert(Tok.isNot(tok::annot_cxxscope) ||
1179 NextToken().isNot(tok::identifier));
1207 case tok::annot_typename:
1210 if (getLangOpts().ObjC1 && NextToken().is(tok::less)) {
1216 bool isFollowedByParen = Tok.is(tok::l_paren);
1217 bool isFollowedByBrace = Tok.is(tok::l_brace);
1233 case tok::kw_char:
1234 case tok::kw_wchar_t:
1235 case tok::kw_char16_t:
1236 case tok::kw_char32_t:
1237 case tok::kw_bool:
1238 case tok::kw_short:
1239 case tok::kw_int:
1240 case tok::kw_long:
1241 case tok::kw___int64:
1242 case tok::kw___int128:
1243 case tok::kw_signed:
1244 case tok::kw_unsigned:
1245 case tok::kw_half:
1246 case tok::kw_float:
1247 case tok::kw_double:
1248 case tok::kw_void:
1249 case tok::annot_decltype:
1250 if (NextToken().is(tok::l_paren))
1259 if (getLangOpts().CPlusPlus11 && NextToken().is(tok::l_brace))
1268 case tok::kw_typeof: {
1269 if (NextToken().isNot(tok::l_paren))
1275 bool isFollowedByParen = Tok.is(tok::l_paren);
1276 bool isFollowedByBrace = Tok.is(tok::l_brace);
1293 case tok::kw___underlying_type:
1297 case tok::kw__Atomic:
1310 assert(Tok.is(tok::kw_typeof) && "Expected 'typeof'!");
1313 assert(Tok.is(tok::l_paren) && "Expected '('");
1316 if (!SkipUntil(tok::r_paren))
1325 assert(Tok.is(tok::less) && "Expected '<' for qualifier list");
1328 if (Tok.isNot(tok::identifier))
1332 if (Tok.is(tok::comma)) {
1337 if (Tok.is(tok::greater)) {
1353 if (Tok.is(tok::kw_typeof))
1356 if (Tok.is(tok::annot_cxxscope))
1360 if (getLangOpts().ObjC1 && Tok.is(tok::less))
1394 if (Tok.isNot(tok::r_paren))
1398 if (Next.is(tok::amp) || Next.is(tok::ampamp) ||
1399 Next.is(tok::kw_const) || Next.is(tok::kw_volatile) ||
1400 Next.is(tok::kw_throw) || Next.is(tok::kw_noexcept) ||
1401 Next.is(tok::l_square) || isCXX11VirtSpecifier(Next) ||
1402 Next.is(tok::l_brace) || Next.is(tok::kw_try) ||
1403 Next.is(tok::equal) || Next.is(tok::arrow))
1443 if (Tok.is(tok::r_paren))
1455 if (Tok.is(tok::ellipsis)) {
1457 if (Tok.is(tok::r_paren))
1485 if (Tok.is(tok::kw___attribute))
1488 if (Tok.is(tok::equal)) {
1491 if (!SkipUntil(tok::comma, tok::r_paren, true/*StopAtSemi*/,
1496 if (Tok.is(tok::ellipsis)) {
1498 if (Tok.is(tok::r_paren))
1504 if (Tok.isNot(tok::comma))
1529 if (TPR == TPResult::Ambiguous() && Tok.isNot(tok::r_paren))
1536 if (!SkipUntil(tok::r_paren))
1540 while (Tok.is(tok::kw_const) ||
1541 Tok.is(tok::kw_volatile) ||
1542 Tok.is(tok::kw_restrict) )
1546 if (Tok.is(tok::amp) || Tok.is(tok::ampamp))
1550 if (Tok.is(tok::kw_throw)) {
1552 if (Tok.isNot(tok::l_paren))
1557 if (!SkipUntil(tok::r_paren))
1560 if (Tok.is(tok::kw_noexcept)) {
1563 if (Tok.is(tok::l_paren)) {
1566 if (!SkipUntil(tok::r_paren))
1578 if (!SkipUntil(tok::r_square))