clang 19.0.0git
Public Types | Public Member Functions | List of all members
clang::TokenRewriter Class Reference

#include "clang/Rewrite/Core/TokenRewriter.h"

Public Types

using token_iterator = std::list< Token >::const_iterator

Public Member Functions

 TokenRewriter (FileID FID, SourceManager &SM, const LangOptions &LO)
 TokenRewriter - This creates a TokenRewriter for the file with the specified FileID.
 TokenRewriter (const TokenRewriter &)=delete
TokenRewriteroperator= (const TokenRewriter &)=delete
 ~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)

Detailed Description

Definition at line 30 of file TokenRewriter.h.

Member Typedef Documentation

◆ token_iterator

using clang::TokenRewriter::token_iterator = std::list<Token>::const_iterator

Definition at line 56 of file TokenRewriter.h.

Constructor & Destructor Documentation

◆ TokenRewriter() [1/2]

TokenRewriter::TokenRewriter ( FileID  FID,
SourceManager SM,
const LangOptions LO 

TokenRewriter - This creates a TokenRewriter for the file with the specified FileID.

Definition at line 26 of file TokenRewriter.cpp.

References clang::Token::isNot(), clang::Lexer::LexFromRawLexer(), clang::Lexer::SetKeepWhitespaceMode(), and SM.

◆ TokenRewriter() [2/2]

clang::TokenRewriter::TokenRewriter ( const TokenRewriter )

◆ ~TokenRewriter()

TokenRewriter::~TokenRewriter ( )

Member Function Documentation

◆ AddTokenAfter()

token_iterator clang::TokenRewriter::AddTokenAfter ( token_iterator  I,
const char *  Val 

Definition at line 63 of file TokenRewriter.h.

References AddTokenBefore(), and token_end().

◆ AddTokenBefore()

TokenRewriter::token_iterator TokenRewriter::AddTokenBefore ( token_iterator  I,
const char *  Val 

◆ operator=()

TokenRewriter & clang::TokenRewriter::operator= ( const TokenRewriter )

◆ token_begin()

token_iterator clang::TokenRewriter::token_begin ( ) const

Definition at line 58 of file TokenRewriter.h.

◆ token_end()

token_iterator clang::TokenRewriter::token_end ( ) const

Definition at line 59 of file TokenRewriter.h.

Referenced by AddTokenAfter().

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