clang API Documentation
Determines extra information about the tokens comprising an UnwrappedLine
.
More...
#include <TokenAnnotator.h>
Public Member Functions | |
TokenAnnotator (const FormatStyle &Style, const AdditionalKeywords &Keywords) | |
void | setCommentLineLevels (SmallVectorImpl< AnnotatedLine * > &Lines) |
Adapts the indent levels of comment lines to the indent of the subsequent line. | |
void | annotate (AnnotatedLine &Line) |
void | calculateFormattingInformation (AnnotatedLine &Line) |
Determines extra information about the tokens comprising an UnwrappedLine
.
Definition at line 109 of file TokenAnnotator.h.
clang::format::TokenAnnotator::TokenAnnotator | ( | const FormatStyle & | Style, |
const AdditionalKeywords & | Keywords | ||
) | [inline] |
Definition at line 111 of file TokenAnnotator.h.
void clang::format::TokenAnnotator::annotate | ( | AnnotatedLine & | Line | ) |
Definition at line 1266 of file TokenAnnotator.cpp.
References clang::format::FormatToken::CanBreakBefore, clang::format::AnnotatedLine::Children, clang::format::AnnotatedLine::First, clang::format::LT_Invalid, clang::format::LT_ObjCDecl, clang::format::LT_ObjCMethodDecl, clang::format::LT_ObjCProperty, clang::format::FormatToken::MustBreakBefore, clang::format::FormatToken::SpacesRequiredBefore, clang::format::TT_ObjCDecl, clang::format::TT_ObjCMethodSpecifier, clang::format::TT_ObjCProperty, clang::format::AnnotatedLine::Type, and clang::format::FormatToken::Type.
Definition at line 1327 of file TokenAnnotator.cpp.
References clang::format::FormatToken::BindingStrength, clang::format::BK_BracedInit, clang::format::FormatToken::BlockKind, clang::format::FormatToken::CanBreakBefore, clang::format::AnnotatedLine::Children, clang::format::FormatToken::Children, clang::format::FormatToken::ColumnWidth, clang::format::AnnotatedLine::First, clang::format::FormatToken::HasUnescapedNewline, clang::format::isFunctionDeclarationName(), clang::format::FormatToken::IsMultiline, clang::format::FormatToken::isOneOf(), clang::format::FormatToken::isTrailingComment(), clang::format::AnnotatedLine::Last, clang::format::AnnotatedLine::MightBeFunctionDecl, clang::format::FormatToken::MustBreakBefore, clang::format::FormatToken::Next, clang::format::FormatToken::opensScope(), clang::format::FormatToken::Previous, clang::format::printDebugInfo(), clang::format::FormatToken::Role, clang::format::FormatToken::SpacesRequiredBefore, clang::format::FormatToken::SplitPenalty, clang::format::FormatToken::TotalLength, clang::format::TT_CtorInitializerColon, clang::format::TT_CtorInitializerComma, clang::format::TT_FunctionDeclarationName, clang::format::TT_LineComment, and clang::format::FormatToken::Type.
void clang::format::TokenAnnotator::setCommentLineLevels | ( | SmallVectorImpl< AnnotatedLine * > & | Lines | ) |
Adapts the indent levels of comment lines to the indent of the subsequent line.
Definition at line 1251 of file TokenAnnotator.cpp.
References clang::format::AnnotatedLine::First, clang::format::FormatToken::is(), clang::format::FormatToken::isNot(), and clang::format::AnnotatedLine::Level.