clang API Documentation
#include <TokenRewriter.h>
Public Types | |
typedef std::list< Token > ::const_iterator | token_iterator |
Public Member Functions | |
TokenRewriter (FileID FID, SourceManager &SM, const LangOptions &LO) | |
~TokenRewriter () | |
token_iterator | token_begin () const |
token_iterator | token_end () const |
token_iterator | AddTokenBefore (token_iterator I, const char *Val) |
token_iterator | AddTokenAfter (token_iterator I, const char *Val) |
Definition at line 28 of file TokenRewriter.h.
typedef std::list<Token>::const_iterator clang::TokenRewriter::token_iterator |
Definition at line 54 of file TokenRewriter.h.
TokenRewriter::TokenRewriter | ( | FileID | FID, |
SourceManager & | SM, | ||
const LangOptions & | LO | ||
) |
TokenRewriter - This creates a TokenRewriter for the file with the specified FileID.
Definition at line 21 of file TokenRewriter.cpp.
References clang::comments::tok::eof, clang::SourceManager::getBuffer(), clang::Token::isNot(), clang::Lexer::LexFromRawLexer(), and clang::Lexer::SetKeepWhitespaceMode().
Definition at line 49 of file TokenRewriter.cpp.
token_iterator clang::TokenRewriter::AddTokenAfter | ( | token_iterator | I, |
const char * | Val | ||
) | [inline] |
Definition at line 60 of file TokenRewriter.h.
References AddTokenBefore(), and token_end().
TokenRewriter::token_iterator TokenRewriter::AddTokenBefore | ( | token_iterator | I, |
const char * | Val | ||
) |
Definition at line 82 of file TokenRewriter.cpp.
References clang::Token::setKind(), clang::Token::setLength(), clang::Token::setLocation(), and clang::Token::startToken().
Referenced by AddTokenAfter().
token_iterator clang::TokenRewriter::token_begin | ( | ) | const [inline] |
Definition at line 55 of file TokenRewriter.h.
token_iterator clang::TokenRewriter::token_end | ( | ) | const [inline] |
Definition at line 56 of file TokenRewriter.h.
Referenced by AddTokenAfter().