14 #include "llvm/Support/ErrorHandling.h"
15 using namespace clang;
19 #define KEYWORD(X,Y) #X,
20 #include "clang/Basic/TokenKinds.def"
27 llvm_unreachable(
"unknown TokenKind");
33 #define PUNCTUATOR(X,Y) case X: return Y;
34 #include "clang/Basic/TokenKinds.def"
42 #define KEYWORD(X,Y) case kw_ ## X: return #X;
43 #include "clang/Basic/TokenKinds.def"
51 #define PPKEYWORD(x) case tok::pp_##x: return #x;
52 #include "clang/Basic/TokenKinds.def"
60 #define ANNOTATION(X) case annot_ ## X: return true;
61 #include "clang/Basic/TokenKinds.def"
70 #define PRAGMA_ANNOTATION(X) case annot_ ## X: return true;
71 #include "clang/Basic/TokenKinds.def"
static const char *const TokNames[]
Defines the clang::TokenKind enum and support functions.
const char * getPPKeywordSpelling(PPKeywordKind Kind) LLVM_READNONE
Returns the spelling of preprocessor keywords, such as "else".
const char * getTokenName(TokenKind Kind) LLVM_READNONE
Determines the name of a token as used within the front end.
const char * getKeywordSpelling(TokenKind Kind) LLVM_READNONE
Determines the spelling of simple keyword and contextual keyword tokens like 'int' and 'dynamic_cast'...
TokenKind
Provides a simple uniform namespace for tokens from all C languages.
bool isPragmaAnnotation(TokenKind K)
Return true if this is an annotation token representing a pragma.
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.