clang: clang::tok Namespace Reference (original) (raw)

Enumerations
enum TokenKind : unsigned short { NUM_TOKENS }
Provides a simple uniform namespace for tokens from all C languages. More...
enum PPKeywordKind { NUM_PP_KEYWORDS }
Provides a namespace for preprocessor keywords which start with a '#' at the beginning of the line. More...
enum ObjCKeywordKind { NUM_OBJC_KEYWORDS }
Provides a namespace for Objective-C keywords which start with an '@'. More...
enum NotableIdentifierKind { NUM_NOTABLE_IDENTIFIERS }
Provides a namespace for notable identifers such as float_t and double_t. More...
enum OnOffSwitch { OOS_ON, OOS_OFF, OOS_DEFAULT }
Defines the possible values of an on-off-switch (C99 6.10.6p2). More...
Functions
const char * getTokenName (TokenKind Kind) LLVM_READNONE
Determines the name of a token as used within the front end.
const char * getPunctuatorSpelling (TokenKind Kind) LLVM_READNONE
Determines the spelling of simple punctuation tokens like '!' or '', and returns NULL for literal and annotation tokens.
const char * getKeywordSpelling (TokenKind Kind) LLVM_READNONE
Determines the spelling of simple keyword and contextual keyword tokens like 'int' and 'dynamic_cast'.
const char * getPPKeywordSpelling (PPKeywordKind Kind) LLVM_READNONE
Returns the spelling of preprocessor keywords, such as "else".
bool isAnyIdentifier (TokenKind K)
Return true if this is a raw identifier or an identifier kind.
bool isStringLiteral (TokenKind K)
Return true if this is a C or C++ string-literal (or C++11 user-defined-string-literal) token.
bool isLiteral (TokenKind K)
Return true if this is a "literal" kind, like a numeric constant, string, etc.
bool isAnnotation (TokenKind K)
Return true if this is any of tok::annot_* kinds.
bool isPragmaAnnotation (TokenKind K)
Return true if this is an annotation token representing a pragma.
constexpr bool isRegularKeywordAttribute (TokenKind K)

NotableIdentifierKind

Provides a namespace for notable identifers such as float_t and double_t.

Enumerator
NUM_NOTABLE_IDENTIFIERS

Definition at line 49 of file TokenKinds.h.

ObjCKeywordKind

Provides a namespace for Objective-C keywords which start with an '@'.

Enumerator
NUM_OBJC_KEYWORDS

Definition at line 41 of file TokenKinds.h.

OnOffSwitch

Defines the possible values of an on-off-switch (C99 6.10.6p2).

Enumerator
OOS_ON
OOS_OFF
OOS_DEFAULT

Definition at line 56 of file TokenKinds.h.

PPKeywordKind

Provides a namespace for preprocessor keywords which start with a '#' at the beginning of the line.

Enumerator
NUM_PP_KEYWORDS

Definition at line 33 of file TokenKinds.h.

TokenKind

Provides a simple uniform namespace for tokens from all C languages.

Enumerator
NUM_TOKENS

Definition at line 25 of file TokenKinds.h.

getKeywordSpelling()

const char * clang::tok::getKeywordSpelling ( TokenKind Kind )

getPPKeywordSpelling()

Returns the spelling of preprocessor keywords, such as "else".

Definition at line 49 of file TokenKinds.cpp.

getPunctuatorSpelling()

const char * clang::tok::getPunctuatorSpelling ( TokenKind Kind )

getTokenName()

const char * clang::tok::getTokenName ( TokenKind Kind )

isAnnotation()

isAnyIdentifier()

isLiteral()

isPragmaAnnotation()

Return true if this is an annotation token representing a pragma.

Definition at line 68 of file TokenKinds.cpp.

isRegularKeywordAttribute()

constexpr bool clang::tok::isRegularKeywordAttribute ( TokenKind K) inlineconstexpr

isStringLiteral()