clang API Documentation

Classes | Public Member Functions
clang::format::CommaSeparatedList Class Reference

#include <FormatToken.h>

Inheritance diagram for clang::format::CommaSeparatedList:
Inheritance graph
[legend]
Collaboration diagram for clang::format::CommaSeparatedList:
Collaboration graph
[legend]

List of all members.

Classes

struct  ColumnFormat
 A struct that holds information on how to format a given list with a specific number of columns.

Public Member Functions

 CommaSeparatedList (const FormatStyle &Style)
void precomputeFormattingInfos (const FormatToken *Token) override
 After the TokenAnnotator has finished annotating all the tokens, this function precomputes required information for formatting.
unsigned formatAfterToken (LineState &State, ContinuationIndenter *Indenter, bool DryRun) override
 Same as formatFromToken, but assumes that the first token has already been set thereby deciding on the first line break.
unsigned formatFromToken (LineState &State, ContinuationIndenter *Indenter, bool DryRun) override
 Apply the special formatting that the given role demands.
void CommaFound (const FormatToken *Token) override
 Adds Token as the next comma to the CommaSeparated list.

Detailed Description

Definition at line 483 of file FormatToken.h.


Constructor & Destructor Documentation

Definition at line 485 of file FormatToken.h.


Member Function Documentation

void clang::format::CommaSeparatedList::CommaFound ( const FormatToken Token) [inline, override, virtual]

Adds Token as the next comma to the CommaSeparated list.

Reimplemented from clang::format::TokenRole.

Definition at line 497 of file FormatToken.h.

unsigned clang::format::CommaSeparatedList::formatAfterToken ( LineState State,
ContinuationIndenter Indenter,
bool  DryRun 
) [override, virtual]
unsigned clang::format::CommaSeparatedList::formatFromToken ( LineState State,
ContinuationIndenter Indenter,
bool  DryRun 
) [override, virtual]

Apply the special formatting that the given role demands.

Assumes that the token having this role is already formatted.

Continues formatting from State leaving indentation to Indenter and returns the total penalty that this formatting incurs.

Reimplemented from clang::format::TokenRole.

Definition at line 113 of file FormatToken.cpp.

References clang::format::LineState::Stack.


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