clang
7.0.0
|
#include "/work/llvm-www-releases/7.0.0/docsbuild/llvm.src/tools/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... | |
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 38 of file TokenAnnotator.h.
|
inline |
Definition at line 40 of file TokenAnnotator.h.
|
inline |
Definition at line 73 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 95 of file TokenAnnotator.h.
|
inline |
true
if this line looks like a function definition instead of a function declaration.
Asserts MightBeFunctionDecl.
Definition at line 101 of file TokenAnnotator.h.
References clang::format::FormatToken::isOneOf(), Last, and MightBeFunctionDecl.
|
inline |
true
if this line starts with the given tokens in order, ignoring comments.
Definition at line 87 of file TokenAnnotator.h.
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 124 of file TokenAnnotator.h.
SmallVector<AnnotatedLine *, 0> clang::format::AnnotatedLine::Children |
Definition at line 111 of file TokenAnnotator.h.
Referenced by ~AnnotatedLine().
bool clang::format::AnnotatedLine::ChildrenAffected |
True
if one of this line's children intersects with an input range.
Definition at line 131 of file TokenAnnotator.h.
FormatToken* clang::format::AnnotatedLine::First |
Definition at line 108 of file TokenAnnotator.h.
Referenced by clang::format::ContinuationIndenter::getInitialState(), clang::format::isAllmanBrace(), and clang::format::maxNestingDepth().
unsigned clang::format::AnnotatedLine::FirstStartColumn |
Definition at line 133 of file TokenAnnotator.h.
bool clang::format::AnnotatedLine::InPPDirective |
Definition at line 117 of file TokenAnnotator.h.
Referenced by clang::format::ContinuationIndenter::getColumnLimit(), and clang::format::getEnclosingFunctionName().
bool clang::format::AnnotatedLine::IsMultiVariableDeclStmt |
Definition at line 120 of file TokenAnnotator.h.
FormatToken* clang::format::AnnotatedLine::Last |
Definition at line 109 of file TokenAnnotator.h.
Referenced by mightBeFunctionDefinition().
bool clang::format::AnnotatedLine::LeadingEmptyLinesAffected |
True
if the leading empty lines of this line intersect with one of the input ranges.
Definition at line 128 of file TokenAnnotator.h.
unsigned clang::format::AnnotatedLine::Level |
Definition at line 114 of file TokenAnnotator.h.
Referenced by clang::format::isAllmanBrace().
size_t clang::format::AnnotatedLine::MatchingClosingBlockLineIndex |
Definition at line 116 of file TokenAnnotator.h.
size_t clang::format::AnnotatedLine::MatchingOpeningBlockLineIndex |
Definition at line 115 of file TokenAnnotator.h.
bool clang::format::AnnotatedLine::MightBeFunctionDecl |
Definition at line 119 of file TokenAnnotator.h.
Referenced by mightBeFunctionDefinition().
bool clang::format::AnnotatedLine::MustBeDeclaration |
Definition at line 118 of file TokenAnnotator.h.
LineType clang::format::AnnotatedLine::Type |
Definition at line 113 of file TokenAnnotator.h.
Referenced by clang::format::getEnclosingFunctionName(), and clang::format::ContinuationIndenter::getInitialState().