clang  3.9.0
Classes | Public Member Functions | Public Attributes | List of all members
clang::format::WhitespaceManager::Change Struct Reference

Represents a change before a token, a break inside a token, or the layout of an unchanged token (or whitespace within). More...

#include <WhitespaceManager.h>

Collaboration diagram for clang::format::WhitespaceManager::Change:
[legend]

Classes

class  IsBeforeInFile
 Functor to sort changes in original source order. More...
 

Public Member Functions

 Change ()
 
 Change (bool CreateReplacement, SourceRange OriginalWhitespaceRange, unsigned IndentLevel, int Spaces, unsigned StartOfTokenColumn, unsigned NewlinesBefore, StringRef PreviousLinePostfix, StringRef CurrentLinePrefix, tok::TokenKind Kind, bool ContinuesPPDirective, bool IsStartOfDeclName, bool IsInsideToken)
 Creates a Change. More...
 

Public Attributes

bool CreateReplacement
 
SourceRange OriginalWhitespaceRange
 
unsigned StartOfTokenColumn
 
unsigned NewlinesBefore
 
std::string PreviousLinePostfix
 
std::string CurrentLinePrefix
 
tok::TokenKind Kind
 
bool ContinuesPPDirective
 
bool IsStartOfDeclName
 
unsigned IndentLevel
 
int Spaces
 
bool IsInsideToken
 
bool IsTrailingComment
 
unsigned TokenLength
 
unsigned PreviousEndOfTokenColumn
 
unsigned EscapedNewlineColumn
 
const ChangeStartOfBlockComment
 
int IndentationOffset
 

Detailed Description

Represents a change before a token, a break inside a token, or the layout of an unchanged token (or whitespace within).

Definition at line 86 of file WhitespaceManager.h.

Constructor & Destructor Documentation

clang::format::WhitespaceManager::Change::Change ( )
inline

Definition at line 97 of file WhitespaceManager.h.

clang::format::WhitespaceManager::Change::Change ( bool  CreateReplacement,
SourceRange  OriginalWhitespaceRange,
unsigned  IndentLevel,
int  Spaces,
unsigned  StartOfTokenColumn,
unsigned  NewlinesBefore,
StringRef  PreviousLinePostfix,
StringRef  CurrentLinePrefix,
tok::TokenKind  Kind,
bool  ContinuesPPDirective,
bool  IsStartOfDeclName,
bool  IsInsideToken 
)

Creates a Change.

The generated Change will replace the characters at OriginalWhitespaceRange with a concatenation of PreviousLinePostfix, NewlinesBefore line breaks, Spaces spaces and CurrentLinePrefix.

StartOfTokenColumn and InPPDirective will be used to lay out trailing comments and escaped newlines.

Definition at line 28 of file WhitespaceManager.cpp.

Member Data Documentation

bool clang::format::WhitespaceManager::Change::ContinuesPPDirective

Definition at line 128 of file WhitespaceManager.h.

bool clang::format::WhitespaceManager::Change::CreateReplacement

Definition at line 115 of file WhitespaceManager.h.

std::string clang::format::WhitespaceManager::Change::CurrentLinePrefix

Definition at line 122 of file WhitespaceManager.h.

unsigned clang::format::WhitespaceManager::Change::EscapedNewlineColumn

Definition at line 153 of file WhitespaceManager.h.

int clang::format::WhitespaceManager::Change::IndentationOffset

Definition at line 164 of file WhitespaceManager.h.

unsigned clang::format::WhitespaceManager::Change::IndentLevel

Definition at line 134 of file WhitespaceManager.h.

bool clang::format::WhitespaceManager::Change::IsInsideToken

Definition at line 145 of file WhitespaceManager.h.

bool clang::format::WhitespaceManager::Change::IsStartOfDeclName

Definition at line 129 of file WhitespaceManager.h.

bool clang::format::WhitespaceManager::Change::IsTrailingComment

Definition at line 150 of file WhitespaceManager.h.

tok::TokenKind clang::format::WhitespaceManager::Change::Kind

Definition at line 127 of file WhitespaceManager.h.

unsigned clang::format::WhitespaceManager::Change::NewlinesBefore

Definition at line 120 of file WhitespaceManager.h.

SourceRange clang::format::WhitespaceManager::Change::OriginalWhitespaceRange
unsigned clang::format::WhitespaceManager::Change::PreviousEndOfTokenColumn

Definition at line 152 of file WhitespaceManager.h.

std::string clang::format::WhitespaceManager::Change::PreviousLinePostfix

Definition at line 121 of file WhitespaceManager.h.

int clang::format::WhitespaceManager::Change::Spaces

Definition at line 141 of file WhitespaceManager.h.

const Change* clang::format::WhitespaceManager::Change::StartOfBlockComment

Definition at line 163 of file WhitespaceManager.h.

unsigned clang::format::WhitespaceManager::Change::StartOfTokenColumn

Definition at line 119 of file WhitespaceManager.h.

unsigned clang::format::WhitespaceManager::Change::TokenLength

Definition at line 151 of file WhitespaceManager.h.


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