clang 20.0.0git
|
An unwrapped line is a sequence of Token
, that we would like to put on a single line if there was no column limit.
More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Format/UnwrappedLineParser.h"
Public Member Functions | |
UnwrappedLine ()=default | |
Public Attributes | |
std::list< UnwrappedLineNode > | Tokens |
The Tokens comprising this UnwrappedLine . | |
unsigned | Level = 0 |
The indent level of the UnwrappedLine . | |
unsigned | PPLevel = 0 |
The PPBranchLevel (adjusted for header guards) if this line is a InMacroBody line, and 0 otherwise. | |
bool | InPPDirective = false |
Whether this UnwrappedLine is part of a preprocessor directive. | |
bool | InPragmaDirective = false |
Whether this UnwrappedLine is part of a pramga directive. | |
bool | InMacroBody = false |
Whether it is part of a macro body. | |
unsigned | UnbracedBodyLevel = 0 |
Nesting level of unbraced body of a control statement. | |
bool | MustBeDeclaration = false |
bool | SeenDecltypeAuto = false |
Whether the parser has seen decltype(auto) in this line. | |
bool | IsContinuation = false |
True if this line should be indented by ContinuationIndent in addition to the normal indention level. | |
size_t | MatchingOpeningBlockLineIndex = kInvalidIndex |
If this UnwrappedLine closes a block in a sequence of lines, MatchingOpeningBlockLineIndex stores the index of the corresponding opening line. | |
size_t | MatchingClosingBlockLineIndex = kInvalidIndex |
If this UnwrappedLine opens a block, stores the index of the line with the corresponding closing brace. | |
unsigned | FirstStartColumn = 0 |
Static Public Attributes | |
static const size_t | kInvalidIndex = -1 |
An unwrapped line is a sequence of Token
, that we would like to put on a single line if there was no column limit.
This is used as a main interface between the UnwrappedLineParser
and the UnwrappedLineFormatter
. The key property is that changing the formatting within an unwrapped line does not affect any other unwrapped lines.
Definition at line 32 of file UnwrappedLineParser.h.
|
default |
unsigned clang::format::UnwrappedLine::FirstStartColumn = 0 |
Definition at line 76 of file UnwrappedLineParser.h.
Whether it is part of a macro body.
Definition at line 50 of file UnwrappedLineParser.h.
Referenced by clang::format::ScopedMacroState::~ScopedMacroState().
Whether this UnwrappedLine
is part of a preprocessor directive.
Definition at line 46 of file UnwrappedLineParser.h.
Referenced by clang::format::ScopedMacroState::~ScopedMacroState().
Whether this UnwrappedLine
is part of a pramga directive.
Definition at line 48 of file UnwrappedLineParser.h.
True
if this line should be indented by ContinuationIndent in addition to the normal indention level.
Definition at line 62 of file UnwrappedLineParser.h.
|
static |
Definition at line 74 of file UnwrappedLineParser.h.
Referenced by clang::format::getNamespaceToken().
unsigned clang::format::UnwrappedLine::Level = 0 |
The indent level of the UnwrappedLine
.
Definition at line 39 of file UnwrappedLineParser.h.
Referenced by clang::format::ScopedMacroState::~ScopedMacroState().
size_t clang::format::UnwrappedLine::MatchingClosingBlockLineIndex = kInvalidIndex |
If this UnwrappedLine
opens a block, stores the index of the line with the corresponding closing brace.
Definition at line 72 of file UnwrappedLineParser.h.
size_t clang::format::UnwrappedLine::MatchingOpeningBlockLineIndex = kInvalidIndex |
If this UnwrappedLine
closes a block in a sequence of lines, MatchingOpeningBlockLineIndex
stores the index of the corresponding opening line.
Otherwise, MatchingOpeningBlockLineIndex
must be kInvalidIndex
.
Definition at line 68 of file UnwrappedLineParser.h.
Definition at line 55 of file UnwrappedLineParser.h.
unsigned clang::format::UnwrappedLine::PPLevel = 0 |
The PPBranchLevel
(adjusted for header guards) if this line is a InMacroBody
line, and 0 otherwise.
Definition at line 43 of file UnwrappedLineParser.h.
Whether the parser has seen decltype(auto)
in this line.
Definition at line 58 of file UnwrappedLineParser.h.
std::list<UnwrappedLineNode> clang::format::UnwrappedLine::Tokens |
The Tokens
comprising this UnwrappedLine
.
Definition at line 36 of file UnwrappedLineParser.h.
unsigned clang::format::UnwrappedLine::UnbracedBodyLevel = 0 |
Nesting level of unbraced body of a control statement.
Definition at line 53 of file UnwrappedLineParser.h.