Lines Matching refs:tok
29 assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try, tok::equal) && in ParseCXXInlineMethodDef()
57 if (TryConsumeToken(tok::equal)) { in ParseCXXInlineMethodDef()
59 SkipUntil(tok::semi); in ParseCXXInlineMethodDef()
66 if (TryConsumeToken(tok::kw_delete, KWLoc)) { in ParseCXXInlineMethodDef()
76 } else if (TryConsumeToken(tok::kw_default, KWLoc)) { in ParseCXXInlineMethodDef()
89 if (Tok.is(tok::comma)) { in ParseCXXInlineMethodDef()
92 SkipUntil(tok::semi); in ParseCXXInlineMethodDef()
93 } else if (ExpectAndConsume(tok::semi, diag::err_expected_after, in ParseCXXInlineMethodDef()
95 SkipUntil(tok::semi); in ParseCXXInlineMethodDef()
138 tok::TokenKind kind = Tok.getKind(); in ParseCXXInlineMethodDef()
149 return Tok.is(tok::code_completion); in ParseCXXInlineMethodDef()
167 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in ParseCXXInlineMethodDef()
171 if (kind == tok::kw_try) { in ParseCXXInlineMethodDef()
172 while (Tok.is(tok::kw_catch)) { in ParseCXXInlineMethodDef()
173 ConsumeAndStoreUntil(tok::l_brace, Toks, /*StopAtSemi=*/false); in ParseCXXInlineMethodDef()
174 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in ParseCXXInlineMethodDef()
199 assert(Tok.isOneOf(tok::l_brace, tok::equal) && in ParseCXXNonStaticMemberInitializer()
207 tok::TokenKind kind = Tok.getKind(); in ParseCXXNonStaticMemberInitializer()
208 if (kind == tok::equal) { in ParseCXXNonStaticMemberInitializer()
213 if (kind == tok::l_brace) { in ParseCXXNonStaticMemberInitializer()
219 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/true); in ParseCXXNonStaticMemberInitializer()
229 Eof.setKind(tok::eof); in ParseCXXNonStaticMemberInitializer()
368 DefArgEnd.setKind(tok::eof); in ParseLexedMethodDeclaration()
381 assert(Tok.is(tok::equal) && "Default argument not starting with '='"); in ParseLexedMethodDeclaration()
391 if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) { in ParseLexedMethodDeclaration()
400 if (Tok.isNot(tok::eof) || Tok.getEofData() != Param) { in ParseLexedMethodDeclaration()
415 while (Tok.isNot(tok::eof)) in ParseLexedMethodDeclaration()
418 if (Tok.is(tok::eof) && Tok.getEofData() == Param) in ParseLexedMethodDeclaration()
448 ExceptionSpecEnd.setKind(tok::eof); in ParseLexedMethodDeclaration()
491 if (Tok.isNot(tok::eof) || Tok.getEofData() != LM.Method) in ParseLexedMethodDeclaration()
504 while (Tok.isNot(tok::eof)) in ParseLexedMethodDeclaration()
508 if (Tok.is(tok::eof) && Tok.getEofData() == LM.Method) in ParseLexedMethodDeclaration()
541 BodyEnd.setKind(tok::eof); in ParseLexedMethodDef()
552 assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try) in ParseLexedMethodDef()
561 if (Tok.is(tok::kw_try)) { in ParseLexedMethodDef()
564 while (Tok.isNot(tok::eof)) in ParseLexedMethodDef()
567 if (Tok.is(tok::eof) && Tok.getEofData() == LM.D) in ParseLexedMethodDef()
571 if (Tok.is(tok::colon)) { in ParseLexedMethodDef()
575 if (!Tok.is(tok::l_brace)) { in ParseLexedMethodDef()
579 while (Tok.isNot(tok::eof)) in ParseLexedMethodDef()
582 if (Tok.is(tok::eof) && Tok.getEofData() == LM.D) in ParseLexedMethodDef()
598 while (Tok.isNot(tok::eof)) in ParseLexedMethodDef()
601 if (Tok.is(tok::eof) && Tok.getEofData() == LM.D) in ParseLexedMethodDef()
658 if (Tok.isNot(tok::eof)) { in ParseLexedMemberInitializer()
668 while (Tok.isNot(tok::eof)) in ParseLexedMemberInitializer()
710 AttrEnd.setKind(tok::eof); in ParseLexedAttribute()
772 while (Tok.isNot(tok::eof)) in ParseLexedAttribute()
775 if (Tok.is(tok::eof) && Tok.getEofData() == AttrEnd.getEofData()) in ParseLexedAttribute()
795 case tok::annot_attr_openmp: in ParseLexedPragma()
796 case tok::annot_pragma_openmp: { in ParseLexedPragma()
813 bool Parser::ConsumeAndStoreUntil(tok::TokenKind T1, tok::TokenKind T2, in ConsumeAndStoreUntil()
830 case tok::eof: in ConsumeAndStoreUntil()
831 case tok::annot_module_begin: in ConsumeAndStoreUntil()
832 case tok::annot_module_end: in ConsumeAndStoreUntil()
833 case tok::annot_module_include: in ConsumeAndStoreUntil()
837 case tok::l_paren: in ConsumeAndStoreUntil()
841 ConsumeAndStoreUntil(tok::r_paren, Toks, /*StopAtSemi=*/false); in ConsumeAndStoreUntil()
843 case tok::l_square: in ConsumeAndStoreUntil()
847 ConsumeAndStoreUntil(tok::r_square, Toks, /*StopAtSemi=*/false); in ConsumeAndStoreUntil()
849 case tok::l_brace: in ConsumeAndStoreUntil()
853 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in ConsumeAndStoreUntil()
861 case tok::r_paren: in ConsumeAndStoreUntil()
867 case tok::r_square: in ConsumeAndStoreUntil()
873 case tok::r_brace: in ConsumeAndStoreUntil()
880 case tok::semi: in ConsumeAndStoreUntil()
901 if (Tok.is(tok::kw_try)) { in ConsumeAndStoreFunctionPrologue()
906 if (Tok.isNot(tok::colon)) { in ConsumeAndStoreFunctionPrologue()
912 ConsumeAndStoreUntil(tok::l_brace, tok::r_brace, Toks, in ConsumeAndStoreFunctionPrologue()
915 if (Tok.isNot(tok::l_brace)) in ConsumeAndStoreFunctionPrologue()
916 return Diag(Tok.getLocation(), diag::err_expected) << tok::l_brace; in ConsumeAndStoreFunctionPrologue()
940 if (Tok.is(tok::kw_decltype)) { in ConsumeAndStoreFunctionPrologue()
943 if (Tok.isNot(tok::l_paren)) in ConsumeAndStoreFunctionPrologue()
948 if (!ConsumeAndStoreUntil(tok::r_paren, Toks, /*StopAtSemi=*/true)) { in ConsumeAndStoreFunctionPrologue()
949 Diag(Tok.getLocation(), diag::err_expected) << tok::r_paren; in ConsumeAndStoreFunctionPrologue()
950 Diag(OpenLoc, diag::note_matching) << tok::l_paren; in ConsumeAndStoreFunctionPrologue()
956 if (Tok.is(tok::coloncolon)) { in ConsumeAndStoreFunctionPrologue()
960 if (Tok.is(tok::kw_template)) { in ConsumeAndStoreFunctionPrologue()
966 if (Tok.is(tok::identifier)) { in ConsumeAndStoreFunctionPrologue()
972 } while (Tok.is(tok::coloncolon)); in ConsumeAndStoreFunctionPrologue()
974 if (Tok.is(tok::code_completion)) { in ConsumeAndStoreFunctionPrologue()
977 if (Tok.isOneOf(tok::identifier, tok::coloncolon, tok::kw_decltype)) { in ConsumeAndStoreFunctionPrologue()
984 if (Tok.is(tok::comma)) { in ConsumeAndStoreFunctionPrologue()
990 if (Tok.is(tok::less)) in ConsumeAndStoreFunctionPrologue()
1000 if (!ConsumeAndStoreUntil(tok::l_paren, tok::l_brace, Toks, in ConsumeAndStoreFunctionPrologue()
1005 return Diag(Tok.getLocation(), diag::err_expected) << tok::l_brace; in ConsumeAndStoreFunctionPrologue()
1007 } else if (Tok.isNot(tok::l_paren) && Tok.isNot(tok::l_brace)) { in ConsumeAndStoreFunctionPrologue()
1011 << tok::l_paren << tok::l_brace; in ConsumeAndStoreFunctionPrologue()
1013 return Diag(Tok.getLocation(), diag::err_expected) << tok::l_paren; in ConsumeAndStoreFunctionPrologue()
1016 tok::TokenKind kind = Tok.getKind(); in ConsumeAndStoreFunctionPrologue()
1018 bool IsLParen = (kind == tok::l_paren); in ConsumeAndStoreFunctionPrologue()
1024 assert(kind == tok::l_brace && "Must be left paren or brace here."); in ConsumeAndStoreFunctionPrologue()
1033 !PreviousToken.isOneOf(tok::identifier, tok::greater, in ConsumeAndStoreFunctionPrologue()
1034 tok::greatergreater)) { in ConsumeAndStoreFunctionPrologue()
1041 if (SkipUntil(tok::r_brace) && in ConsumeAndStoreFunctionPrologue()
1042 !Tok.isOneOf(tok::comma, tok::ellipsis, tok::l_brace)) { in ConsumeAndStoreFunctionPrologue()
1055 tok::TokenKind CloseKind = IsLParen ? tok::r_paren : tok::r_brace; in ConsumeAndStoreFunctionPrologue()
1063 if (Tok.is(tok::ellipsis)) { in ConsumeAndStoreFunctionPrologue()
1070 if (Tok.is(tok::comma)) { in ConsumeAndStoreFunctionPrologue()
1073 } else if (Tok.is(tok::l_brace)) { in ConsumeAndStoreFunctionPrologue()
1092 return Diag(Tok.getLocation(), diag::err_expected_either) << tok::l_brace in ConsumeAndStoreFunctionPrologue()
1093 << tok::comma; in ConsumeAndStoreFunctionPrologue()
1102 assert(Tok.is(tok::question)); in ConsumeAndStoreConditional()
1106 while (Tok.isNot(tok::colon)) { in ConsumeAndStoreConditional()
1107 if (!ConsumeAndStoreUntil(tok::question, tok::colon, Toks, in ConsumeAndStoreConditional()
1113 if (Tok.is(tok::question) && !ConsumeAndStoreConditional(Toks)) in ConsumeAndStoreConditional()
1127 tok::TokenKind EndKind) in UnannotatedTentativeParsingAction()
1155 tok::TokenKind EndKind;
1177 case tok::comma: in ConsumeAndStoreInitializer()
1197 ? tok::semi : tok::r_paren); in ConsumeAndStoreInitializer()
1207 if (Result == TPResult::Ambiguous && Tok.isNot(tok::semi)) in ConsumeAndStoreInitializer()
1236 case tok::eof: in ConsumeAndStoreInitializer()
1237 case tok::annot_module_begin: in ConsumeAndStoreInitializer()
1238 case tok::annot_module_end: in ConsumeAndStoreInitializer()
1239 case tok::annot_module_include: in ConsumeAndStoreInitializer()
1243 case tok::less: in ConsumeAndStoreInitializer()
1249 case tok::question: in ConsumeAndStoreInitializer()
1256 case tok::greatergreatergreater: in ConsumeAndStoreInitializer()
1262 case tok::greatergreater: in ConsumeAndStoreInitializer()
1268 case tok::greater: in ConsumeAndStoreInitializer()
1273 case tok::kw_template: in ConsumeAndStoreInitializer()
1279 if (Tok.is(tok::identifier)) { in ConsumeAndStoreInitializer()
1282 if (Tok.is(tok::less)) { in ConsumeAndStoreInitializer()
1291 case tok::kw_operator: in ConsumeAndStoreInitializer()
1297 case tok::comma: in ConsumeAndStoreInitializer()
1298 case tok::greatergreatergreater: in ConsumeAndStoreInitializer()
1299 case tok::greatergreater: in ConsumeAndStoreInitializer()
1300 case tok::greater: in ConsumeAndStoreInitializer()
1301 case tok::less: in ConsumeAndStoreInitializer()
1310 case tok::l_paren: in ConsumeAndStoreInitializer()
1314 ConsumeAndStoreUntil(tok::r_paren, Toks, /*StopAtSemi=*/false); in ConsumeAndStoreInitializer()
1316 case tok::l_square: in ConsumeAndStoreInitializer()
1320 ConsumeAndStoreUntil(tok::r_square, Toks, /*StopAtSemi=*/false); in ConsumeAndStoreInitializer()
1322 case tok::l_brace: in ConsumeAndStoreInitializer()
1326 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in ConsumeAndStoreInitializer()
1335 case tok::r_paren: in ConsumeAndStoreInitializer()
1343 case tok::r_square: in ConsumeAndStoreInitializer()
1349 case tok::r_brace: in ConsumeAndStoreInitializer()
1356 case tok::code_completion: in ConsumeAndStoreInitializer()
1361 case tok::string_literal: in ConsumeAndStoreInitializer()
1362 case tok::wide_string_literal: in ConsumeAndStoreInitializer()
1363 case tok::utf8_string_literal: in ConsumeAndStoreInitializer()
1364 case tok::utf16_string_literal: in ConsumeAndStoreInitializer()
1365 case tok::utf32_string_literal: in ConsumeAndStoreInitializer()
1369 case tok::semi: in ConsumeAndStoreInitializer()