clang
19.0.0git
|
Determines extra information about the tokens comprising an UnwrappedLine
.
More...
#include "/home/runner/work/llvm/llvm/repo/clang/lib/Format/TokenAnnotator.h"
Public Member Functions | |
TokenAnnotator (const FormatStyle &Style, const AdditionalKeywords &Keywords) | |
void | setCommentLineLevels (SmallVectorImpl< AnnotatedLine * > &Lines) const |
Adapts the indent levels of comment lines to the indent of the subsequent line. More... | |
void | annotate (AnnotatedLine &Line) |
void | calculateFormattingInformation (AnnotatedLine &Line) const |
Determines extra information about the tokens comprising an UnwrappedLine
.
Definition at line 211 of file TokenAnnotator.h.
|
inline |
Definition at line 213 of file TokenAnnotator.h.
void clang::format::TokenAnnotator::annotate | ( | AnnotatedLine & | Line | ) |
Definition at line 3599 of file TokenAnnotator.cpp.
References clang::comments::tok::eof, clang::First, clang::format::getFunctionName(), clang::format::isCtorOrDtorName(), clang::format::LT_Invalid, clang::format::LT_ObjCDecl, clang::format::LT_ObjCMethodDecl, clang::format::LT_ObjCProperty, clang::format::maxNestingDepth(), and clang::format::ST_Class.
void clang::format::TokenAnnotator::calculateFormattingInformation | ( | AnnotatedLine & | Line | ) | const |
Definition at line 3819 of file TokenAnnotator.cpp.
References clang::First.
void clang::format::TokenAnnotator::setCommentLineLevels | ( | SmallVectorImpl< AnnotatedLine * > & | Lines | ) | const |
Adapts the indent levels of comment lines to the indent of the subsequent line.
Definition at line 3486 of file TokenAnnotator.cpp.
References clang::format::AnnotatedLine::First, clang::format::isClangFormatOff(), clang::format::AnnotatedLine::Level, clang::format::LT_CommentAbovePPDirective, clang::format::LT_ImportStatement, clang::format::LT_PreprocessorDirective, clang::format::FormatToken::NewlinesBefore, clang::format::FormatToken::OriginalColumn, clang::format::FormatStyle::PPDIS_BeforeHash, and clang::format::AnnotatedLine::Type.