14#ifndef LLVM_CLANG_BASIC_TOKENKINDS_H
15#define LLVM_CLANG_BASIC_TOKENKINDS_H
17#include "llvm/ADT/DenseMapInfo.h"
18#include "llvm/Support/Compiler.h"
27#include "clang/Basic/TokenKinds.def"
34#define PPKEYWORD(X) pp_##X,
35#include "clang/Basic/TokenKinds.def"
42#define OBJC_AT_KEYWORD(X) objc_##X,
43#include "clang/Basic/TokenKinds.def"
50#define NOTABLE_IDENTIFIER(X) X,
51#include "clang/Basic/TokenKinds.def"
84 return (K == tok::identifier) || (K == tok::raw_identifier);
90 return K == tok::string_literal || K == tok::wide_string_literal ||
91 K == tok::utf8_string_literal || K == tok::utf16_string_literal ||
92 K == tok::utf32_string_literal;
98 return K == tok::numeric_constant || K == tok::char_constant ||
99 K == tok::wide_char_constant || K == tok::utf8_char_constant ||
100 K == tok::utf16_char_constant || K == tok::utf32_char_constant ||
113#include
"clang/Basic/RegularKeywordAttrInfo.inc"
121template <>
struct DenseMapInfo<
clang::tok::PPKeywordKind> {
123 return clang::tok::PPKeywordKind::pp_not_keyword;
129 return static_cast<unsigned>(Val);
#define KEYWORD_ATTRIBUTE(NAME, HASARG,...)
enum clang::sema::@1655::IndirectLocalPathEntry::EntryKind Kind
bool isStringLiteral(TokenKind K)
Return true if this is a C or C++ string-literal (or C++11 user-defined-string-literal) token.
const char * getPPKeywordSpelling(PPKeywordKind Kind) LLVM_READNONE
Returns the spelling of preprocessor keywords, such as "else".
NotableIdentifierKind
Provides a namespace for notable identifers such as float_t and double_t.
@ NUM_NOTABLE_IDENTIFIERS
const char * getTokenName(TokenKind Kind) LLVM_READNONE
Determines the name of a token as used within the front end.
bool isAnyIdentifier(TokenKind K)
Return true if this is a raw identifier or an identifier kind.
const char * getKeywordSpelling(TokenKind Kind) LLVM_READNONE
Determines the spelling of simple keyword and contextual keyword tokens like 'int' and 'dynamic_cast'...
ObjCKeywordKind
Provides a namespace for Objective-C keywords which start with an '@'.
TokenKind
Provides a simple uniform namespace for tokens from all C languages.
OnOffSwitch
Defines the possible values of an on-off-switch (C99 6.10.6p2).
constexpr bool isRegularKeywordAttribute(TokenKind K)
bool isPragmaAnnotation(TokenKind K)
Return true if this is an annotation token representing a pragma.
bool isLiteral(TokenKind K)
Return true if this is a "literal" kind, like a numeric constant, string, etc.
PPKeywordKind
Provides a namespace for preprocessor keywords which start with a '#' at the beginning of the line.
bool isAnnotation(TokenKind K)
Return true if this is any of tok::annot_* kinds.
const char * getPunctuatorSpelling(TokenKind Kind) LLVM_READNONE
Determines the spelling of simple punctuation tokens like '!' or '', and returns NULL for literal and...
The JSON file list parser is used to communicate input to InstallAPI.
Diagnostic wrappers for TextAPI types for error reporting.
static clang::tok::PPKeywordKind getEmptyKey()
static clang::tok::PPKeywordKind getTombstoneKey()
static unsigned getHashValue(const clang::tok::PPKeywordKind &Val)
static bool isEqual(const clang::tok::PPKeywordKind &LHS, const clang::tok::PPKeywordKind &RHS)