15 #ifndef LLVM_CLANG_LIB_FORMAT_TOKENANNOTATOR_H 16 #define LLVM_CLANG_LIB_FORMAT_TOKENANNOTATOR_H 48 assert(!Line.
Tokens.empty());
55 for (std::list<UnwrappedLineNode>::const_iterator I = ++Line.
Tokens.begin(),
60 I->Tok->Previous = Current;
61 Current = Current->
Next;
63 for (
const auto &Child : Node.
Children) {
73 for (
unsigned i = 0, e =
Children.size();
i != e; ++
i) {
79 Current->
Role.reset();
80 Current = Current->
Next;
86 template <
typename... Ts>
bool startsWith(Ts... Tokens)
const {
94 template <
typename... Ts>
bool endsWith(Ts... Tokens)
const {
119 startsWith(tok::kw_inline, tok::kw_namespace) ||
120 startsWith(tok::kw_export, tok::kw_namespace);
161 : Style(Style), Keywords(Keywords) {}
174 bool InFunctionDecl);
176 bool spaceRequiredBeforeParens(
const FormatToken &Right)
const;
187 bool mustBreakForReturnType(
const AnnotatedLine &Line)
const;
const AnnotatedLine * Line
This file contains the declaration of the UnwrappedLineParser, which turns a stream of tokens into Un...
ast_type_traits::DynTypedNode Node
Dataflow Directional Tag Classes.