17#ifndef LLVM_CLANG_LIB_FORMAT_BREAKABLETOKEN_H
18#define LLVM_CLANG_LIB_FORMAT_BREAKABLETOKEN_H
22#include "llvm/ADT/StringSet.h"
89 typedef std::pair<StringRef::size_type, unsigned>
Split;
105 StringRef::size_type Length,
106 unsigned StartColumn)
const = 0;
121 unsigned StartColumn)
const {
122 return getRangeLength(LineIndex, Offset, StringRef::npos, StartColumn);
133 bool Break)
const = 0;
154 unsigned ColumnLimit,
unsigned ContentStartColumn,
155 const llvm::Regex &CommentPragmasRegex)
const = 0;
159 unsigned ContentIndent,
190 const llvm::Regex &CommentPragmasRegex)
const {
191 return Split(StringRef::npos, 0);
213 return Split(StringRef::npos, 0);
219 Split SplitAfterLastLine,
258 Split getSplit(
unsigned LineIndex,
unsigned TailOffset,
unsigned ColumnLimit,
259 unsigned ContentStartColumn,
260 const llvm::Regex &CommentPragmasRegex)
const override;
262 unsigned ContentIndent,
268 StringRef::size_type Length,
309 unsigned ContentIndent,
340 Split getSplit(
unsigned LineIndex,
unsigned TailOffset,
unsigned ColumnLimit,
341 unsigned ContentStartColumn,
342 const llvm::Regex &CommentPragmasRegex)
const override;
353 const llvm::Regex &CommentPragmasRegex)
const = 0;
401 unsigned OriginalStartColumn,
bool FirstInLine,
405 Split getSplit(
unsigned LineIndex,
unsigned TailOffset,
unsigned ColumnLimit,
406 unsigned ContentStartColumn,
407 const llvm::Regex &CommentPragmasRegex)
const override;
409 StringRef::size_type Length,
416 unsigned ContentIndent,
419 const llvm::Regex &CommentPragmasRegex)
const override;
420 void reflow(
unsigned LineIndex,
428 const llvm::Regex &CommentPragmasRegex)
const override;
443 void adjustWhitespace(
unsigned LineIndex,
int IndentDelta);
455 unsigned IndentAtLineBreak;
459 bool LastLineNeedsDecoration;
462 StringRef Decoration;
466 unsigned DecorationColumn;
470 bool DelimitersOnNewline;
474 unsigned UnbreakableTailLength;
484 StringRef::size_type Length,
488 unsigned ContentIndent,
491 const llvm::Regex &CommentPragmasRegex)
const override;
492 void reflow(
unsigned LineIndex,
498 const llvm::Regex &CommentPragmasRegex)
const override;
Contains functions for text encoding manipulation.
WhitespaceManager class manages whitespace around tokens and their replacements.
Token - This structure provides full information about a lexed token.
The JSON file list parser is used to communicate input to InstallAPI.