|
clang
3.8.0
|
#include <BreakableToken.h>
Public Member Functions | |
| BreakableStringLiteral (const FormatToken &Tok, unsigned IndentLevel, unsigned StartColumn, StringRef Prefix, StringRef Postfix, bool InPPDirective, encoding::Encoding Encoding, const FormatStyle &Style) | |
| Creates a breakable token for a single line string literal. More... | |
| Split | getSplit (unsigned LineIndex, unsigned TailOffset, unsigned ColumnLimit) const override |
Returns a range (offset, length) at which to break the line at LineIndex, if previously broken at TailOffset. More... | |
| void | insertBreak (unsigned LineIndex, unsigned TailOffset, Split Split, WhitespaceManager &Whitespaces) override |
Emits the previously retrieved Split via Whitespaces. More... | |
| void | replaceWhitespace (unsigned LineIndex, unsigned TailOffset, Split Split, WhitespaceManager &Whitespaces) override |
Replaces the whitespace range described by Split with a single space. More... | |
Public Member Functions inherited from clang::format::BreakableSingleLineToken | |
| unsigned | getLineCount () const override |
| Returns the number of lines in this token in the original code. More... | |
| unsigned | getLineLengthAfterSplit (unsigned LineIndex, unsigned TailOffset, StringRef::size_type Length) const override |
Returns the number of columns required to format the piece of line at LineIndex, from byte offset Offset with length Length. More... | |
Public Member Functions inherited from clang::format::BreakableToken | |
| virtual | ~BreakableToken () |
| virtual void | replaceWhitespaceBefore (unsigned LineIndex, WhitespaceManager &Whitespaces) |
Replaces the whitespace between LineIndex-1 and LineIndex. More... | |
Definition at line 114 of file BreakableToken.h.
| clang::format::BreakableStringLiteral::BreakableStringLiteral | ( | const FormatToken & | Tok, |
| unsigned | IndentLevel, | ||
| unsigned | StartColumn, | ||
| StringRef | Prefix, | ||
| StringRef | Postfix, | ||
| bool | InPPDirective, | ||
| encoding::Encoding | Encoding, | ||
| const FormatStyle & | Style | ||
| ) |
Creates a breakable token for a single line string literal.
StartColumn specifies the column in which the token will start after formatting.
Definition at line 155 of file BreakableToken.cpp.
|
overridevirtual |
Returns a range (offset, length) at which to break the line at LineIndex, if previously broken at TailOffset.
If possible, do not violate ColumnLimit.
Implements clang::format::BreakableToken.
Definition at line 163 of file BreakableToken.cpp.
References clang::format::BreakableToken::Encoding, clang::format::getStringSplit(), clang::format::BreakableSingleLineToken::Line, clang::format::BreakableSingleLineToken::Postfix, clang::format::BreakableSingleLineToken::Prefix, clang::format::BreakableSingleLineToken::StartColumn, clang::format::BreakableToken::Style, and clang::format::FormatStyle::TabWidth.
|
overridevirtual |
Emits the previously retrieved Split via Whitespaces.
Implements clang::format::BreakableToken.
Definition at line 170 of file BreakableToken.cpp.
References clang::format::BreakableToken::IndentLevel, clang::format::BreakableToken::InPPDirective, clang::format::BreakableSingleLineToken::Postfix, clang::format::BreakableSingleLineToken::Prefix, clang::format::WhitespaceManager::replaceWhitespaceInToken(), clang::format::BreakableSingleLineToken::StartColumn, and clang::format::BreakableToken::Tok.
|
inlineoverridevirtual |
Replaces the whitespace range described by Split with a single space.
Implements clang::format::BreakableToken.
Definition at line 129 of file BreakableToken.h.
1.8.6