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 ANNOTATION(X) case annot_ ## X: return true; 52 #include "clang/Basic/TokenKinds.def" 61 #define PRAGMA_ANNOTATION(X) case annot_ ## X: return true; 62 #include "clang/Basic/TokenKinds.def" static const char *const TokNames[]
const char * getKeywordSpelling(TokenKind Kind) LLVM_READNONE
Determines the spelling of simple keyword and contextual keyword tokens like 'int' and 'dynamic_cast'...
const char * getPunctuatorSpelling(TokenKind Kind) LLVM_READNONE
Determines the spelling of simple punctuation tokens like '!' or '', and returns NULL for literal and...
bool isAnnotation(TokenKind K)
Return true if this is any of tok::annot_* kinds.
TokenKind
Provides a simple uniform namespace for tokens from all C languages.
Dataflow Directional Tag Classes.
Defines the clang::TokenKind enum and support functions.
bool isPragmaAnnotation(TokenKind K)
Return true if this is an annotation token representing a pragma.
const char * getTokenName(TokenKind Kind) LLVM_READNONE
Determines the name of a token as used within the front end.