clang 20.0.0git
Macros | Variables
TokenKinds.cpp File Reference
#include "clang/Basic/TokenKinds.h"
#include "llvm/Support/ErrorHandling.h"
#include "clang/Basic/TokenKinds.def"

Go to the source code of this file.

Macros

#define TOK(X)   #X,
 
#define KEYWORD(X, Y)   #X,
 
#define PUNCTUATOR(X, Y)   case X: return Y;
 
#define KEYWORD(X, Y)   case kw_ ## X: return #X;
 
#define PPKEYWORD(x)   case tok::pp_##x: return #x;
 
#define ANNOTATION(X)   case annot_ ## X: return true;
 
#define PRAGMA_ANNOTATION(X)   case annot_ ## X: return true;
 

Variables

static const char *const TokNames []
 

Macro Definition Documentation

◆ ANNOTATION

#define ANNOTATION (   X)    case annot_ ## X: return true;

◆ KEYWORD [1/2]

#define KEYWORD (   X,
 
)    #X,

◆ KEYWORD [2/2]

#define KEYWORD (   X,
 
)    case kw_ ## X: return #X;

◆ PPKEYWORD

#define PPKEYWORD (   x)    case tok::pp_##x: return #x;

◆ PRAGMA_ANNOTATION

#define PRAGMA_ANNOTATION (   X)    case annot_ ## X: return true;

◆ PUNCTUATOR

#define PUNCTUATOR (   X,
 
)    case X: return Y;

◆ TOK

#define TOK (   X)    #X,

Variable Documentation

◆ TokNames

const char* const TokNames[]
static
Initial value:
= {
#define TOK(X)
#define KEYWORD(X,Y)
nullptr
}

Definition at line 17 of file TokenKinds.cpp.

Referenced by clang::tok::getTokenName(), and clang::format::getTokenTypeName().