#include "clang/Basic/CharInfo.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/OperatorKinds.h"
#include "clang/Basic/Specifiers.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdio>
#include "clang/Basic/TokenKinds.def"
#include "clang/Basic/OperatorKinds.def"
Go to the source code of this file.
|
| | clang |
| | Dataflow Directional Tag Classes.
|
| |
|
| #define | KEYWORD(NAME, FLAGS) |
| |
| #define | ALIAS(NAME, TOK, FLAGS) |
| |
| #define | CXX_KEYWORD_OPERATOR(NAME, ALIAS) |
| |
| #define | OBJC1_AT_KEYWORD(NAME) |
| |
| #define | OBJC2_AT_KEYWORD(NAME) |
| |
| #define | TESTING_KEYWORD(NAME, FLAGS) |
| |
| #define | KEYWORD(NAME, FLAGS) case tok::kw_##NAME: return getKeywordStatus(LangOpts, FLAGS); |
| |
| #define | HASH(LEN, FIRST, THIRD) (LEN << 5) + (((FIRST-'a') + (THIRD-'a')) & 31) |
| |
| #define | CASE(LEN, FIRST, THIRD, NAME) |
| |
| #define | OVERLOADED_OPERATOR(Name, Spelling, Token, Unary, Binary, MemberOnly) case OO_##Name: return Spelling; |
| |
|
| static KeywordStatus | getKeywordStatus (const LangOptions &LangOpts, unsigned Flags) |
| | Translates flags as specified in TokenKinds.def into keyword status in the given language standard. More...
|
| |
| static void | AddKeyword (StringRef Keyword, tok::TokenKind TokenCode, unsigned Flags, const LangOptions &LangOpts, IdentifierTable &Table) |
| | AddKeyword - This method is used to associate a token ID with specific identifiers because they are language keywords. More...
|
| |
| static void | AddCXXOperatorKeyword (StringRef Keyword, tok::TokenKind TokenCode, IdentifierTable &Table) |
| | AddCXXOperatorKeyword - Register a C++ operator keyword alternative representations. More...
|
| |
| static void | AddObjCKeyword (StringRef Name, tok::ObjCKeywordKind ObjCID, IdentifierTable &Table) |
| | AddObjCKeyword - Register an Objective-C @keyword like "class" "selector" or "property". More...
|
| |
| static KeywordStatus | getTokenKwStatus (const LangOptions &LangOpts, tok::TokenKind K) |
| | Checks if the specified token kind represents a keyword in the specified language. More...
|
| |
| static bool | startsWithWord (StringRef name, StringRef word) |
| | Interpreting the given string using the normal CamelCase conventions, determine whether the given string starts with the given "word", which is assumed to end in a lowercase letter. More...
|
| |
| static SelectorTableImpl & | getSelectorTableImpl (void *P) |
| |
| #define ALIAS |
( |
|
NAME, |
|
|
|
TOK, |
|
|
|
FLAGS |
|
) |
| |
Value:
FLAGS, LangOpts, *this);
static void AddKeyword(StringRef Keyword, tok::TokenKind TokenCode, unsigned Flags, const LangOptions &LangOpts, IdentifierTable &Table)
AddKeyword - This method is used to associate a token ID with specific identifiers because they are l...
| #define CASE |
( |
|
LEN, |
|
|
|
FIRST, |
|
|
|
THIRD, |
|
|
|
NAME |
|
) |
| |
Value:case HASH(LEN, FIRST, THIRD): \
return memcmp(
Name, #NAME, LEN) ? tok::pp_not_keyword : tok::pp_ ## NAME
class LLVM_ALIGNAS(8) DependentTemplateSpecializationType const IdentifierInfo * Name
Represents a template specialization type whose template cannot be resolved, e.g. ...
return(x >> y)|(x<< (32-y))
#define HASH(LEN, FIRST, THIRD)
Referenced by clang::IdentifierInfo::getPPKeywordID().
| #define CXX_KEYWORD_OPERATOR |
( |
|
NAME, |
|
|
|
ALIAS |
|
) |
| |
Value:if (LangOpts.CXXOperatorNames)
\
static void AddCXXOperatorKeyword(StringRef Keyword, tok::TokenKind TokenCode, IdentifierTable &Table)
AddCXXOperatorKeyword - Register a C++ operator keyword alternative representations.
#define ALIAS(NAME, TOK, FLAGS)
| #define HASH |
( |
|
LEN, |
|
|
|
FIRST, |
|
|
|
THIRD |
|
) |
| (LEN << 5) + (((FIRST-'a') + (THIRD-'a')) & 31) |
| #define KEYWORD |
( |
|
NAME, |
|
|
|
FLAGS |
|
) |
| |
Value:
FLAGS, LangOpts, *this);
static void AddKeyword(StringRef Keyword, tok::TokenKind TokenCode, unsigned Flags, const LangOptions &LangOpts, IdentifierTable &Table)
AddKeyword - This method is used to associate a token ID with specific identifiers because they are l...
| #define OBJC1_AT_KEYWORD |
( |
|
NAME | ) |
|
Value:
static void AddObjCKeyword(StringRef Name, tok::ObjCKeywordKind ObjCID, IdentifierTable &Table)
AddObjCKeyword - Register an Objective-C @keyword like "class" "selector" or "property".
| #define OBJC2_AT_KEYWORD |
( |
|
NAME | ) |
|
Value:
static void AddObjCKeyword(StringRef Name, tok::ObjCKeywordKind ObjCID, IdentifierTable &Table)
AddObjCKeyword - Register an Objective-C @keyword like "class" "selector" or "property".
| #define OVERLOADED_OPERATOR |
( |
|
Name, |
|
|
|
Spelling, |
|
|
|
Token, |
|
|
|
Unary, |
|
|
|
Binary, |
|
|
|
MemberOnly |
|
) |
| case OO_##Name: return Spelling; |
| #define TESTING_KEYWORD |
( |
|
NAME, |
|
|
|
FLAGS |
|
) |
| |
Translates flags as specified in TokenKinds.def into keyword status in the given language standard.
Definition at line 130 of file IdentifierTable.cpp.
Referenced by AddKeyword().
| static SelectorTableImpl& getSelectorTableImpl |
( |
void * |
P | ) |
|
|
static |
| static bool startsWithWord |
( |
StringRef |
name, |
|
|
StringRef |
word |
|
) |
| |
|
static |