clang: clang::format::TokenRole Class Reference (original) (raw)
#include "[/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Format/FormatToken.h](FormatToken%5F8h%5Fsource.html)"
Public Member Functions | |
---|---|
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 () |
Definition at line 934 of file FormatToken.h.
clang::format::TokenRole::TokenRole ( const FormatStyle & Style) | inline |
---|
◆ ~TokenRole()
clang::format::TokenRole::~TokenRole ( ) | virtual |
---|
◆ CommaFound()
virtual void clang::format::TokenRole::CommaFound ( const FormatToken * Token) | inlinevirtual |
---|
◆ formatAfterToken()
◆ formatFromToken()
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 in clang::format::CommaSeparatedList.
Definition at line 949 of file FormatToken.h.
◆ lastComma()
virtual const FormatToken * clang::format::TokenRole::lastComma ( ) | inlinevirtual |
---|
◆ precomputeFormattingInfos()
void clang::format::TokenRole::precomputeFormattingInfos ( const FormatToken * Token) | virtual |
---|
◆ Style
The documentation for this class was generated from the following files:
- lib/Format/FormatToken.h
- lib/Format/FormatToken.cpp