clang API Documentation

Public Member Functions | Protected Member Functions | Friends
clang::PTHLexer Class Reference

#include <PTHLexer.h>

Inheritance diagram for clang::PTHLexer:
Inheritance graph
[legend]
Collaboration diagram for clang::PTHLexer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ~PTHLexer ()
bool Lex (Token &Tok)
 Lex - Return the next token.
void getEOF (Token &Tok)
void DiscardToEndOfLine ()
unsigned isNextPPTokenLParen ()
void IndirectLex (Token &Result) override
SourceLocation getSourceLocation () override
bool SkipBlock ()
 SkipBlock - Used by Preprocessor to skip the current conditional block.

Protected Member Functions

 PTHLexer (Preprocessor &pp, FileID FID, const unsigned char *D, const unsigned char *ppcond, PTHManager &PM)
 Create a PTHLexer for the specified token stream.

Friends

class PTHManager

Detailed Description

Definition at line 24 of file PTHLexer.h.


Constructor & Destructor Documentation

PTHLexer::PTHLexer ( Preprocessor pp,
FileID  FID,
const unsigned char *  D,
const unsigned char *  ppcond,
PTHManager PM 
) [protected]

Create a PTHLexer for the specified token stream.

Definition at line 37 of file PTHLexer.cpp.

References clang::SourceManager::getLocForStartOfFile(), and clang::Preprocessor::getSourceManager().

Definition at line 68 of file PTHLexer.h.


Member Function Documentation

DiscardToEndOfLine - Read the rest of the current preprocessor line as an uninterpreted string. This switches the lexer out of directive mode.

Definition at line 159 of file PTHLexer.cpp.

References clang::comments::tok::eof, clang::PreprocessorLexer::ParsingFilename, clang::PreprocessorLexer::ParsingPreprocessorDirective, clang::Token::StartOfLine, and StoredTokenSize.

void PTHLexer::getEOF ( Token Tok)

Definition at line 154 of file PTHLexer.cpp.

References clang::comments::tok::eof, and clang::Token::is().

getSourceLocation - Return a source location for the token in the current file.

Implements clang::PreprocessorLexer.

Definition at line 286 of file PTHLexer.cpp.

References clang::SourceLocation::getLocWithOffset(), and StoredTokenSize.

void clang::PTHLexer::IndirectLex ( Token Result) [inline, override, virtual]

IndirectLex - An indirect call to 'Lex' that can be invoked via the PreprocessorLexer interface.

Implements clang::PreprocessorLexer.

Definition at line 93 of file PTHLexer.h.

References Lex().

isNextPPTokenLParen - Return 1 if the next unexpanded token will return a tok::l_paren token, 0 if it is something else and 2 if there are no more tokens controlled by this lexer.

Definition at line 82 of file PTHLexer.h.

References clang::comments::tok::eof.

bool PTHLexer::Lex ( Token Tok)

SkipBlock - Used by Preprocessor to skip the current conditional block.

Definition at line 188 of file PTHLexer.cpp.

References StoredTokenSize.


Friends And Related Function Documentation

friend class PTHManager [friend]

Definition at line 61 of file PTHLexer.h.


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