clang API Documentation
A wrapper around a Token
storing information about the whitespace characters preceding it.
More...
#include <FormatToken.h>
Public Member Functions | |
FormatToken () | |
SourceLocation | getStartOfNonWhitespace () const |
Returns actual token start location without leading escaped newlines and whitespace. | |
bool | is (tok::TokenKind Kind) const |
bool | is (const IdentifierInfo *II) const |
template<typename T > | |
bool | isOneOf (T K1, T K2) const |
template<typename T > | |
bool | isOneOf (T K1, T K2, T K3) const |
template<typename T > | |
bool | isOneOf (T K1, T K2, T K3, T K4, T K5=tok::NUM_TOKENS, T K6=tok::NUM_TOKENS, T K7=tok::NUM_TOKENS, T K8=tok::NUM_TOKENS, T K9=tok::NUM_TOKENS, T K10=tok::NUM_TOKENS, T K11=tok::NUM_TOKENS, T K12=tok::NUM_TOKENS) const |
template<typename T > | |
bool | isNot (T Kind) const |
bool | isNot (IdentifierInfo *II) const |
bool | isStringLiteral () const |
bool | isObjCAtKeyword (tok::ObjCKeywordKind Kind) const |
bool | isAccessSpecifier (bool ColonRequired=true) const |
bool | isSimpleTypeSpecifier () const |
Determine whether the token is a simple-type-specifier. | |
bool | isObjCAccessSpecifier () const |
bool | opensScope () const |
Returns whether Tok is ([{ or a template opening <. | |
bool | closesScope () const |
Returns whether Tok is )]} or a template closing >. | |
bool | isMemberAccess () const |
Returns true if this is a "." or "->" accessing a member. | |
bool | isUnaryOperator () const |
bool | isBinaryOperator () const |
bool | isTrailingComment () const |
bool | isFunctionLikeKeyword () const |
Returns true if this is a keyword that can be used like a function call (e.g. sizeof, typeid, ...). | |
prec::Level | getPrecedence () const |
FormatToken * | getPreviousNonComment () const |
Returns the previous token ignoring comments. | |
const FormatToken * | getNextNonComment () const |
Returns the next token ignoring comments. | |
bool | opensBlockTypeList (const FormatStyle &Style) const |
Returns true if this tokens starts a block-type list, i.e. a list that should be indented with a block indent. | |
bool | closesBlockTypeList (const FormatStyle &Style) const |
Same as opensBlockTypeList, but for the closing token. | |
Public Attributes | |
Token | Tok |
The Token . | |
unsigned | NewlinesBefore |
The number of newlines immediately before the Token . | |
bool | HasUnescapedNewline |
Whether there is at least one unescaped newline before the Token . | |
SourceRange | WhitespaceRange |
The range of the whitespace immediately preceding the Token . | |
unsigned | LastNewlineOffset |
The offset just past the last ' ' in this token's leading whitespace (relative to WhiteSpaceStart ). 0 if there is no ''. | |
unsigned | ColumnWidth |
The width of the non-whitespace parts of the token (or its first line for multi-line tokens) in columns. We need this to correctly measure number of columns a token spans. | |
unsigned | LastLineColumnWidth |
Contains the width in columns of the last line of a multi-line token. | |
bool | IsMultiline |
Whether the token text contains newlines (escaped or not). | |
bool | IsFirst |
Indicates that this is the first token. | |
bool | MustBreakBefore |
Whether there must be a line break before this token. | |
StringRef | TokenText |
The raw text of the token. | |
bool | IsUnterminatedLiteral |
Set to true if this token is an unterminated literal. | |
BraceBlockKind | BlockKind |
Contains the kind of block if this token is a brace. | |
TokenType | Type |
unsigned | SpacesRequiredBefore |
The number of spaces that should be inserted before this token. | |
bool | CanBreakBefore |
true if it is allowed to break before this token. | |
bool | ClosesTemplateDeclaration |
unsigned | ParameterCount |
Number of parameters, if this is "(", "[" or "<". | |
unsigned | BlockParameterCount |
Number of parameters that are nested blocks, if this is "(", "[" or "<". | |
std::unique_ptr< TokenRole > | Role |
A token can have a special role that can carry extra information about the token's formatting. | |
ParameterPackingKind | PackingKind |
If this is an opening parenthesis, how are the parameters packed? | |
unsigned | TotalLength |
The total length of the unwrapped line up to and including this token. | |
unsigned | OriginalColumn |
The original 0-based column of this token, including expanded tabs. The configured TabWidth is used as tab width. | |
unsigned | UnbreakableTailLength |
The length of following tokens until the next natural split point, or the next token that can be broken. | |
unsigned | BindingStrength |
The binding strength of a token. This is a combined value of operator precedence, parenthesis nesting, etc. | |
unsigned | NestingLevel |
The nesting level of this token, i.e. the number of surrounding (), [], {} or <>. | |
unsigned | SplitPenalty |
Penalty for inserting a line break before this token. | |
unsigned | LongestObjCSelectorName |
If this is the first ObjC selector name in an ObjC method definition or call, this contains the length of the longest name. | |
SmallVector< prec::Level, 4 > | FakeLParens |
Stores the number of required fake parentheses and the corresponding operator precedence. | |
unsigned | FakeRParens |
Insert this many fake ) after this token for correct indentation. | |
bool | StartsBinaryExpression |
true if this token starts a binary expression, i.e. has at least one fake l_paren with a precedence greater than prec::Unknown. | |
bool | EndsBinaryExpression |
true if this token ends a binary expression. | |
unsigned | OperatorIndex |
Is this is an operator (or "."/"->") in a sequence of operators with the same precedence, contains the 0-based operator index. | |
bool | LastOperator |
Is this the last operator (or "."/"->") in a sequence of operators with the same precedence? | |
bool | PartOfMultiVariableDeclStmt |
Is this token part of a DeclStmt defining multiple variables? | |
bool | IsForEachMacro |
Is this a foreach macro? | |
FormatToken * | MatchingParen |
FormatToken * | Previous |
FormatToken * | Next |
SmallVector< AnnotatedLine *, 1 > | Children |
FormatDecision | Decision |
Stores the formatting decision for the token once it was made. | |
bool | Finalized |
If true , this token has been fully formatted (indented and potentially re-formatted inside), and we do not allow further formatting changes. |
A wrapper around a Token
storing information about the whitespace characters preceding it.
Definition at line 103 of file FormatToken.h.
clang::format::FormatToken::FormatToken | ( | ) | [inline] |
Definition at line 104 of file FormatToken.h.
bool clang::format::FormatToken::closesBlockTypeList | ( | const FormatStyle & | Style | ) | const [inline] |
Same as opensBlockTypeList, but for the closing token.
Definition at line 419 of file FormatToken.h.
References MatchingParen, and opensBlockTypeList().
Referenced by clang::format::ContinuationIndenter::canBreak(), and clang::format::ContinuationIndenter::mustBreak().
bool clang::format::FormatToken::closesScope | ( | ) | const [inline] |
Returns whether Tok
is )]} or a template closing >.
Definition at line 331 of file FormatToken.h.
References isOneOf(), and clang::format::TT_TemplateCloser.
Referenced by clang::format::startsSegmentOfBuilderTypeCall().
const FormatToken* clang::format::FormatToken::getNextNonComment | ( | ) | const [inline] |
Returns the next token ignoring comments.
Definition at line 402 of file FormatToken.h.
References is(), Next, and Tok.
Referenced by clang::format::CommaSeparatedList::precomputeFormattingInfos().
prec::Level clang::format::FormatToken::getPrecedence | ( | ) | const [inline] |
Definition at line 389 of file FormatToken.h.
References clang::getBinOpPrecedence(), clang::Token::getKind(), and Tok.
Referenced by isBinaryOperator(), and clang::format::ContinuationIndenter::mustBreak().
FormatToken* clang::format::FormatToken::getPreviousNonComment | ( | ) | const [inline] |
Returns the previous token ignoring comments.
Definition at line 394 of file FormatToken.h.
References is(), Previous, and Tok.
Referenced by clang::format::CommaSeparatedList::precomputeFormattingInfos().
SourceLocation clang::format::FormatToken::getStartOfNonWhitespace | ( | ) | const [inline] |
Returns actual token start location without leading escaped newlines and whitespace.
This can be different to Tok.getLocation(), which includes leading escaped newlines.
Definition at line 166 of file FormatToken.h.
References clang::SourceRange::getEnd(), and WhitespaceRange.
Referenced by clang::format::WhitespaceManager::replaceWhitespaceInToken().
bool clang::format::FormatToken::is | ( | tok::TokenKind | Kind | ) | const [inline] |
Definition at line 272 of file FormatToken.h.
References clang::Token::is(), and Tok.
Referenced by clang::format::ContinuationIndenter::canBreak(), getNextNonComment(), getPreviousNonComment(), isAccessSpecifier(), clang::format::isAllmanBrace(), clang::format::isFunctionDeclarationName(), isObjCAccessSpecifier(), isOneOf(), isTrailingComment(), clang::format::ContinuationIndenter::mustBreak(), opensBlockTypeList(), clang::format::CommaSeparatedList::precomputeFormattingInfos(), clang::format::TokenAnnotator::setCommentLineLevels(), and clang::format::startsNextParameter().
bool clang::format::FormatToken::is | ( | const IdentifierInfo * | II | ) | const [inline] |
Definition at line 274 of file FormatToken.h.
References clang::Token::getIdentifierInfo(), and Tok.
bool clang::format::FormatToken::isAccessSpecifier | ( | bool | ColonRequired = true | ) | const [inline] |
Definition at line 310 of file FormatToken.h.
bool clang::format::FormatToken::isBinaryOperator | ( | ) | const [inline] |
Definition at line 359 of file FormatToken.h.
References clang::prec::Comma, and getPrecedence().
bool clang::format::FormatToken::isFunctionLikeKeyword | ( | ) | const [inline] |
Returns true
if this is a keyword that can be used like a function call (e.g. sizeof, typeid, ...).
Definition at line 371 of file FormatToken.h.
References clang::Token::getKind(), and Tok.
bool clang::format::FormatToken::isMemberAccess | ( | ) | const [inline] |
Returns true
if this is a "." or "->" accessing a member.
Definition at line 337 of file FormatToken.h.
References isOneOf(), clang::format::TT_DesignatedInitializerPeriod, and clang::format::TT_TrailingReturnArrow.
Referenced by clang::format::ContinuationIndenter::canBreak(), and clang::format::startsSegmentOfBuilderTypeCall().
bool clang::format::FormatToken::isNot | ( | T | Kind | ) | const [inline] |
Definition at line 299 of file FormatToken.h.
References clang::Token::isNot(), and Tok.
Referenced by clang::format::ContinuationIndenter::canBreak(), clang::format::CommaSeparatedList::formatAfterToken(), clang::format::ContinuationIndenter::mustBreak(), clang::format::CommaSeparatedList::precomputeFormattingInfos(), and clang::format::TokenAnnotator::setCommentLineLevels().
bool clang::format::FormatToken::isNot | ( | IdentifierInfo * | II | ) | const [inline] |
Definition at line 302 of file FormatToken.h.
References clang::Token::getIdentifierInfo(), and Tok.
bool clang::format::FormatToken::isObjCAccessSpecifier | ( | ) | const [inline] |
Definition at line 318 of file FormatToken.h.
References is(), isObjCAtKeyword(), and Next.
bool clang::format::FormatToken::isObjCAtKeyword | ( | tok::ObjCKeywordKind | Kind | ) | const [inline] |
Definition at line 306 of file FormatToken.h.
References clang::Token::isObjCAtKeyword(), and Tok.
Referenced by isObjCAccessSpecifier().
bool clang::format::FormatToken::isOneOf | ( | T | K1, |
T | K2 | ||
) | const [inline] |
Definition at line 279 of file FormatToken.h.
References is().
Referenced by clang::format::TokenAnnotator::calculateFormattingInformation(), clang::format::ContinuationIndenter::canBreak(), closesScope(), clang::format::fakeRParenSpecialCase(), isAccessSpecifier(), isMemberAccess(), clang::format::ContinuationIndenter::mustBreak(), opensScope(), and clang::format::ShouldBreakBeforeBrace().
bool clang::format::FormatToken::isOneOf | ( | T | K1, |
T | K2, | ||
T | K3 | ||
) | const [inline] |
Definition at line 284 of file FormatToken.h.
References is().
bool clang::format::FormatToken::isOneOf | ( | T | K1, |
T | K2, | ||
T | K3, | ||
T | K4, | ||
T | K5 = tok::NUM_TOKENS , |
||
T | K6 = tok::NUM_TOKENS , |
||
T | K7 = tok::NUM_TOKENS , |
||
T | K8 = tok::NUM_TOKENS , |
||
T | K9 = tok::NUM_TOKENS , |
||
T | K10 = tok::NUM_TOKENS , |
||
T | K11 = tok::NUM_TOKENS , |
||
T | K12 = tok::NUM_TOKENS |
||
) | const [inline] |
Definition at line 289 of file FormatToken.h.
References is().
Determine whether the token is a simple-type-specifier.
Definition at line 27 of file FormatToken.cpp.
References clang::Token::getKind(), and Tok.
bool clang::format::FormatToken::isStringLiteral | ( | ) | const [inline] |
Definition at line 304 of file FormatToken.h.
References clang::Token::getKind(), and Tok.
bool clang::format::FormatToken::isTrailingComment | ( | ) | const [inline] |
Definition at line 364 of file FormatToken.h.
References is(), NewlinesBefore, Next, and clang::format::TT_LineComment.
Referenced by clang::format::TokenAnnotator::calculateFormattingInformation(), clang::format::CommaSeparatedList::formatAfterToken(), clang::format::ContinuationIndenter::mustBreak(), clang::format::CommaSeparatedList::precomputeFormattingInfos(), and clang::format::startsNextParameter().
bool clang::format::FormatToken::isUnaryOperator | ( | ) | const [inline] |
Definition at line 343 of file FormatToken.h.
References clang::Token::getKind(), and Tok.
bool clang::format::FormatToken::opensBlockTypeList | ( | const FormatStyle & | Style | ) | const [inline] |
Returns true
if this tokens starts a block-type list, i.e. a list that should be indented with a block indent.
Definition at line 411 of file FormatToken.h.
References clang::format::BK_Block, BlockKind, clang::format::FormatStyle::Cpp11BracedListStyle, is(), clang::format::TT_ArrayInitializerLSquare, and clang::format::TT_DictLiteral.
Referenced by closesBlockTypeList().
bool clang::format::FormatToken::opensScope | ( | ) | const [inline] |
Returns whether Tok
is ([{ or a template opening <.
Definition at line 326 of file FormatToken.h.
References isOneOf(), and clang::format::TT_TemplateOpener.
Referenced by clang::format::TokenAnnotator::calculateFormattingInformation(), and clang::format::ContinuationIndenter::canBreak().
The binding strength of a token. This is a combined value of operator precedence, parenthesis nesting, etc.
Definition at line 225 of file FormatToken.h.
Referenced by clang::format::TokenAnnotator::calculateFormattingInformation().
Contains the kind of block if this token is a brace.
Definition at line 180 of file FormatToken.h.
Referenced by clang::format::TokenAnnotator::calculateFormattingInformation(), clang::format::ContinuationIndenter::canBreak(), clang::format::fakeRParenSpecialCase(), clang::format::CommaSeparatedList::formatAfterToken(), clang::format::isAllmanBrace(), clang::format::ContinuationIndenter::mustBreak(), and opensBlockTypeList().
Number of parameters that are nested blocks, if this is "(", "[" or "<".
Definition at line 201 of file FormatToken.h.
true
if it is allowed to break before this token.
Definition at line 188 of file FormatToken.h.
Referenced by clang::format::TokenAnnotator::annotate(), clang::format::TokenAnnotator::calculateFormattingInformation(), clang::format::ContinuationIndenter::canBreak(), clang::format::getLengthToMatchingParen(), and clang::format::CommaSeparatedList::precomputeFormattingInfos().
SmallVector<AnnotatedLine *, 1> clang::format::FormatToken::Children |
Definition at line 428 of file FormatToken.h.
Referenced by clang::format::AnnotatedLine::AnnotatedLine(), and clang::format::TokenAnnotator::calculateFormattingInformation().
Definition at line 190 of file FormatToken.h.
Referenced by clang::format::ContinuationIndenter::mustBreak().
The width of the non-whitespace parts of the token (or its first line for multi-line tokens) in columns. We need this to correctly measure number of columns a token spans.
Definition at line 143 of file FormatToken.h.
Referenced by clang::format::TokenAnnotator::calculateFormattingInformation(), clang::format::CodePointsBetween(), and clang::format::CommaSeparatedList::formatAfterToken().
Stores the formatting decision for the token once it was made.
Definition at line 431 of file FormatToken.h.
Referenced by clang::format::WhitespaceManager::replaceWhitespace().
true
if this token ends a binary expression.
Definition at line 254 of file FormatToken.h.
Referenced by clang::format::ContinuationIndenter::mustBreak().
SmallVector<prec::Level, 4> clang::format::FormatToken::FakeLParens |
Stores the number of required fake parentheses and the corresponding operator precedence.
If multiple fake parentheses start at a token, this vector stores them in reverse order, i.e. inner fake parenthesis first.
Definition at line 246 of file FormatToken.h.
Insert this many fake ) after this token for correct indentation.
Definition at line 248 of file FormatToken.h.
Referenced by clang::format::consumeRParens().
If true
, this token has been fully formatted (indented and potentially re-formatted inside), and we do not allow further formatting changes.
Definition at line 436 of file FormatToken.h.
Referenced by clang::format::WhitespaceManager::addUntouchableToken(), clang::format::WhitespaceManager::replaceWhitespace(), and clang::format::WhitespaceManager::replaceWhitespaceInToken().
Whether there is at least one unescaped newline before the Token
.
Definition at line 131 of file FormatToken.h.
Referenced by clang::format::TokenAnnotator::calculateFormattingInformation(), and clang::format::CommaSeparatedList::precomputeFormattingInfos().
Indicates that this is the first token.
Definition at line 153 of file FormatToken.h.
Referenced by clang::format::WhitespaceManager::addUntouchableToken(), clang::format::WhitespaceManager::replaceWhitespace(), and clang::format::WhitespaceManager::replaceWhitespaceInToken().
Is this a foreach macro?
Definition at line 270 of file FormatToken.h.
Whether the token text contains newlines (escaped or not).
Definition at line 150 of file FormatToken.h.
Referenced by clang::format::TokenAnnotator::calculateFormattingInformation().
Set to true
if this token is an unterminated literal.
Definition at line 177 of file FormatToken.h.
Contains the width in columns of the last line of a multi-line token.
Definition at line 147 of file FormatToken.h.
The offset just past the last '
' in this token's leading whitespace (relative to WhiteSpaceStart
). 0 if there is no '
'.
Definition at line 138 of file FormatToken.h.
Is this the last operator (or "."/"->") in a sequence of operators with the same precedence?
Definition at line 262 of file FormatToken.h.
If this is the first ObjC selector name in an ObjC method definition or call, this contains the length of the longest name.
This being set to 0 means that the selectors should not be colon-aligned, e.g. because several of them are block-type.
Definition at line 239 of file FormatToken.h.
Definition at line 423 of file FormatToken.h.
Referenced by closesBlockTypeList(), clang::format::fakeRParenSpecialCase(), clang::format::CommaSeparatedList::formatAfterToken(), clang::format::getLengthToMatchingParen(), clang::format::isFunctionDeclarationName(), and clang::format::CommaSeparatedList::precomputeFormattingInfos().
Whether there must be a line break before this token.
This happens for example when a preprocessor directive ended directly before the token.
Definition at line 159 of file FormatToken.h.
Referenced by clang::format::TokenAnnotator::annotate(), clang::format::TokenAnnotator::calculateFormattingInformation(), clang::format::ContinuationIndenter::canBreak(), clang::format::CommaSeparatedList::formatAfterToken(), clang::format::ContinuationIndenter::mustBreak(), and clang::format::CommaSeparatedList::precomputeFormattingInfos().
The nesting level of this token, i.e. the number of surrounding (), [], {} or <>.
Definition at line 229 of file FormatToken.h.
Referenced by clang::format::ContinuationIndenter::canBreak(), clang::format::isFunctionDeclarationName(), clang::format::ContinuationIndenter::mustBreak(), and clang::format::CommaSeparatedList::precomputeFormattingInfos().
The number of newlines immediately before the Token
.
This can be used to determine what the user wrote in the original code and thereby e.g. leave an empty line between two function definitions.
Definition at line 127 of file FormatToken.h.
Referenced by clang::format::WhitespaceManager::addUntouchableToken(), and isTrailingComment().
Definition at line 426 of file FormatToken.h.
Referenced by clang::format::AnnotatedLine::AnnotatedLine(), clang::format::TokenAnnotator::calculateFormattingInformation(), clang::format::CommaSeparatedList::formatAfterToken(), clang::format::getLengthToMatchingParen(), getNextNonComment(), isAccessSpecifier(), clang::format::isFunctionDeclarationName(), isObjCAccessSpecifier(), isTrailingComment(), and clang::format::CommaSeparatedList::precomputeFormattingInfos().
Is this is an operator (or "."/"->") in a sequence of operators with the same precedence, contains the 0-based operator index.
Definition at line 258 of file FormatToken.h.
The original 0-based column of this token, including expanded tabs. The configured TabWidth is used as tab width.
Definition at line 216 of file FormatToken.h.
Referenced by clang::format::WhitespaceManager::addUntouchableToken().
If this is an opening parenthesis, how are the parameters packed?
Definition at line 208 of file FormatToken.h.
Number of parameters, if this is "(", "[" or "<".
This is initialized to 1 as we don't need to distinguish functions with 0 parameters from functions with 1 parameter. Thus, we can simply count the number of commas.
Definition at line 197 of file FormatToken.h.
Is this token part of a DeclStmt
defining multiple variables?
Only set if Type
== TT_StartOfName
.
Definition at line 267 of file FormatToken.h.
Definition at line 425 of file FormatToken.h.
Referenced by clang::format::ContinuationIndenter::addTokenToState(), clang::format::AnnotatedLine::AnnotatedLine(), clang::format::TokenAnnotator::calculateFormattingInformation(), clang::format::ContinuationIndenter::canBreak(), clang::format::CommaSeparatedList::formatAfterToken(), getPreviousNonComment(), clang::format::ContinuationIndenter::mustBreak(), clang::format::CommaSeparatedList::precomputeFormattingInfos(), clang::format::startsNextParameter(), and clang::format::startsSegmentOfBuilderTypeCall().
std::unique_ptr<TokenRole> clang::format::FormatToken::Role |
A token can have a special role that can carry extra information about the token's formatting.
Definition at line 205 of file FormatToken.h.
Referenced by clang::format::TokenAnnotator::calculateFormattingInformation().
The number of spaces that should be inserted before this token.
Definition at line 185 of file FormatToken.h.
Referenced by clang::format::TokenAnnotator::annotate(), and clang::format::TokenAnnotator::calculateFormattingInformation().
Penalty for inserting a line break before this token.
Definition at line 232 of file FormatToken.h.
Referenced by clang::format::TokenAnnotator::calculateFormattingInformation().
true
if this token starts a binary expression, i.e. has at least one fake l_paren with a precedence greater than prec::Unknown.
Definition at line 252 of file FormatToken.h.
The Token
.
Definition at line 121 of file FormatToken.h.
Referenced by clang::format::ContinuationIndenter::addTokenToState(), clang::format::WhitespaceManager::addUntouchableToken(), clang::format::AnnotatedLine::AnnotatedLine(), getNextNonComment(), getPrecedence(), getPreviousNonComment(), is(), isFunctionLikeKeyword(), isNot(), isObjCAtKeyword(), isSimpleTypeSpecifier(), isStringLiteral(), isUnaryOperator(), and clang::format::WhitespaceManager::replaceWhitespace().
StringRef clang::format::FormatToken::TokenText |
The raw text of the token.
Contains the raw token text without leading whitespace and without leading escaped newlines.
Definition at line 174 of file FormatToken.h.
Referenced by clang::format::BreakableBlockComment::BreakableBlockComment(), clang::format::BreakableLineComment::BreakableLineComment(), clang::format::BreakableSingleLineToken::BreakableSingleLineToken(), clang::format::BreakableBlockComment::insertBreak(), clang::format::BreakableBlockComment::replaceWhitespace(), and clang::format::BreakableBlockComment::replaceWhitespaceBefore().
The total length of the unwrapped line up to and including this token.
Definition at line 212 of file FormatToken.h.
Referenced by clang::format::TokenAnnotator::calculateFormattingInformation(), clang::format::CodePointsBetween(), and clang::format::getLengthToMatchingParen().
Definition at line 182 of file FormatToken.h.
Referenced by clang::format::ContinuationIndenter::addTokenToState(), clang::format::TokenAnnotator::annotate(), clang::format::TokenAnnotator::calculateFormattingInformation(), clang::format::ContinuationIndenter::canBreak(), clang::format::fakeRParenSpecialCase(), clang::format::CommaSeparatedList::formatAfterToken(), clang::format::isAllmanBrace(), clang::format::isFunctionDeclarationName(), clang::format::ContinuationIndenter::mustBreak(), clang::format::WhitespaceManager::replaceWhitespaceInToken(), and clang::format::startsNextParameter().
The length of following tokens until the next natural split point, or the next token that can be broken.
Definition at line 220 of file FormatToken.h.
The range of the whitespace immediately preceding the Token
.
Definition at line 134 of file FormatToken.h.
Referenced by clang::format::ContinuationIndenter::addTokenToState(), clang::format::WhitespaceManager::addUntouchableToken(), getStartOfNonWhitespace(), and clang::format::WhitespaceManager::replaceWhitespace().