class FormatTokenLexer

Declaration

class FormatTokenLexer { /* full declaration omitted */ };

Declared at: clang/lib/Format/FormatTokenLexer.h:39

Member Variables

private clang::format::FormatToken* FormatTok
private bool IsFirstToken
private std::stack<LexerState> StateStack
private unsigned int Column
private unsigned int TrailingWhitespace
private std::unique_ptr<Lexer> Lex
private clang::LangOptions LangOpts
private const clang::SourceManager& SourceMgr
private clang::FileID ID
private const clang::format::FormatStyle& Style
private clang::IdentifierTable& IdentTable
private clang::format::AdditionalKeywords Keywords
private encoding::Encoding Encoding
private llvm::SpecificBumpPtrAllocator<FormatToken>& Allocator
private unsigned int FirstInLineIndex
private SmallVector<clang::format::FormatToken*, 16> Tokens
private llvm:: SmallMapVector<IdentifierInfo*, TokenType, 8> Macros
private bool FormattingDisabled
private llvm::Regex MacroBlockBeginRegex
private llvm::Regex MacroBlockEndRegex
private static const llvm::StringSet<> CSharpAttributeTargets

Method Overview

Methods

FormatTokenLexer(
    const clang::SourceManager& SourceMgr,
    clang::FileID ID,
    unsigned int Column,
    const clang::format::FormatStyle& Style,
    encoding::Encoding Encoding,
    llvm::SpecificBumpPtrAllocator<FormatToken>&
        Allocator,
    clang::IdentifierTable& IdentTable)

Declared at: clang/lib/Format/FormatTokenLexer.h:41

Parameters

const clang::SourceManager& SourceMgr
clang::FileID ID
unsigned int Column
const clang::format::FormatStyle& Style
encoding::Encoding Encoding
llvm::SpecificBumpPtrAllocator<FormatToken>& Allocator
clang::IdentifierTable& IdentTable

bool canPrecedeRegexLiteral(
    clang::format::FormatToken* Prev)

Declared at: clang/lib/Format/FormatTokenLexer.h:68

Parameters

clang::format::FormatToken* Prev

const clang::format::AdditionalKeywords&
getKeywords()

Declared at: clang/lib/Format/FormatTokenLexer.h:48

clang::format::FormatToken* getNextToken()

Declared at: clang/lib/Format/FormatTokenLexer.h:99

clang::format::FormatToken* getStashedToken()

Declared at: clang/lib/Format/FormatTokenLexer.h:97

void handleCSharpVerbatimAndInterpolatedStrings()

Declared at: clang/lib/Format/FormatTokenLexer.h:87

void handleTemplateStrings()

Declared at: clang/lib/Format/FormatTokenLexer.h:85

ArrayRef<clang::format::FormatToken*> lex()

Declared at: clang/lib/Format/FormatTokenLexer.h:46

bool precedesOperand(
    clang::format::FormatToken* Tok)

Declared at: clang/lib/Format/FormatTokenLexer.h:66

Parameters

clang::format::FormatToken* Tok

void readRawToken(clang::format::FormatToken& Tok)

Declared at: clang/lib/Format/FormatTokenLexer.h:132

Parameters

clang::format::FormatToken& Tok

bool readRawTokenVerilogSpecific(
    clang::Token& Tok)

Description

Handle Verilog-specific tokens.

Declared at: clang/lib/Format/FormatTokenLexer.h:130

Parameters

clang::Token& Tok

void resetLexer(unsigned int Offset)

Declared at: clang/lib/Format/FormatTokenLexer.h:134

Parameters

unsigned int Offset

void truncateToken(size_t NewLen)

Declared at: clang/lib/Format/FormatTokenLexer.h:95

Parameters

size_t NewLen

bool tryMergeCSharpKeywordVariables()

Declared at: clang/lib/Format/FormatTokenLexer.h:57

bool tryMergeCSharpStringLiteral()

Declared at: clang/lib/Format/FormatTokenLexer.h:56

bool tryMergeConflictMarkers()

Declared at: clang/lib/Format/FormatTokenLexer.h:93

bool tryMergeForEach()

Declared at: clang/lib/Format/FormatTokenLexer.h:60

bool tryMergeJSPrivateIdentifier()

Declared at: clang/lib/Format/FormatTokenLexer.h:55

bool tryMergeLessLess()

Declared at: clang/lib/Format/FormatTokenLexer.h:53

bool tryMergeNSStringLiteral()

Declared at: clang/lib/Format/FormatTokenLexer.h:54

bool tryMergeNullishCoalescingEqual()

Declared at: clang/lib/Format/FormatTokenLexer.h:58

void tryMergePreviousTokens()

Declared at: clang/lib/Format/FormatTokenLexer.h:51

bool tryMergeTokens(
    ArrayRef<tok::TokenKind> Kinds,
    clang::format::TokenType NewType)

Declared at: clang/lib/Format/FormatTokenLexer.h:63

Parameters

ArrayRef<tok::TokenKind> Kinds
clang::format::TokenType NewType

bool tryMerge_TMacro()

Declared at: clang/lib/Format/FormatTokenLexer.h:91

void tryParseJSRegexLiteral()

Declared at: clang/lib/Format/FormatTokenLexer.h:74

void tryParsePythonComment()

Declared at: clang/lib/Format/FormatTokenLexer.h:89

bool tryTransformCSharpForEach()

Declared at: clang/lib/Format/FormatTokenLexer.h:59

bool tryTransformTryUsageForC()

Declared at: clang/lib/Format/FormatTokenLexer.h:61