clang 20.0.0git
|
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Format/TokenAnalyzer.h"
Public Member Functions | |
TokenAnalyzer (const Environment &Env, const FormatStyle &Style) | |
std::pair< tooling::Replacements, unsigned > | process (bool SkipAnnotation=false) |
Public Member Functions inherited from clang::format::UnwrappedLineConsumer | |
virtual | ~UnwrappedLineConsumer () |
virtual void | consumeUnwrappedLine (const UnwrappedLine &Line)=0 |
virtual void | finishRun ()=0 |
Protected Member Functions | |
virtual std::pair< tooling::Replacements, unsigned > | analyze (TokenAnnotator &Annotator, SmallVectorImpl< AnnotatedLine * > &AnnotatedLines, FormatTokenLexer &Tokens)=0 |
void | consumeUnwrappedLine (const UnwrappedLine &TheLine) override |
void | finishRun () override |
Protected Attributes | |
FormatStyle | Style |
LangOptions | LangOpts |
const Environment & | Env |
AffectedRangeManager | AffectedRangeMgr |
SmallVector< SmallVector< UnwrappedLine, 16 >, 2 > | UnwrappedLines |
encoding::Encoding | Encoding |
Definition at line 77 of file TokenAnalyzer.h.
clang::format::TokenAnalyzer::TokenAnalyzer | ( | const Environment & | Env, |
const FormatStyle & | Style | ||
) |
Definition at line 86 of file TokenAnalyzer.cpp.
References Encoding, clang::format::encoding::Encoding_UTF8, clang::format::getLanguageName(), clang::format::FormatStyle::Language, and Style.
|
protectedpure virtual |
|
overrideprotectedvirtual |
Implements clang::format::UnwrappedLineConsumer.
Definition at line 154 of file TokenAnalyzer.cpp.
References UnwrappedLines.
|
overrideprotectedvirtual |
Implements clang::format::UnwrappedLineConsumer.
Definition at line 159 of file TokenAnalyzer.cpp.
References UnwrappedLines.
std::pair< tooling::Replacements, unsigned > clang::format::TokenAnalyzer::process | ( | bool | SkipAnnotation = false | ) |
Definition at line 101 of file TokenAnalyzer.cpp.
References analyze(), clang::format::TokenAnnotator::annotate(), Encoding, Env, clang::format::Environment::getFileID(), clang::format::Environment::getFirstStartColumn(), clang::format::FormatTokenLexer::getKeywords(), clang::format::Environment::getSourceManager(), LangOpts, clang::format::FormatTokenLexer::lex(), clang::Line, clang::Result, Style, clang::tooling::Replacement::toString(), and UnwrappedLines.
Referenced by clang::format::addQualifierAlignmentFixerPasses(), clang::format::fixNamespaceEndComments(), clang::format::internal::reformat(), clang::format::sortJavaScriptImports(), and clang::format::sortUsingDeclarations().
|
protected |
Definition at line 99 of file TokenAnalyzer.h.
Referenced by clang::format::DefinitionBlockSeparator::analyze(), clang::format::NamespaceEndCommentsFixer::analyze(), clang::format::LeftRightQualifierAlignmentFixer::analyze(), clang::format::JavaScriptImportSorter::analyze(), and clang::format::UsingDeclarationsSorter::analyze().
|
protected |
Definition at line 101 of file TokenAnalyzer.h.
Referenced by process(), and TokenAnalyzer().
|
protected |
Definition at line 97 of file TokenAnalyzer.h.
Referenced by clang::format::NamespaceEndCommentsFixer::analyze(), clang::format::JavaScriptImportSorter::analyze(), clang::format::UsingDeclarationsSorter::analyze(), clang::format::LeftRightQualifierAlignmentFixer::fixQualifierAlignment(), and process().
|
protected |
Definition at line 95 of file TokenAnalyzer.h.
Referenced by clang::format::LeftRightQualifierAlignmentFixer::analyzeLeft(), clang::format::LeftRightQualifierAlignmentFixer::analyzeRight(), and process().
|
protected |
Definition at line 94 of file TokenAnalyzer.h.
Referenced by clang::format::DefinitionBlockSeparator::analyze(), clang::format::NamespaceEndCommentsFixer::analyze(), clang::format::UsingDeclarationsSorter::analyze(), clang::format::ObjCPropertyAttributeOrderFixer::ObjCPropertyAttributeOrderFixer(), process(), and TokenAnalyzer().
|
protected |
Definition at line 100 of file TokenAnalyzer.h.
Referenced by consumeUnwrappedLine(), finishRun(), and process().