17 #ifndef LLVM_CLANG_LIB_FORMAT_BREAKABLETOKEN_H
18 #define LLVM_CLANG_LIB_FORMAT_BREAKABLETOKEN_H
37 typedef std::pair<StringRef::size_type, unsigned>
Split;
52 StringRef::size_type Length)
const = 0;
57 virtual Split getSplit(
unsigned LineIndex,
unsigned TailOffset,
58 unsigned ColumnLimit)
const = 0;
78 : Tok(Tok), IndentLevel(IndentLevel), InPPDirective(InPPDirective),
79 Encoding(Encoding), Style(Style) {}
95 StringRef::size_type Length)
const override;
126 unsigned ColumnLimit)
const override;
144 unsigned ColumnLimit)
const override;
154 StringRef OriginalPrefix;
166 unsigned StartColumn,
unsigned OriginaStartColumn,
172 StringRef::size_type Length)
const override;
174 unsigned ColumnLimit)
const override;
194 void adjustWhitespace(
unsigned LineIndex,
int IndentDelta);
199 unsigned getContentStartColumn(
unsigned LineIndex,
unsigned TailOffset)
const;
232 unsigned IndentAtLineBreak;
236 bool LastLineNeedsDecoration;
239 StringRef Decoration;
Contains functions for text encoding manipulation. Supports UTF-8, 8-bit encodings and escape sequenc...
This file implements a token annotator, i.e. creates AnnotatedTokens out of FormatTokens with require...
WhitespaceManager class manages whitespace around tokens and their replacements.