clang
10.0.0git
|
#include "/work/www-prereleases/10.0.0/rc2/docsbuild/clang/lib/Format/TokenAnnotator.h"
Public Member Functions | |
AnnotatedLine (const UnwrappedLine &Line) | |
~AnnotatedLine () | |
template<typename... Ts> | |
bool | startsWith (Ts... Tokens) const |
true if this line starts with the given tokens in order, ignoring comments. More... | |
template<typename... Ts> | |
bool | endsWith (Ts... Tokens) const |
true if this line ends with the given tokens in reversed order, ignoring comments. More... | |
bool | mightBeFunctionDefinition () const |
true if this line looks like a function definition instead of a function declaration. More... | |
bool | startsWithNamespace () const |
true if this line starts a namespace definition. More... | |
Public Attributes | |
FormatToken * | First |
FormatToken * | Last |
SmallVector< AnnotatedLine *, 0 > | Children |
LineType | Type |
unsigned | Level |
size_t | MatchingOpeningBlockLineIndex |
size_t | MatchingClosingBlockLineIndex |
bool | InPPDirective |
bool | MustBeDeclaration |
bool | MightBeFunctionDecl |
bool | IsMultiVariableDeclStmt |
bool | Affected |
True if this line should be formatted, i.e. More... | |
bool | LeadingEmptyLinesAffected |
True if the leading empty lines of this line intersect with one of the input ranges. More... | |
bool | ChildrenAffected |
True if one of this line's children intersects with an input range. More... | |
unsigned | FirstStartColumn |
Definition at line 37 of file TokenAnnotator.h.
|
inline |
Definition at line 39 of file TokenAnnotator.h.
|
inline |
Definition at line 72 of file TokenAnnotator.h.
References Children.
|
inline |
true
if this line ends with the given tokens in reversed order, ignoring comments.
For example, given tokens [T1, T2, T3, ...], the function returns true if this line is like "... T3 T2 T1".
Definition at line 94 of file TokenAnnotator.h.
Referenced by mightBeFunctionDefinition().
|
inline |
true
if this line looks like a function definition instead of a function declaration.
Asserts MightBeFunctionDecl.
Definition at line 100 of file TokenAnnotator.h.
References endsWith(), and MightBeFunctionDecl.
|
inline |
true
if this line starts with the given tokens in order, ignoring comments.
Definition at line 86 of file TokenAnnotator.h.
Referenced by startsWithNamespace().
|
inline |
true
if this line starts a namespace definition.
Definition at line 116 of file TokenAnnotator.h.
References startsWith().
bool clang::format::AnnotatedLine::Affected |
True
if this line should be formatted, i.e.
intersects directly or indirectly with one of the input ranges.
Definition at line 138 of file TokenAnnotator.h.
Referenced by clang::format::AffectedRangeManager::affectsCharSourceRange().
SmallVector<AnnotatedLine *, 0> clang::format::AnnotatedLine::Children |
Definition at line 125 of file TokenAnnotator.h.
Referenced by clang::format::AffectedRangeManager::affectsCharSourceRange(), clang::format::TokenAnnotator::annotate(), clang::format::TokenAnnotator::calculateFormattingInformation(), and ~AnnotatedLine().
bool clang::format::AnnotatedLine::ChildrenAffected |
True
if one of this line's children intersects with an input range.
Definition at line 145 of file TokenAnnotator.h.
Referenced by clang::format::AffectedRangeManager::affectsCharSourceRange().
FormatToken* clang::format::AnnotatedLine::First |
Definition at line 122 of file TokenAnnotator.h.
Referenced by clang::format::AffectedRangeManager::affectsCharSourceRange(), clang::format::TokenAnnotator::calculateFormattingInformation(), clang::format::AffectedRangeManager::computeAffectedLines(), clang::format::ContinuationIndenter::getInitialState(), clang::format::isAllmanBrace(), clang::format::maxNestingDepth(), and clang::format::TokenAnnotator::setCommentLineLevels().
unsigned clang::format::AnnotatedLine::FirstStartColumn |
Definition at line 147 of file TokenAnnotator.h.
Referenced by clang::format::TokenAnnotator::calculateFormattingInformation().
bool clang::format::AnnotatedLine::InPPDirective |
Definition at line 131 of file TokenAnnotator.h.
Referenced by clang::format::AffectedRangeManager::computeAffectedLines(), clang::format::ContinuationIndenter::getColumnLimit(), and clang::format::getEnclosingFunctionName().
bool clang::format::AnnotatedLine::IsMultiVariableDeclStmt |
Definition at line 134 of file TokenAnnotator.h.
FormatToken* clang::format::AnnotatedLine::Last |
Definition at line 123 of file TokenAnnotator.h.
Referenced by clang::format::AffectedRangeManager::affectsCharSourceRange(), and clang::format::AffectedRangeManager::computeAffectedLines().
bool clang::format::AnnotatedLine::LeadingEmptyLinesAffected |
True
if the leading empty lines of this line intersect with one of the input ranges.
Definition at line 142 of file TokenAnnotator.h.
Referenced by clang::format::AffectedRangeManager::computeAffectedLines().
unsigned clang::format::AnnotatedLine::Level |
Definition at line 128 of file TokenAnnotator.h.
Referenced by clang::format::isAllmanBrace(), and clang::format::TokenAnnotator::setCommentLineLevels().
size_t clang::format::AnnotatedLine::MatchingClosingBlockLineIndex |
Definition at line 130 of file TokenAnnotator.h.
size_t clang::format::AnnotatedLine::MatchingOpeningBlockLineIndex |
Definition at line 129 of file TokenAnnotator.h.
Referenced by clang::format::AffectedRangeManager::affectsCharSourceRange().
bool clang::format::AnnotatedLine::MightBeFunctionDecl |
Definition at line 133 of file TokenAnnotator.h.
Referenced by mightBeFunctionDefinition().
bool clang::format::AnnotatedLine::MustBeDeclaration |
Definition at line 132 of file TokenAnnotator.h.
LineType clang::format::AnnotatedLine::Type |
Definition at line 127 of file TokenAnnotator.h.
Referenced by clang::format::getEnclosingFunctionName(), clang::format::ContinuationIndenter::getInitialState(), and clang::format::TokenAnnotator::setCommentLineLevels().