clang
6.0.0
|
#include "/work/www-prereleases/6.0.0/rc2/docsbuild/llvm.src/tools/clang/lib/Format/ContinuationIndenter.h"
Public Member Functions | |
ParenState (unsigned Indent, unsigned LastSpace, bool AvoidBinPacking, bool NoLineBreak) | |
bool | operator< (const ParenState &Other) const |
Public Attributes | |
unsigned | Indent |
The position to which a specific parenthesis level needs to be indented. More... | |
unsigned | LastSpace |
The position of the last space on each level. More... | |
unsigned | NestedBlockIndent |
If a block relative to this parenthesis level gets wrapped, indent it this much. More... | |
unsigned | FirstLessLess = 0 |
The position the first "<<" operator encountered on each level. More... | |
unsigned | QuestionColumn = 0 |
The column of a ? in a conditional expression;. More... | |
unsigned | ColonPos = 0 |
The position of the colon in an ObjC method declaration/call. More... | |
unsigned | StartOfFunctionCall = 0 |
The start of the most recent function in a builder-type call. More... | |
unsigned | StartOfArraySubscripts = 0 |
Contains the start of array subscript expressions, so that they can be aligned. More... | |
unsigned | NestedNameSpecifierContinuation = 0 |
If a nested name specifier was broken over multiple lines, this contains the start column of the second line. More... | |
unsigned | CallContinuation = 0 |
If a call expression was broken over multiple lines, this contains the start column of the second line. More... | |
unsigned | VariablePos = 0 |
The column of the first variable name in a variable declaration. More... | |
bool | BreakBeforeClosingBrace: 1 |
Whether a newline needs to be inserted before the block's closing brace. More... | |
bool | AvoidBinPacking: 1 |
Avoid bin packing, i.e. More... | |
bool | BreakBeforeParameter: 1 |
Break after the next comma (or all the commas in this context if AvoidBinPacking is true ). More... | |
bool | NoLineBreak: 1 |
Line breaking in this context would break a formatting rule. More... | |
bool | NoLineBreakInOperand: 1 |
Same as NoLineBreak , but is restricted until the end of the operand (including the next ","). More... | |
bool | LastOperatorWrapped: 1 |
True if the last binary operator on this level was wrapped to the next line. More... | |
bool | ContainsLineBreak: 1 |
true if this ParenState already contains a line-break. More... | |
bool | ContainsUnwrappedBuilder: 1 |
true if this ParenState contains multiple segments of a builder-type call on one line. More... | |
bool | AlignColons: 1 |
true if the colons of the curren ObjC method expression should be aligned. More... | |
bool | ObjCSelectorNameFound: 1 |
true if at least one selector name was found in the current ObjC method expression. More... | |
bool | HasMultipleNestedBlocks: 1 |
true if there are multiple nested blocks inside these parens. More... | |
bool | NestedBlockInlined: 1 |
Definition at line 198 of file ContinuationIndenter.h.
|
inline |
Definition at line 199 of file ContinuationIndenter.h.
|
inline |
Definition at line 317 of file ContinuationIndenter.h.
References AvoidBinPacking, BreakBeforeClosingBrace, BreakBeforeParameter, CallContinuation, ColonPos, ContainsLineBreak, ContainsUnwrappedBuilder, FirstLessLess, Indent, LastOperatorWrapped, LastSpace, NestedBlockIndent, NestedBlockInlined, NoLineBreak, QuestionColumn, StartOfArraySubscripts, StartOfFunctionCall, and VariablePos.
bool clang::format::ParenState::AlignColons |
true
if the colons of the curren ObjC method expression should be aligned.
Not considered for memoization as it will always have the same value at the same token.
Definition at line 298 of file ContinuationIndenter.h.
bool clang::format::ParenState::AvoidBinPacking |
Avoid bin packing, i.e.
multiple parameters/elements on multiple lines, in this context.
Definition at line 265 of file ContinuationIndenter.h.
Referenced by operator<().
bool clang::format::ParenState::BreakBeforeClosingBrace |
Whether a newline needs to be inserted before the block's closing brace.
We only want to insert a newline before the closing brace if there also was a newline after the beginning left brace.
Definition at line 261 of file ContinuationIndenter.h.
Referenced by operator<().
bool clang::format::ParenState::BreakBeforeParameter |
Break after the next comma (or all the commas in this context if AvoidBinPacking
is true
).
Definition at line 269 of file ContinuationIndenter.h.
Referenced by operator<().
unsigned clang::format::ParenState::CallContinuation = 0 |
If a call expression was broken over multiple lines, this contains the start column of the second line.
Otherwise 0.
Definition at line 249 of file ContinuationIndenter.h.
Referenced by operator<().
unsigned clang::format::ParenState::ColonPos = 0 |
The position of the colon in an ObjC method declaration/call.
Definition at line 234 of file ContinuationIndenter.h.
Referenced by operator<().
bool clang::format::ParenState::ContainsLineBreak |
true
if this ParenState
already contains a line-break.
The first line break in a certain ParenState
causes extra penalty so that clang-format prefers similar breaks, i.e. breaks in the same parenthesis.
Definition at line 287 of file ContinuationIndenter.h.
Referenced by operator<().
bool clang::format::ParenState::ContainsUnwrappedBuilder |
true
if this ParenState
contains multiple segments of a builder-type call on one line.
Definition at line 291 of file ContinuationIndenter.h.
Referenced by operator<().
unsigned clang::format::ParenState::FirstLessLess = 0 |
The position the first "<<" operator encountered on each level.
Used to align "<<" operators. 0 if no such operator has been encountered on a level.
Definition at line 228 of file ContinuationIndenter.h.
Referenced by operator<().
bool clang::format::ParenState::HasMultipleNestedBlocks |
true
if there are multiple nested blocks inside these parens.
Not considered for memoization as it will always have the same value at the same token.
Definition at line 311 of file ContinuationIndenter.h.
unsigned clang::format::ParenState::Indent |
The position to which a specific parenthesis level needs to be indented.
Definition at line 211 of file ContinuationIndenter.h.
Referenced by operator<().
bool clang::format::ParenState::LastOperatorWrapped |
True if the last binary operator on this level was wrapped to the next line.
Definition at line 280 of file ContinuationIndenter.h.
Referenced by operator<().
unsigned clang::format::ParenState::LastSpace |
The position of the last space on each level.
Used e.g. to break like: functionCall(Parameter, otherCall( OtherParameter));
Definition at line 218 of file ContinuationIndenter.h.
Referenced by operator<().
unsigned clang::format::ParenState::NestedBlockIndent |
If a block relative to this parenthesis level gets wrapped, indent it this much.
Definition at line 222 of file ContinuationIndenter.h.
Referenced by operator<().
bool clang::format::ParenState::NestedBlockInlined |
Definition at line 315 of file ContinuationIndenter.h.
Referenced by operator<().
unsigned clang::format::ParenState::NestedNameSpecifierContinuation = 0 |
If a nested name specifier was broken over multiple lines, this contains the start column of the second line.
Otherwise 0.
Definition at line 245 of file ContinuationIndenter.h.
bool clang::format::ParenState::NoLineBreak |
Line breaking in this context would break a formatting rule.
Definition at line 272 of file ContinuationIndenter.h.
Referenced by operator<().
bool clang::format::ParenState::NoLineBreakInOperand |
Same as NoLineBreak
, but is restricted until the end of the operand (including the next ",").
Definition at line 276 of file ContinuationIndenter.h.
bool clang::format::ParenState::ObjCSelectorNameFound |
true
if at least one selector name was found in the current ObjC method expression.
Not considered for memoization as it will always have the same value at the same token.
Definition at line 305 of file ContinuationIndenter.h.
unsigned clang::format::ParenState::QuestionColumn = 0 |
The column of a ? in a conditional expression;.
Definition at line 231 of file ContinuationIndenter.h.
Referenced by operator<().
unsigned clang::format::ParenState::StartOfArraySubscripts = 0 |
Contains the start of array subscript expressions, so that they can be aligned.
Definition at line 241 of file ContinuationIndenter.h.
Referenced by operator<().
unsigned clang::format::ParenState::StartOfFunctionCall = 0 |
The start of the most recent function in a builder-type call.
Definition at line 237 of file ContinuationIndenter.h.
Referenced by operator<().
unsigned clang::format::ParenState::VariablePos = 0 |
The column of the first variable name in a variable declaration.
Used to align further variables if necessary.
Definition at line 254 of file ContinuationIndenter.h.
Referenced by operator<().