|
clang 22.0.0git
|
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Format/TokenAnnotator.h"
Public Member Functions | |
| AnnotatedLine (const UnwrappedLine &Line) | |
| void | addChildren (const UnwrappedLineNode &Node, FormatToken *Current) |
| size_t | size () const |
| ~AnnotatedLine () | |
| bool | isComment () const |
| template<typename... Ts> | |
| bool | startsWith (Ts... Tokens) const |
true if this line starts with the given tokens in order, ignoring comments. | |
| template<typename... Ts> | |
| bool | endsWith (Ts... Tokens) const |
true if this line ends with the given tokens in reversed order, ignoring comments. | |
| bool | mightBeFunctionDefinition () const |
true if this line looks like a function definition instead of a function declaration. | |
| bool | startsWithNamespace () const |
true if this line starts a namespace definition. | |
| bool | startsWithExportBlock () const |
true if this line starts a C++ export block. | |
| FormatToken * | getFirstNonComment () const |
| FormatToken * | getLastNonComment () const |
Public Attributes | |
| FormatToken * | First |
| FormatToken * | Last |
| SmallVector< AnnotatedLine *, 0 > | Children |
| LineType | Type |
| unsigned | Level |
| unsigned | PPLevel |
| size_t | MatchingOpeningBlockLineIndex |
| size_t | MatchingClosingBlockLineIndex |
| bool | InPPDirective |
| bool | InPragmaDirective |
| bool | InMacroBody |
| bool | MustBeDeclaration |
| bool | MightBeFunctionDecl |
| bool | IsMultiVariableDeclStmt |
| bool | ContainsMacroCall = false |
True if this line contains a macro call for which an expansion exists. | |
| bool | Computed = false |
True if calculateFormattingInformation() has been called on this line. | |
| bool | Affected |
True if this line should be formatted, i.e. | |
| bool | LeadingEmptyLinesAffected |
True if the leading empty lines of this line intersect with one of the input ranges. | |
| bool | ChildrenAffected |
True if one of this line's children intersects with an input range. | |
| bool | ReturnTypeWrapped |
True if breaking after last attribute group in function return type. | |
| bool | IsContinuation |
True if this line should be indented by ContinuationIndent in addition to the normal indention level. | |
| unsigned | FirstStartColumn |
Definition at line 49 of file TokenAnnotator.h.
|
inline |
Definition at line 51 of file TokenAnnotator.h.
References addChildren(), Affected, ChildrenAffected, ContainsMacroCall, false, First, FirstStartColumn, InMacroBody, InPPDirective, InPragmaDirective, IsContinuation, IsMultiVariableDeclStmt, Last, LeadingEmptyLinesAffected, Level, clang::Line, clang::format::LT_Other, MatchingClosingBlockLineIndex, MatchingOpeningBlockLineIndex, MightBeFunctionDecl, MustBeDeclaration, clang::format::FormatToken::Next, PPLevel, ReturnTypeWrapped, clang::format::FormatToken::Tok, Tok, and Type.
Referenced by addChildren(), and ~AnnotatedLine().
|
inline |
Definition at line 104 of file TokenAnnotator.h.
References AnnotatedLine(), Children, clang::format::FormatToken::Children, First, clang::format::FormatToken::Next, and clang::format::FormatToken::Role.
|
inline |
Definition at line 87 of file TokenAnnotator.h.
References AnnotatedLine(), Children, clang::format::FormatToken::Children, clang::format::UnwrappedLineNode::Children, and ContainsMacroCall.
Referenced by AnnotatedLine().
|
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 129 of file TokenAnnotator.h.
References Last.
Referenced by clang::format::computeNewlines(), and mightBeFunctionDefinition().
|
inline |
Definition at line 162 of file TokenAnnotator.h.
References First.
|
inline |
Definition at line 167 of file TokenAnnotator.h.
References Last.
|
inline |
Definition at line 115 of file TokenAnnotator.h.
References First.
|
inline |
true if this line looks like a function definition instead of a function declaration.
Asserts MightBeFunctionDecl.
Definition at line 135 of file TokenAnnotator.h.
References endsWith(), and MightBeFunctionDecl.
|
inline |
Definition at line 97 of file TokenAnnotator.h.
References Children.
|
inline |
true if this line starts with the given tokens in order, ignoring comments.
Definition at line 121 of file TokenAnnotator.h.
References First.
Referenced by clang::format::computeNewlines(), clang::format::UnwrappedLineFormatter::format(), startsWithExportBlock(), and startsWithNamespace().
|
inline |
true if this line starts a C++ export block.
Definition at line 158 of file TokenAnnotator.h.
References startsWith().
|
inline |
true if this line starts a namespace definition.
Definition at line 151 of file TokenAnnotator.h.
References startsWith().
Referenced by clang::format::computeNewlines().
| 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 197 of file TokenAnnotator.h.
Referenced by AnnotatedLine(), and clang::format::UnwrappedLineFormatter::format().
| SmallVector<AnnotatedLine *, 0> clang::format::AnnotatedLine::Children |
Definition at line 175 of file TokenAnnotator.h.
Referenced by addChildren(), size(), and ~AnnotatedLine().
| bool clang::format::AnnotatedLine::ChildrenAffected |
True if one of this line's children intersects with an input range.
Definition at line 204 of file TokenAnnotator.h.
Referenced by AnnotatedLine(), and clang::format::UnwrappedLineFormatter::format().
True if calculateFormattingInformation() has been called on this line.
Definition at line 193 of file TokenAnnotator.h.
True if this line contains a macro call for which an expansion exists.
Definition at line 190 of file TokenAnnotator.h.
Referenced by addChildren(), AnnotatedLine(), and clang::format::UnwrappedLineFormatter::format().
| FormatToken* clang::format::AnnotatedLine::First |
Definition at line 172 of file TokenAnnotator.h.
Referenced by clang::format::JavaScriptImportSorter::analyze(), clang::format::NamespaceEndCommentsFixer::analyze(), AnnotatedLine(), clang::format::computeNewlines(), clang::format::UnwrappedLineFormatter::format(), getFirstNonComment(), isComment(), clang::format::TokenAnnotator::setCommentLineLevels(), startsWith(), and ~AnnotatedLine().
| unsigned clang::format::AnnotatedLine::FirstStartColumn |
Definition at line 213 of file TokenAnnotator.h.
Referenced by AnnotatedLine().
| bool clang::format::AnnotatedLine::InMacroBody |
Definition at line 184 of file TokenAnnotator.h.
Referenced by AnnotatedLine().
| bool clang::format::AnnotatedLine::InPPDirective |
Definition at line 182 of file TokenAnnotator.h.
Referenced by AnnotatedLine(), clang::format::computeNewlines(), and clang::format::UnwrappedLineFormatter::format().
| bool clang::format::AnnotatedLine::InPragmaDirective |
Definition at line 183 of file TokenAnnotator.h.
Referenced by AnnotatedLine().
| bool clang::format::AnnotatedLine::IsContinuation |
True if this line should be indented by ContinuationIndent in addition to the normal indention level.
Definition at line 211 of file TokenAnnotator.h.
Referenced by AnnotatedLine().
| bool clang::format::AnnotatedLine::IsMultiVariableDeclStmt |
Definition at line 187 of file TokenAnnotator.h.
Referenced by AnnotatedLine().
| FormatToken* clang::format::AnnotatedLine::Last |
Definition at line 173 of file TokenAnnotator.h.
Referenced by AnnotatedLine(), clang::format::computeNewlines(), endsWith(), clang::format::UnwrappedLineFormatter::format(), and getLastNonComment().
| bool clang::format::AnnotatedLine::LeadingEmptyLinesAffected |
True if the leading empty lines of this line intersect with one of the input ranges.
Definition at line 201 of file TokenAnnotator.h.
Referenced by AnnotatedLine(), and clang::format::UnwrappedLineFormatter::format().
| unsigned clang::format::AnnotatedLine::Level |
Definition at line 178 of file TokenAnnotator.h.
Referenced by AnnotatedLine(), clang::format::UnwrappedLineFormatter::format(), and clang::format::TokenAnnotator::setCommentLineLevels().
| size_t clang::format::AnnotatedLine::MatchingClosingBlockLineIndex |
Definition at line 181 of file TokenAnnotator.h.
Referenced by AnnotatedLine().
| size_t clang::format::AnnotatedLine::MatchingOpeningBlockLineIndex |
Definition at line 180 of file TokenAnnotator.h.
Referenced by clang::format::NamespaceEndCommentsFixer::analyze(), and AnnotatedLine().
| bool clang::format::AnnotatedLine::MightBeFunctionDecl |
Definition at line 186 of file TokenAnnotator.h.
Referenced by AnnotatedLine(), and mightBeFunctionDefinition().
| bool clang::format::AnnotatedLine::MustBeDeclaration |
Definition at line 185 of file TokenAnnotator.h.
Referenced by AnnotatedLine().
| unsigned clang::format::AnnotatedLine::PPLevel |
Definition at line 179 of file TokenAnnotator.h.
Referenced by AnnotatedLine().
| bool clang::format::AnnotatedLine::ReturnTypeWrapped |
True if breaking after last attribute group in function return type.
Definition at line 207 of file TokenAnnotator.h.
Referenced by AnnotatedLine().
| LineType clang::format::AnnotatedLine::Type |
Definition at line 177 of file TokenAnnotator.h.
Referenced by AnnotatedLine(), clang::format::UnwrappedLineFormatter::format(), and clang::format::TokenAnnotator::setCommentLineLevels().