clang  16.0.0git
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
clang::format::TokenAnalyzer Class Referenceabstract

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Format/TokenAnalyzer.h"

Inheritance diagram for clang::format::TokenAnalyzer:
Inheritance graph
Collaboration diagram for clang::format::TokenAnalyzer:
Collaboration graph

Public Member Functions

 TokenAnalyzer (const Environment &Env, const FormatStyle &Style)
std::pair< tooling::Replacements, unsignedprocess (bool SkipAnnotation=false)
- Public Member Functions inherited from clang::format::UnwrappedLineConsumer
virtual ~UnwrappedLineConsumer ()

Protected Member Functions

virtual std::pair< tooling::Replacements, unsignedanalyze (TokenAnnotator &Annotator, SmallVectorImpl< AnnotatedLine * > &AnnotatedLines, FormatTokenLexer &Tokens)=0
void consumeUnwrappedLine (const UnwrappedLine &TheLine) override
void finishRun () override

Protected Attributes

FormatStyle Style
const EnvironmentEnv
AffectedRangeManager AffectedRangeMgr
SmallVector< SmallVector< UnwrappedLine, 16 >, 2 > UnwrappedLines
encoding::Encoding Encoding

Detailed Description

Definition at line 88 of file TokenAnalyzer.h.

Constructor & Destructor Documentation

◆ TokenAnalyzer()

clang::format::TokenAnalyzer::TokenAnalyzer ( const Environment Env,
const FormatStyle Style 

Definition at line 86 of file TokenAnalyzer.cpp.

Member Function Documentation

◆ analyze()

virtual std::pair<tooling::Replacements, unsigned> clang::format::TokenAnalyzer::analyze ( TokenAnnotator Annotator,
SmallVectorImpl< AnnotatedLine * > &  AnnotatedLines,
FormatTokenLexer Tokens 
protectedpure virtual

◆ consumeUnwrappedLine()

void clang::format::TokenAnalyzer::consumeUnwrappedLine ( const UnwrappedLine TheLine)

Implements clang::format::UnwrappedLineConsumer.

Definition at line 154 of file TokenAnalyzer.cpp.

References UnwrappedLines.

◆ finishRun()

void clang::format::TokenAnalyzer::finishRun ( )

Implements clang::format::UnwrappedLineConsumer.

Definition at line 159 of file TokenAnalyzer.cpp.

References UnwrappedLines.

◆ process()

std::pair< tooling::Replacements, unsigned > clang::format::TokenAnalyzer::process ( bool  SkipAnnotation = false)

Definition at line 101 of file TokenAnalyzer.cpp.

Member Data Documentation

◆ AffectedRangeMgr

AffectedRangeManager clang::format::TokenAnalyzer::AffectedRangeMgr

Definition at line 109 of file TokenAnalyzer.h.

◆ Encoding

encoding::Encoding clang::format::TokenAnalyzer::Encoding

Definition at line 111 of file TokenAnalyzer.h.

◆ Env

const Environment& clang::format::TokenAnalyzer::Env

Definition at line 107 of file TokenAnalyzer.h.

Referenced by clang::format::QualifierAlignmentFixer::analyze().

◆ Style

FormatStyle clang::format::TokenAnalyzer::Style

Definition at line 105 of file TokenAnalyzer.h.

◆ UnwrappedLines

SmallVector<SmallVector<UnwrappedLine, 16>, 2> clang::format::TokenAnalyzer::UnwrappedLines

Definition at line 110 of file TokenAnalyzer.h.

Referenced by consumeUnwrappedLine(), and finishRun().

The documentation for this class was generated from the following files: