struct ParenState
Declaration
struct ParenState { /* full declaration omitted */ };
Declared at: clang/lib/Format/ContinuationIndenter.h:201
Member Variables
- public const clang::format::FormatToken* Tok
- Not considered for memoization as it will always have the same value at the same token.
- public unsigned int Indent
- The position to which a specific parenthesis level needs to be indented.
- public unsigned int LastSpace
- Used e.g. to break like: functionCall(Parameter, otherCall( OtherParameter));
- public unsigned int NestedBlockIndent
- If a block relative to this parenthesis level gets wrapped, indent it this much.
- public unsigned int FirstLessLess = 0
- Used to align "<<" operators. 0 if no such operator has been encountered on a level.
- public unsigned int QuestionColumn = 0
- The column of a \c ? in a conditional expression;
- public unsigned int ColonPos = 0
- The position of the colon in an ObjC method declaration/call.
- public unsigned int StartOfFunctionCall = 0
- The start of the most recent function in a builder-type call.
- public unsigned int StartOfArraySubscripts = 0
- Contains the start of array subscript expressions, so that they can be aligned.
- public unsigned int NestedNameSpecifierContinuation = 0
- If a nested name specifier was broken over multiple lines, this contains the start column of the second line. Otherwise 0.
- public unsigned int CallContinuation = 0
- If a call expression was broken over multiple lines, this contains the start column of the second line. Otherwise 0.
- public unsigned int VariablePos = 0
- Used to align further variables if necessary.
- public bool IsAligned
- Whether this block's indentation is used for alignment.
- public bool BreakBeforeClosingBrace
- We only want to insert a newline before the closing brace if there also was a newline after the beginning left brace.
- public bool BreakBeforeClosingParen
- We only want to insert a newline before the closing paren if there also was a newline after the beginning left paren.
- public bool AvoidBinPacking
- Avoid bin packing, i.e. multiple parameters/elements on multiple lines, in this context.
- public bool BreakBeforeParameter
- Break after the next comma (or all the commas in this context if\c AvoidBinPacking is \c true).
- public bool NoLineBreak
- Line breaking in this context would break a formatting rule.
- public bool NoLineBreakInOperand
- Same as \c NoLineBreak, but is restricted until the end of the operand (including the next ",").
- public bool LastOperatorWrapped
- True if the last binary operator on this level was wrapped to the next line.
- public bool ContainsLineBreak
- The first line break in a certain \c ParenState causes extra penalty so that clang-format prefers similar breaks, i.e. breaks in the same parenthesis.
- public bool ContainsUnwrappedBuilder
- \c true if this \c ParenState contains multiple segments of a builder-type call on one line.
- public bool AlignColons
- Not considered for memoization as it will always have the same value at the same token.
- public bool ObjCSelectorNameFound
- Not considered for memoization as it will always have the same value at the same token.
- public bool HasMultipleNestedBlocks
- Not considered for memoization as it will always have the same value at the same token.
- public bool NestedBlockInlined
- The start of a nested block (e.g. lambda introducer in C++ or "function" in JavaScript) is not wrapped to a new line.
- public bool IsInsideObjCArrayLiteral
- \c true if the current \c ParenState represents an Objective-C array literal.
- public bool IsCSharpGenericTypeConstraint
- public bool IsChainedConditional
- public bool IsWrappedConditional
- public bool UnindentOperator
Method Overview
- public ParenState(const clang::format::FormatToken * Tok, unsigned int Indent, unsigned int LastSpace, bool AvoidBinPacking, bool NoLineBreak)
Methods
ΒΆParenState(const clang::format::FormatToken* Tok,
unsigned int Indent,
unsigned int LastSpace,
bool AvoidBinPacking,
bool NoLineBreak)
ParenState(const clang::format::FormatToken* Tok,
unsigned int Indent,
unsigned int LastSpace,
bool AvoidBinPacking,
bool NoLineBreak)
Declared at: clang/lib/Format/ContinuationIndenter.h:202
Parameters
- const clang::format::FormatToken* Tok
- unsigned int Indent
- unsigned int LastSpace
- bool AvoidBinPacking
- bool NoLineBreak