clang 20.0.0git
|
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Format/FormatToken.h"
Public Member Functions | |
CommaSeparatedList (const FormatStyle &Style) | |
void | precomputeFormattingInfos (const FormatToken *Token) override |
After the TokenAnnotator has finished annotating all the tokens, this function precomputes required information for formatting. | |
unsigned | formatAfterToken (LineState &State, ContinuationIndenter *Indenter, bool DryRun) override |
Same as formatFromToken , but assumes that the first token has already been set thereby deciding on the first line break. | |
unsigned | formatFromToken (LineState &State, ContinuationIndenter *Indenter, bool DryRun) override |
Apply the special formatting that the given role demands. | |
void | CommaFound (const FormatToken *Token) override |
Adds Token as the next comma to the CommaSeparated list. | |
const FormatToken * | lastComma () override |
Public Member Functions inherited from clang::format::TokenRole | |
TokenRole (const FormatStyle &Style) | |
virtual | ~TokenRole () |
virtual void | precomputeFormattingInfos (const FormatToken *Token) |
After the TokenAnnotator has finished annotating all the tokens, this function precomputes required information for formatting. | |
virtual unsigned | formatFromToken (LineState &State, ContinuationIndenter *Indenter, bool DryRun) |
Apply the special formatting that the given role demands. | |
virtual unsigned | formatAfterToken (LineState &State, ContinuationIndenter *Indenter, bool DryRun) |
Same as formatFromToken , but assumes that the first token has already been set thereby deciding on the first line break. | |
virtual void | CommaFound (const FormatToken *Token) |
Notifies the Role that a comma was found. | |
virtual const FormatToken * | lastComma () |
Additional Inherited Members | |
Protected Attributes inherited from clang::format::TokenRole | |
const FormatStyle & | Style |
Definition at line 964 of file FormatToken.h.
|
inline |
Definition at line 966 of file FormatToken.h.
|
inlineoverridevirtual |
Adds Token
as the next comma to the CommaSeparated
list.
Reimplemented from clang::format::TokenRole.
Definition at line 978 of file FormatToken.h.
|
overridevirtual |
Same as formatFromToken
, but assumes that the first token has already been set thereby deciding on the first line break.
Reimplemented from clang::format::TokenRole.
Definition at line 88 of file FormatToken.cpp.
References clang::format::BK_Block, clang::Column, clang::format::FormatStyle::ColumnLimit, Indenter, clang::format::FormatToken::is(), clang::format::FormatToken::isOneOf(), clang::format::FormatToken::MatchingParen, NewLine, clang::format::FormatToken::Next, and clang::format::TokenRole::Style.
|
overridevirtual |
Apply the special formatting that the given role demands.
Assumes that the token having this role is already formatted.
Continues formatting from State
leaving indentation to Indenter
and returns the total penalty that this formatting incurs.
Reimplemented from clang::format::TokenRole.
Definition at line 148 of file FormatToken.cpp.
|
inlineoverridevirtual |
Reimplemented from clang::format::TokenRole.
Definition at line 982 of file FormatToken.h.
|
overridevirtual |
After the TokenAnnotator
has finished annotating all the tokens, this function precomputes required information for formatting.
Reimplemented from clang::format::TokenRole.
Definition at line 166 of file FormatToken.cpp.
References clang::format::FormatStyle::AlignAfterOpenBracket, clang::format::FormatStyle::BAS_DontAlign, clang::format::FormatStyle::BinPackArguments, clang::format::FormatToken::CanBreakBefore, clang::format::CodePointsBetween(), clang::Column, clang::format::FormatStyle::ColumnLimit, clang::format::FormatStyle::Cpp11BracedListStyle, clang::format::FormatToken::getNextNonComment(), clang::format::FormatToken::getPreviousNonComment(), clang::format::FormatToken::HasUnescapedNewline, clang::if(), clang::Token::is(), clang::format::FormatToken::is(), clang::Token::isOneOf(), clang::format::FormatToken::isTrailingComment(), clang::format::FormatToken::MustBreakBefore, clang::format::FormatToken::Next, clang::format::FormatToken::Previous, clang::format::TokenRole::Style, and UINT_MAX.