clang 20.0.0git
|
Represents a change before a token, a break inside a token, or the layout of an unchanged token (or whitespace within). More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Format/WhitespaceManager.h"
Classes | |
class | IsBeforeInFile |
Functor to sort changes in original source order. More... | |
Public Member Functions | |
Change (const FormatToken &Tok, bool CreateReplacement, SourceRange OriginalWhitespaceRange, int Spaces, unsigned StartOfTokenColumn, unsigned NewlinesBefore, StringRef PreviousLinePostfix, StringRef CurrentLinePrefix, bool IsAligned, bool ContinuesPPDirective, bool IsInsideToken) | |
Creates a Change . | |
std::tuple< unsigned, unsigned, unsigned > | indentAndNestingLevel () const |
Represents a change before a token, a break inside a token, or the layout of an unchanged token (or whitespace within).
Definition at line 89 of file WhitespaceManager.h.
clang::format::WhitespaceManager::Change::Change | ( | const FormatToken & | Tok, |
bool | CreateReplacement, | ||
SourceRange | OriginalWhitespaceRange, | ||
int | Spaces, | ||
unsigned | StartOfTokenColumn, | ||
unsigned | NewlinesBefore, | ||
StringRef | PreviousLinePostfix, | ||
StringRef | CurrentLinePrefix, | ||
bool | IsAligned, | ||
bool | ContinuesPPDirective, | ||
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 34 of file WhitespaceManager.cpp.
|
inline |
Definition at line 169 of file WhitespaceManager.h.
References ConditionalsLevel, clang::format::FormatToken::IndentLevel, clang::format::FormatToken::NestingLevel, and Tok.
int clang::format::WhitespaceManager::Change::ConditionalsLevel |
Definition at line 164 of file WhitespaceManager.h.
Referenced by indentAndNestingLevel().
bool clang::format::WhitespaceManager::Change::ContinuesPPDirective |
Definition at line 130 of file WhitespaceManager.h.
bool clang::format::WhitespaceManager::Change::CreateReplacement |
Definition at line 121 of file WhitespaceManager.h.
std::string clang::format::WhitespaceManager::Change::CurrentLinePrefix |
Definition at line 128 of file WhitespaceManager.h.
unsigned clang::format::WhitespaceManager::Change::EscapedNewlineColumn |
Definition at line 149 of file WhitespaceManager.h.
int clang::format::WhitespaceManager::Change::IndentationOffset |
Definition at line 160 of file WhitespaceManager.h.
bool clang::format::WhitespaceManager::Change::IsAligned |
Definition at line 129 of file WhitespaceManager.h.
bool clang::format::WhitespaceManager::Change::IsInsideToken |
Definition at line 141 of file WhitespaceManager.h.
bool clang::format::WhitespaceManager::Change::IsTrailingComment |
Definition at line 146 of file WhitespaceManager.h.
unsigned clang::format::WhitespaceManager::Change::NewlinesBefore |
Definition at line 126 of file WhitespaceManager.h.
SourceRange clang::format::WhitespaceManager::Change::OriginalWhitespaceRange |
Definition at line 124 of file WhitespaceManager.h.
Referenced by clang::format::WhitespaceManager::Change::IsBeforeInFile::operator()().
unsigned clang::format::WhitespaceManager::Change::PreviousEndOfTokenColumn |
Definition at line 148 of file WhitespaceManager.h.
std::string clang::format::WhitespaceManager::Change::PreviousLinePostfix |
Definition at line 127 of file WhitespaceManager.h.
int clang::format::WhitespaceManager::Change::Spaces |
Definition at line 137 of file WhitespaceManager.h.
const Change* clang::format::WhitespaceManager::Change::StartOfBlockComment |
Definition at line 159 of file WhitespaceManager.h.
unsigned clang::format::WhitespaceManager::Change::StartOfTokenColumn |
Definition at line 125 of file WhitespaceManager.h.
const FormatToken* clang::format::WhitespaceManager::Change::Tok |
Definition at line 119 of file WhitespaceManager.h.
Referenced by indentAndNestingLevel().
unsigned clang::format::WhitespaceManager::Change::TokenLength |
Definition at line 147 of file WhitespaceManager.h.