21 using namespace clang;
23 void PreprocessorLexer::anchor() {}
36 "Must be in a preprocessing directive!");
51 if (FilenameTok.
is(tok::eod))
bool is(tok::TokenKind K) const
is/isNot - Predicates to check if this token is a specific kind, as in "if (Tok.is(tok::l_brace)) {...
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.
Token - This structure provides full information about a lexed token.
const FileID FID
The SourceManager FileID corresponding to the file being lexed.
unsigned local_sloc_entry_size() const
Get the number of local SLocEntries we have.
bool ParsingFilename
True after #include; turns <xx> into a tok::angle_string_literal token.
bool LexingRawMode
True if in raw mode.
const FileEntry * getFileEntryForID(FileID FID) const
Returns the FileEntry record for the provided FileID.
SourceLocation getLocation() const
Return a source location identifier for the specified offset in the current file. ...
Defines the clang::Preprocessor interface.
SourceManager & getSourceManager() const
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.
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
Dataflow Directional Tag Classes.
const FileEntry * getFileEntry() const
getFileEntry - Return the FileEntry corresponding to this FileID.
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.
DiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID) const
Forwarding function for diagnostics.
Engages in a tight little dance with the lexer to efficiently preprocess tokens.