clang
10.0.0git
|
#include "/work/www-prereleases/10.0.0/rc2/docsbuild/clang/lib/Format/BreakableToken.h"
Public Member Functions | |
bool | supportsReflow () const override |
unsigned | getLineCount () const override |
Split | getSplit (unsigned LineIndex, unsigned TailOffset, unsigned ColumnLimit, unsigned ContentStartColumn, const llvm::Regex &CommentPragmasRegex) const override |
void | compressWhitespace (unsigned LineIndex, unsigned TailOffset, Split Split, WhitespaceManager &Whitespaces) const override |
Protected Member Functions | |
BreakableComment (const FormatToken &Token, unsigned StartColumn, bool InPPDirective, encoding::Encoding Encoding, const FormatStyle &Style) | |
Creates a breakable token for a comment. More... | |
const FormatToken & | tokenAt (unsigned LineIndex) const |
virtual bool | mayReflow (unsigned LineIndex, const llvm::Regex &CommentPragmasRegex) const =0 |
Protected Attributes | |
SmallVector< StringRef, 16 > | Lines |
SmallVector< StringRef, 16 > | Content |
SmallVector< FormatToken *, 16 > | Tokens |
SmallVector< int, 16 > | ContentColumn |
unsigned | StartColumn |
StringRef | ReflowPrefix = " " |
Definition at line 286 of file BreakableToken.h.
|
protected |
Creates a breakable token for a comment.
StartColumn
specifies the column in which the comment will start after formatting.
Definition at line 262 of file BreakableToken.cpp.
|
override |
Definition at line 283 of file BreakableToken.cpp.
|
override |
Definition at line 269 of file BreakableToken.cpp.
References Lines.
|
override |
Definition at line 272 of file BreakableToken.cpp.
References Content, clang::format::Encoding, clang::format::getCommentSplit(), Split, and clang::format::Style.
|
protectedpure virtual |
Implemented in clang::format::BreakableLineCommentSection, and clang::format::BreakableBlockComment.
|
inlineoverride |
Definition at line 297 of file BreakableToken.h.
References clang::format::compressWhitespace(), clang::format::getLineCount(), clang::format::getSplit(), and Split.
|
protected |
Definition at line 299 of file BreakableToken.cpp.
References clang::format::Tok, and Tokens.
Referenced by clang::format::BreakableBlockComment::mayReflow(), and clang::format::BreakableLineCommentSection::mayReflow().
|
protected |
Definition at line 324 of file BreakableToken.h.
Referenced by clang::format::BreakableBlockComment::BreakableBlockComment(), clang::format::BreakableLineCommentSection::BreakableLineCommentSection(), clang::format::BreakableBlockComment::getContentIndent(), clang::format::BreakableBlockComment::getRangeLength(), clang::format::BreakableLineCommentSection::getRangeLength(), clang::format::BreakableBlockComment::getReflowSplit(), clang::format::BreakableLineCommentSection::getReflowSplit(), getSplit(), clang::format::BreakableBlockComment::getSplit(), clang::format::BreakableBlockComment::getSplitAfterLastLine(), clang::format::BreakableBlockComment::mayReflow(), and clang::format::BreakableLineCommentSection::mayReflow().
|
protected |
Definition at line 341 of file BreakableToken.h.
Referenced by clang::format::BreakableBlockComment::BreakableBlockComment(), clang::format::BreakableLineCommentSection::BreakableLineCommentSection(), clang::format::BreakableBlockComment::getContentStartColumn(), clang::format::BreakableLineCommentSection::getContentStartColumn(), and clang::format::BreakableBlockComment::getSplit().
|
protected |
Definition at line 319 of file BreakableToken.h.
Referenced by clang::format::BreakableBlockComment::BreakableBlockComment(), clang::format::BreakableLineCommentSection::BreakableLineCommentSection(), getLineCount(), clang::format::BreakableBlockComment::getRangeLength(), clang::format::BreakableBlockComment::getSplit(), clang::format::BreakableBlockComment::introducesBreakBeforeToken(), clang::format::BreakableBlockComment::mayReflow(), and clang::format::BreakableLineCommentSection::mayReflow().
|
protected |
Definition at line 354 of file BreakableToken.h.
|
protected |
Definition at line 344 of file BreakableToken.h.
Referenced by clang::format::BreakableBlockComment::BreakableBlockComment().
|
protected |
Definition at line 329 of file BreakableToken.h.
Referenced by clang::format::BreakableBlockComment::BreakableBlockComment(), clang::format::BreakableLineCommentSection::BreakableLineCommentSection(), and tokenAt().