| clang 22.0.0git
    | 
#include "/work/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Format/BreakableToken.h"
| Public Member Functions | |
| bool | supportsReflow () const override | 
| Returns whether the token supports reflowing text. | |
| unsigned | getLineCount () const override | 
| Returns the number of lines in this token in the original code. | |
| Split | getSplit (unsigned LineIndex, unsigned TailOffset, unsigned ColumnLimit, unsigned ContentStartColumn, const llvm::Regex &CommentPragmasRegex) const override | 
| Returns a range (offset, length) at which to break the line at LineIndex, if previously broken atTailOffset. | |
| void | compressWhitespace (unsigned LineIndex, unsigned TailOffset, Split Split, WhitespaceManager &Whitespaces) const override | 
| Replaces the whitespace range described by Splitwith a single space. | |
| Public Member Functions inherited from clang::format::BreakableToken | |
| virtual | ~BreakableToken () | 
| virtual unsigned | getRangeLength (unsigned LineIndex, unsigned Offset, StringRef::size_type Length, unsigned StartColumn) const =0 | 
| Returns the number of columns required to format the text in the byte range [ Offset,Offset+Length). | |
| virtual unsigned | getRemainingLength (unsigned LineIndex, unsigned Offset, unsigned StartColumn) const | 
| Returns the number of columns required to format the text following the byte Offsetin the lineLineIndex, including potentially unbreakable sequences of tokens following after the end of the token. | |
| virtual unsigned | getContentStartColumn (unsigned LineIndex, bool Break) const =0 | 
| Returns the column at which content in line LineIndexstarts, assuming no reflow. | |
| virtual unsigned | getContentIndent (unsigned LineIndex) const | 
| Returns additional content indent required for the second line after the content at line LineIndexis broken. | |
| virtual void | insertBreak (unsigned LineIndex, unsigned TailOffset, Split Split, unsigned ContentIndent, WhitespaceManager &Whitespaces) const =0 | 
| Emits the previously retrieved SplitviaWhitespaces. | |
| unsigned | getLengthAfterCompression (unsigned RemainingTokenColumns, Split Split) const | 
| Returns the number of columns needed to format RemainingTokenColumns, assuming that Split is within the range measured byRemainingTokenColumns, and that the whitespace in Split is reduced to a single space. | |
| virtual Split | getReflowSplit (unsigned LineIndex, const llvm::Regex &CommentPragmasRegex) const | 
| Returns a whitespace range (offset, length) of the content at LineIndexsuch that the content of that line is reflown to the end of the previous one. | |
| virtual void | reflow (unsigned LineIndex, WhitespaceManager &Whitespaces) const | 
| Reflows the current line into the end of the previous one. | |
| virtual bool | introducesBreakBeforeToken () const | 
| Returns whether there will be a line break at the start of the token. | |
| virtual void | adaptStartOfLine (unsigned LineIndex, WhitespaceManager &Whitespaces) const | 
| Replaces the whitespace between LineIndex-1andLineIndex. | |
| virtual Split | getSplitAfterLastLine (unsigned TailOffset) const | 
| Returns a whitespace range (offset, length) of the content at the last line that needs to be reformatted after the last line has been reformatted. | |
| void | replaceWhitespaceAfterLastLine (unsigned TailOffset, Split SplitAfterLastLine, WhitespaceManager &Whitespaces) const | 
| Replaces the whitespace from SplitAfterLastLineon the last line after the last line has been formatted by performing a reformatting. | |
| virtual void | updateNextToken (LineState &State) const | 
| Updates the next token of Stateto the next token after this one. | |
| virtual void | updateAfterBroken (WhitespaceManager &Whitespaces) const | 
| Adds replacements that are needed when the token is broken. | |
| Protected Member Functions | |
| BreakableComment (const FormatToken &Token, unsigned StartColumn, bool InPPDirective, encoding::Encoding Encoding, const FormatStyle &Style) | |
| Creates a breakable token for a comment. | |
| const FormatToken & | tokenAt (unsigned LineIndex) const | 
| virtual bool | mayReflow (unsigned LineIndex, const llvm::Regex &CommentPragmasRegex) const =0 | 
| Protected Member Functions inherited from clang::format::BreakableToken | |
| BreakableToken (const FormatToken &Tok, bool InPPDirective, encoding::Encoding Encoding, const FormatStyle &Style) | |
| Protected Attributes | |
| SmallVector< StringRef, 16 > | Lines | 
| SmallVector< StringRef, 16 > | Content | 
| SmallVector< FormatToken *, 16 > | Tokens | 
| SmallVector< int, 16 > | ContentColumn | 
| unsigned | StartColumn | 
| const bool | AlwaysReflow = Style.ReflowComments == FormatStyle::RCS_Always | 
| StringRef | ReflowPrefix = " " | 
| Protected Attributes inherited from clang::format::BreakableToken | |
| const FormatToken & | Tok | 
| const bool | InPPDirective | 
| const encoding::Encoding | Encoding | 
| const FormatStyle & | Style | 
| Additional Inherited Members | |
| Public Types inherited from clang::format::BreakableToken | |
| typedef std::pair< StringRef::size_type, unsigned > | Split | 
| Contains starting character index and length of split. | |
Definition at line 327 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 398 of file BreakableToken.cpp.
References BreakableComment(), clang::format::BreakableToken::BreakableToken(), clang::format::BreakableToken::Encoding, clang::format::BreakableToken::InPPDirective, StartColumn, and clang::format::BreakableToken::Style.
Referenced by clang::format::BreakableBlockComment::BreakableBlockComment(), BreakableComment(), and clang::format::BreakableLineCommentSection::BreakableLineCommentSection().
| 
 | overridevirtual | 
Replaces the whitespace range described by Split with a single space. 
Implements clang::format::BreakableToken.
Definition at line 419 of file BreakableToken.cpp.
References Content, clang::format::WhitespaceManager::replaceWhitespaceInToken(), clang::Text, tokenAt(), and clang::format::FormatToken::TokenText.
| 
 | overridevirtual | 
Returns the number of lines in this token in the original code.
Implements clang::format::BreakableToken.
Definition at line 405 of file BreakableToken.cpp.
References Lines.
| 
 | 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, assuming the text starting at TailOffset in the token is formatted starting at ContentStartColumn in the reformatted file. 
Implements clang::format::BreakableToken.
Definition at line 408 of file BreakableToken.cpp.
References AlwaysReflow, Content, clang::format::BreakableToken::Encoding, clang::format::getCommentSplit(), and clang::format::BreakableToken::Style.
| 
 | protectedpure virtual | 
Implemented in clang::format::BreakableBlockComment, and clang::format::BreakableLineCommentSection.
| 
 | inlineoverridevirtual | 
Returns whether the token supports reflowing text.
Reimplemented from clang::format::BreakableToken.
Definition at line 338 of file BreakableToken.h.
| 
 | protected | 
Definition at line 435 of file BreakableToken.cpp.
References clang::format::BreakableToken::Tok, and Tokens.
Referenced by clang::format::BreakableBlockComment::adaptStartOfLine(), clang::format::BreakableLineCommentSection::adaptStartOfLine(), compressWhitespace(), clang::format::BreakableBlockComment::insertBreak(), clang::format::BreakableLineCommentSection::insertBreak(), clang::format::BreakableBlockComment::mayReflow(), clang::format::BreakableLineCommentSection::mayReflow(), clang::format::BreakableBlockComment::reflow(), and clang::format::BreakableLineCommentSection::reflow().
| 
 | protected | 
Definition at line 387 of file BreakableToken.h.
Referenced by clang::format::BreakableBlockComment::getSplit(), getSplit(), clang::format::BreakableBlockComment::mayReflow(), and clang::format::BreakableLineCommentSection::mayReflow().
| 
 | protected | 
Definition at line 365 of file BreakableToken.h.
Referenced by clang::format::BreakableBlockComment::adaptStartOfLine(), clang::format::BreakableLineCommentSection::adaptStartOfLine(), clang::format::BreakableBlockComment::BreakableBlockComment(), clang::format::BreakableLineCommentSection::BreakableLineCommentSection(), compressWhitespace(), clang::format::BreakableBlockComment::getContentIndent(), clang::format::BreakableBlockComment::getRangeLength(), clang::format::BreakableLineCommentSection::getRangeLength(), clang::format::BreakableBlockComment::getReflowSplit(), clang::format::BreakableLineCommentSection::getReflowSplit(), clang::format::BreakableBlockComment::getRemainingLength(), clang::format::BreakableBlockComment::getSplit(), getSplit(), clang::format::BreakableBlockComment::getSplitAfterLastLine(), clang::format::BreakableBlockComment::insertBreak(), clang::format::BreakableLineCommentSection::insertBreak(), clang::format::BreakableBlockComment::mayReflow(), clang::format::BreakableLineCommentSection::mayReflow(), clang::format::BreakableBlockComment::reflow(), and clang::format::BreakableLineCommentSection::reflow().
| 
 | protected | 
Definition at line 382 of file BreakableToken.h.
Referenced by clang::format::BreakableBlockComment::adaptStartOfLine(), clang::format::BreakableLineCommentSection::adaptStartOfLine(), clang::format::BreakableBlockComment::BreakableBlockComment(), clang::format::BreakableLineCommentSection::BreakableLineCommentSection(), clang::format::BreakableBlockComment::getContentStartColumn(), clang::format::BreakableLineCommentSection::getContentStartColumn(), and clang::format::BreakableLineCommentSection::insertBreak().
| 
 | protected | 
Definition at line 360 of file BreakableToken.h.
Referenced by clang::format::BreakableBlockComment::adaptStartOfLine(), clang::format::BreakableLineCommentSection::adaptStartOfLine(), clang::format::BreakableBlockComment::BreakableBlockComment(), clang::format::BreakableLineCommentSection::BreakableLineCommentSection(), getLineCount(), clang::format::BreakableBlockComment::getRemainingLength(), clang::format::BreakableBlockComment::insertBreak(), clang::format::BreakableBlockComment::introducesBreakBeforeToken(), clang::format::BreakableBlockComment::mayReflow(), clang::format::BreakableLineCommentSection::mayReflow(), and clang::format::BreakableLineCommentSection::reflow().
| 
 | protected | 
Definition at line 397 of file BreakableToken.h.
Referenced by clang::format::BreakableBlockComment::reflow(), and clang::format::BreakableLineCommentSection::reflow().
| 
 | protected | 
Definition at line 385 of file BreakableToken.h.
Referenced by clang::format::BreakableBlockComment::BreakableBlockComment(), BreakableComment(), clang::format::BreakableLineCommentSection::BreakableLineCommentSection(), clang::format::BreakableBlockComment::getRangeLength(), clang::format::BreakableLineCommentSection::getRangeLength(), clang::format::BreakableBlockComment::getRemainingLength(), and clang::format::BreakableLineCommentSection::reflow().
| 
 | protected | 
Definition at line 370 of file BreakableToken.h.
Referenced by clang::format::BreakableLineCommentSection::adaptStartOfLine(), clang::format::BreakableBlockComment::BreakableBlockComment(), clang::format::BreakableLineCommentSection::BreakableLineCommentSection(), clang::format::BreakableBlockComment::reflow(), clang::format::BreakableLineCommentSection::reflow(), and tokenAt().