15#ifndef LLVM_CLANG_LIB_FORMAT_CONTINUATIONINDENTER_H
16#define LLVM_CLANG_LIB_FORMAT_CONTINUATIONINDENTER_H
21#include "llvm/Support/Regex.h"
36struct RawStringFormatStyleManager;
37class WhitespaceManager;
47 std::optional<FormatStyle>
60 bool BinPackInconclusiveFunctions);
86 unsigned ExtraSpaces = 0);
95 unsigned moveStateToNextToken(
LineState &State,
bool DryRun,
bool Newline);
98 void moveStatePastFakeLParens(
LineState &State,
bool Newline);
100 void moveStatePastFakeRParens(
LineState &State);
103 void moveStatePastScopeOpener(
LineState &State,
bool Newline);
105 void moveStatePastScopeCloser(
LineState &State);
107 void moveStateToNewBlock(
LineState &State);
112 unsigned reformatRawStringLiteral(
const FormatToken &Current,
115 bool DryRun,
bool Newline);
120 bool DryRun,
bool AllowBreak,
bool Newline);
124 std::optional<FormatStyle> getRawStringStyle(
const FormatToken &Current,
145 std::pair<unsigned, bool> breakProtrudingToken(
const FormatToken &Current,
147 bool AllowBreak,
bool DryRun,
152 std::unique_ptr<BreakableToken>
163 void addTokenOnCurrentLine(
LineState &State,
bool DryRun,
164 unsigned ExtraSpaces);
173 unsigned addTokenOnNewLine(
LineState &State,
bool DryRun);
176 unsigned getNewLineColumn(
const LineState &State);
190 bool nextIsMultilineString(
const LineState &State);
197 bool BinPackInconclusiveFunctions;
198 llvm::Regex CommentPragmasRegex;
Contains functions for text encoding manipulation.
This class handles loading and caching of source files into memory.