14 #ifndef LLVM_CLANG_BASIC_TOKENKINDS_H 15 #define LLVM_CLANG_BASIC_TOKENKINDS_H 17 #include "llvm/Support/Compiler.h" 26 #include "clang/Basic/TokenKinds.def" 33 #define PPKEYWORD(X) pp_##X, 34 #include "clang/Basic/TokenKinds.def" 41 #define OBJC_AT_KEYWORD(X) objc_##X, 42 #include "clang/Basic/TokenKinds.def" 72 return (K == tok::identifier) || (K == tok::raw_identifier);
78 return K == tok::string_literal || K == tok::wide_string_literal ||
79 K == tok::utf8_string_literal || K == tok::utf16_string_literal ||
80 K == tok::utf32_string_literal;
86 return K == tok::numeric_constant || K == tok::char_constant ||
87 K == tok::wide_char_constant || K == tok::utf8_char_constant ||
88 K == tok::utf16_char_constant || K == tok::utf32_char_constant ||
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 * getKeywordSpelling(TokenKind Kind) LLVM_READNONE
Determines the spelling of simple keyword and contextual keyword tokens like 'int' and 'dynamic_cast'...
PPKeywordKind
Provides a namespace for preprocessor keywords which start with a '#' at the beginning of the line...
const char * getPunctuatorSpelling(TokenKind Kind) LLVM_READNONE
Determines the spelling of simple punctuation tokens like '!' or '', and returns NULL for literal and...
ObjCKeywordKind
Provides a namespace for Objective-C keywords which start with an '@'.
bool isAnnotation(TokenKind K)
Return true if this is any of tok::annot_* kinds.
bool isLiteral(TokenKind K)
Return true if this is a "literal" kind, like a numeric constant, string, etc.
TokenKind
Provides a simple uniform namespace for tokens from all C languages.
Dataflow Directional Tag Classes.
OnOffSwitch
Defines the possible values of an on-off-switch (C99 6.10.6p2).
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.
bool isAnyIdentifier(TokenKind K)
Return true if this is a raw identifier or an identifier kind.