clang 20.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
[legend]

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 ()
 
virtual void consumeUnwrappedLine (const UnwrappedLine &Line)=0
 
virtual void finishRun ()=0
 

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
 
LangOptions LangOpts
 
const EnvironmentEnv
 
AffectedRangeManager AffectedRangeMgr
 
SmallVector< SmallVector< UnwrappedLine, 16 >, 2 > UnwrappedLines
 
encoding::Encoding Encoding
 

Detailed Description

Definition at line 77 of file TokenAnalyzer.h.

Constructor & Destructor Documentation

◆ TokenAnalyzer()

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

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)
overrideprotectedvirtual

Implements clang::format::UnwrappedLineConsumer.

Definition at line 154 of file TokenAnalyzer.cpp.

References UnwrappedLines.

◆ finishRun()

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

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)

Member Data Documentation

◆ AffectedRangeMgr

AffectedRangeManager clang::format::TokenAnalyzer::AffectedRangeMgr
protected

◆ Encoding

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

Definition at line 101 of file TokenAnalyzer.h.

Referenced by process(), and TokenAnalyzer().

◆ Env

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

◆ LangOpts

LangOptions clang::format::TokenAnalyzer::LangOpts
protected

◆ Style

FormatStyle clang::format::TokenAnalyzer::Style
protected

◆ UnwrappedLines

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

Definition at line 100 of file TokenAnalyzer.h.

Referenced by consumeUnwrappedLine(), finishRun(), and process().


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