clang: clang::PreprocessorLexer Class Reference (original) (raw)

#include "[clang/Lex/PreprocessorLexer.h](PreprocessorLexer%5F8h%5Fsource.html)"

Public Member Functions
PreprocessorLexer (const PreprocessorLexer &)=delete
PreprocessorLexer & operator= (const PreprocessorLexer &)=delete
void LexIncludeFilename (Token &FilenameTok)
Lex a token, producing a header-name token if possible.
void setParsingPreprocessorDirective (bool f)
Inform the lexer whether or not we are currently lexing a preprocessor directive.
bool isLexingRawMode () const
Return true if this lexer is in raw mode or not.
Preprocessor * getPP () const
Return the preprocessor object for this lexer.
FileID getFileID () const
unsigned getInitialNumSLocEntries () const
Number of SLocEntries before lexing the file.
OptionalFileEntryRef getFileEntry () const
getFileEntry - Return the FileEntry corresponding to this FileID.
conditional_iterator conditional_begin () const
conditional_iterator conditional_end () const
void setConditionalLevels (ArrayRef< PPConditionalInfo > CL)
Protected Member Functions
PreprocessorLexer ()
PreprocessorLexer (Preprocessor *pp, FileID fid)
virtual ~PreprocessorLexer ()=default
virtual void IndirectLex (Token &Result)=0
virtual SourceLocation getSourceLocation ()=0
Return the source location for the next observable location.
void pushConditionalLevel (SourceLocation DirectiveStart, bool WasSkipping, bool FoundNonSkip, bool FoundElse)
pushConditionalLevel - When we enter a #if directive, this keeps track of what we are currently in for diagnostic emission (e.g.
void pushConditionalLevel (const PPConditionalInfo &CI)
bool popConditionalLevel (PPConditionalInfo &CI)
popConditionalLevel - Remove an entry off the top of the conditional stack, returning information about it.
PPConditionalInfo & peekConditionalLevel ()
Return the top of the conditional stack.
unsigned getConditionalStackDepth () const
Protected Attributes
Preprocessor * PP = nullptr
const FileID FID
The SourceManager FileID corresponding to the file being lexed.
unsigned InitialNumSLocEntries = 0
Number of SLocEntries before lexing the file.
bool ParsingPreprocessorDirective = false
True when parsing #XXX; turns '\n' into a tok::eod token.
bool ParsingFilename = false
True after #include; turns or "xxx" into a tok::header_name token.
bool LexingRawMode = false
True if in raw mode.
MultipleIncludeOpt MIOpt
A state machine that detects the #ifndef-wrapping a file idiom for the multiple-include optimization.
SmallVector< PPConditionalInfo, 4 > ConditionalStack
Information about the set of #if/#ifdef/#ifndef blocks we are currently in.

Definition at line 30 of file PreprocessorLexer.h.

conditional_iterator

Iterator that traverses the current stack of preprocessor conditional directives (#if/#ifdef/#ifndef).

Definition at line 164 of file PreprocessorLexer.h.

clang::PreprocessorLexer::PreprocessorLexer ( ) inlineprotected

PreprocessorLexer() [2/3]

~PreprocessorLexer()

virtual clang::PreprocessorLexer::~PreprocessorLexer ( ) protectedvirtualdefault

PreprocessorLexer() [3/3]

conditional_begin()

conditional_end()

getConditionalStackDepth()

unsigned clang::PreprocessorLexer::getConditionalStackDepth ( ) const inlineprotected

getFileEntry()

getFileID()

FileID clang::PreprocessorLexer::getFileID ( ) const inline

getInitialNumSLocEntries()

unsigned clang::PreprocessorLexer::getInitialNumSLocEntries ( ) const inline

getPP()

Preprocessor * clang::PreprocessorLexer::getPP ( ) const inline

getSourceLocation()

virtual SourceLocation clang::PreprocessorLexer::getSourceLocation ( ) protectedpure virtual

IndirectLex()

virtual void clang::PreprocessorLexer::IndirectLex ( Token & Result) protectedpure virtual

isLexingRawMode()

bool clang::PreprocessorLexer::isLexingRawMode ( ) const inline

LexIncludeFilename()

void PreprocessorLexer::LexIncludeFilename ( Token & FilenameTok )

operator=()

peekConditionalLevel()

PPConditionalInfo & clang::PreprocessorLexer::peekConditionalLevel ( ) inlineprotected

popConditionalLevel()

popConditionalLevel - Remove an entry off the top of the conditional stack, returning information about it.

If the conditional stack is empty, this returns true and does not fill in the arguments.

Definition at line 109 of file PreprocessorLexer.h.

References ConditionalStack.

pushConditionalLevel() [1/2]

void clang::PreprocessorLexer::pushConditionalLevel ( const PPConditionalInfo & CI) inlineprotected

pushConditionalLevel() [2/2]

void clang::PreprocessorLexer::pushConditionalLevel ( SourceLocation DirectiveStart, bool WasSkipping, bool FoundNonSkip, bool FoundElse ) inlineprotected

setConditionalLevels()

setParsingPreprocessorDirective()

void clang::PreprocessorLexer::setParsingPreprocessorDirective ( bool f) inline

Preprocessor

ConditionalStack

FID

const FileID clang::PreprocessorLexer::FID protected

InitialNumSLocEntries

unsigned clang::PreprocessorLexer::InitialNumSLocEntries = 0 protected

LexingRawMode

bool clang::PreprocessorLexer::LexingRawMode = false protected

MIOpt

ParsingFilename

bool clang::PreprocessorLexer::ParsingFilename = false protected

ParsingPreprocessorDirective

bool clang::PreprocessorLexer::ParsingPreprocessorDirective = false protected

PP


The documentation for this class was generated from the following files: