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;
403 unsigned OriginalStartColumn,
bool FirstInLine,
407 Split getSplit(
unsigned LineIndex,
unsigned TailOffset,
unsigned ColumnLimit,
408 unsigned ContentStartColumn,
409 const llvm::Regex &CommentPragmasRegex)
const override;
411 StringRef::size_type Length,
418 unsigned ContentIndent,
421 const llvm::Regex &CommentPragmasRegex)
const override;
422 void reflow(
unsigned LineIndex,
430 const llvm::Regex &CommentPragmasRegex)
const override;
445 void adjustWhitespace(
unsigned LineIndex,
int IndentDelta);
457 unsigned IndentAtLineBreak;
461 bool LastLineNeedsDecoration;
464 StringRef Decoration;
468 unsigned DecorationColumn;
472 bool DelimitersOnNewline;
476 unsigned UnbreakableTailLength;
486 StringRef::size_type Length,
490 unsigned ContentIndent,
493 const llvm::Regex &CommentPragmasRegex)
const override;
494 void reflow(
unsigned LineIndex,
500 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.