Lines Matching refs:tok

21 namespace tok = clang::tok;
71 bool CPlusPlusNameParser::ConsumeToken(tok::TokenKind kind) { in ConsumeToken()
145 if (!ConsumeToken(tok::l_paren)) in ParseFuncPtr()
154 if (ConsumeToken(tok::r_paren)) in ParseFuncPtr()
165 if (ConsumeToken(tok::r_paren)) in ParseFuncPtr()
175 return ConsumeBrackets(tok::l_paren, tok::r_paren); in ConsumeArguments()
180 if (!HasMoreTokens() || Peek().getKind() != tok::less) in ConsumeTemplateArgs()
195 tok::TokenKind kind = Peek().getKind(); in ConsumeTemplateArgs()
197 case tok::greatergreater: in ConsumeTemplateArgs()
202 case tok::greater: in ConsumeTemplateArgs()
207 case tok::less: in ConsumeTemplateArgs()
218 case tok::kw_operator: // C++ operator overloading. in ConsumeTemplateArgs()
223 case tok::raw_identifier: in ConsumeTemplateArgs()
227 case tok::l_square: in ConsumeTemplateArgs()
228 if (!ConsumeBrackets(tok::l_square, tok::r_square)) in ConsumeTemplateArgs()
232 case tok::l_paren: in ConsumeTemplateArgs()
253 if (!ConsumeToken(tok::l_paren)) { in ConsumeAnonymousNamespace()
257 if (HasMoreTokens() && Peek().is(tok::raw_identifier) && in ConsumeAnonymousNamespace()
264 if (!ConsumeToken(tok::kw_namespace)) { in ConsumeAnonymousNamespace()
268 if (!ConsumeToken(tok::r_paren)) { in ConsumeAnonymousNamespace()
277 if (!ConsumeToken(tok::l_brace)) { in ConsumeLambda()
281 if (HasMoreTokens() && Peek().is(tok::raw_identifier) && in ConsumeLambda()
289 if (!ConsumeBrackets(tok::l_brace, tok::r_brace)) { in ConsumeLambda()
297 bool CPlusPlusNameParser::ConsumeBrackets(tok::TokenKind left, in ConsumeBrackets()
298 tok::TokenKind right) { in ConsumeBrackets()
306 tok::TokenKind kind = Peek().getKind(); in ConsumeBrackets()
324 if (!ConsumeToken(tok::kw_operator)) in ConsumeOperator()
342 if (token.getKind() == tok::lessless) { in ConsumeOperator()
348 if (n_token.getKind() != tok::l_paren && n_token.getKind() != tok::less) { in ConsumeOperator()
353 tmp_tok.setKind(tok::less); in ConsumeOperator()
364 case tok::kw_new: in ConsumeOperator()
365 case tok::kw_delete: in ConsumeOperator()
369 if (HasMoreTokens() && Peek().is(tok::l_square)) { in ConsumeOperator()
371 if (!ConsumeBrackets(tok::l_square, tok::r_square)) in ConsumeOperator()
377 case tok::Token: \ in ConsumeOperator()
385 case tok::l_paren: in ConsumeOperator()
387 if (ConsumeBrackets(tok::l_paren, tok::r_paren)) in ConsumeOperator()
391 case tok::l_square: in ConsumeOperator()
394 if (ConsumeBrackets(tok::l_square, tok::r_square)) in ConsumeOperator()
409 while (ConsumeToken(tok::kw_const, tok::kw_volatile)) in SkipTypeQualifiers()
414 while (ConsumeToken(tok::kw_const, tok::kw_volatile, tok::amp, tok::ampamp)) in SkipFunctionQualifiers()
426 case tok::kw_short: in ConsumeBuiltinType()
427 case tok::kw_long: in ConsumeBuiltinType()
428 case tok::kw___int64: in ConsumeBuiltinType()
429 case tok::kw___int128: in ConsumeBuiltinType()
430 case tok::kw_signed: in ConsumeBuiltinType()
431 case tok::kw_unsigned: in ConsumeBuiltinType()
432 case tok::kw_void: in ConsumeBuiltinType()
433 case tok::kw_char: in ConsumeBuiltinType()
434 case tok::kw_int: in ConsumeBuiltinType()
435 case tok::kw_half: in ConsumeBuiltinType()
436 case tok::kw_float: in ConsumeBuiltinType()
437 case tok::kw_double: in ConsumeBuiltinType()
438 case tok::kw___float128: in ConsumeBuiltinType()
439 case tok::kw_wchar_t: in ConsumeBuiltinType()
440 case tok::kw_bool: in ConsumeBuiltinType()
441 case tok::kw_char16_t: in ConsumeBuiltinType()
442 case tok::kw_char32_t: in ConsumeBuiltinType()
462 while (ConsumeToken(tok::star, tok::amp, tok::ampamp, tok::kw_const, in ConsumePtrsAndRefs()
463 tok::kw_volatile)) { in ConsumePtrsAndRefs()
472 if (!ConsumeToken(tok::kw_decltype)) in ConsumeDecltype()
513 case tok::raw_identifier: // Just a name. in ParseFullNameImpl()
521 case tok::l_paren: { in ParseFullNameImpl()
546 if (!ConsumeToken(tok::coloncolon)) { in ParseFullNameImpl()
555 case tok::l_brace: in ParseFullNameImpl()
564 case tok::coloncolon: // Type nesting delimiter. in ParseFullNameImpl()
574 case tok::less: // Template brackets. in ParseFullNameImpl()
585 case tok::kw_operator: // C++ operator overloading. in ParseFullNameImpl()
596 case tok::tilde: // Destructor. in ParseFullNameImpl()
602 if (ConsumeToken(tok::raw_identifier)) { in ParseFullNameImpl()
664 static const llvm::StringMap<tok::TokenKind> &GetKeywordsMap() { in GetKeywordsMap()
665 static llvm::StringMap<tok::TokenKind> g_map{ in GetKeywordsMap()
666 #define KEYWORD(Name, Flags) {llvm::StringRef(#Name), tok::kw_##Name}, in GetKeywordsMap()
680 for (lexer.LexFromRawLexer(token); !token.is(clang::tok::eof); in ExtractTokens()
682 if (token.is(clang::tok::raw_identifier)) { in ExtractTokens()