18 using namespace clang;
20 void PreprocessorLexer::anchor() { }
23 : PP(pp), FID(fid), InitialNumSLocEntries(0),
24 ParsingPreprocessorDirective(
false),
35 "Must be in a preprocessing directive!");
50 if (FilenameTok.
is(tok::eod))
SourceManager & getSourceManager() const
unsigned local_sloc_entry_size() const
Get the number of local SLocEntries we have.
unsigned InitialNumSLocEntries
Number of SLocEntries before lexing the file.
Defines the SourceManager interface.
bool ParsingPreprocessorDirective
True when parsing #XXX; turns '\n' into a tok::eod token.
const FileEntry * getFileEntry() const
DiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID) const
const FileEntry * getFileEntryForID(FileID FID) const
Returns the FileEntry record for the provided FileID.
bool ParsingFilename
True after #include; turns <xx> into a tok::angle_string_literal token.
bool LexingRawMode
True if in raw mode.
Defines the clang::Preprocessor interface.
SourceLocation getLocation() const
Return a source location identifier for the specified offset in the current file. ...
Cached information about one file (either on disk or in the virtual file system). ...
void Lex(Token &Result)
Lex the next token for this preprocessor.
bool is(tok::TokenKind K) const
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
void LexIncludeFilename(Token &Result)
After the preprocessor has parsed a #include, lex and (potentially) macro expand the filename...
virtual void IndirectLex(Token &Result)=0
Defines the PreprocessorLexer interface.
Engages in a tight little dance with the lexer to efficiently preprocess tokens.