14 #ifndef LLVM_CLANG_LEX_PTHLEXER_H 15 #define LLVM_CLANG_LEX_PTHLEXER_H 31 const unsigned char* TokBuf;
35 const unsigned char* CurPtr;
39 const unsigned char* LastHashTokPtr =
nullptr;
44 const unsigned char* PPCond;
48 const unsigned char* CurPPCondPtr;
51 void ReadToken(
Token &T);
90 return x ==
tok::eof ? 2 : x == tok::l_paren;
107 #endif // LLVM_CLANG_LEX_PTHLEXER_H bool Lex(Token &Tok)
Lex - Return the next token.
PTHLexer(Preprocessor &pp, FileID FID, const unsigned char *D, const unsigned char *ppcond, PTHManager &PM)
Create a PTHLexer for the specified token stream.
Token - This structure provides full information about a lexed token.
PTHLexer & operator=(const PTHLexer &)=delete
const FileID FID
The SourceManager FileID corresponding to the file being lexed.
void DiscardToEndOfLine()
DiscardToEndOfLine - Read the rest of the current preprocessor line as an uninterpreted string...
The result type of a method or function.
SourceLocation getSourceLocation() override
getSourceLocation - Return a source location for the token in the current file.
Encodes a location in the source.
~PTHLexer() override=default
TokenKind
Provides a simple uniform namespace for tokens from all C languages.
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
bool SkipBlock()
SkipBlock - Used by Preprocessor to skip the current conditional block.
Dataflow Directional Tag Classes.
unsigned isNextPPTokenLParen()
isNextPPTokenLParen - Return 1 if the next unexpanded token will return a tok::l_paren token...
Defines the clang::TokenKind enum and support functions.
Defines the clang::SourceLocation class and associated facilities.
void IndirectLex(Token &Result) override
IndirectLex - An indirect call to 'Lex' that can be invoked via the PreprocessorLexer interface...
Defines the PreprocessorLexer interface.
Engages in a tight little dance with the lexer to efficiently preprocess tokens.