15#ifndef LLVM_CLANG_LIB_FORMAT_TOKENANNOTATOR_H
16#define LLVM_CLANG_LIB_FORMAT_TOKENANNOTATOR_H
62 assert(!
Line.Tokens.empty());
71 if (
Node.Tok->MacroParent)
73 Current->Next =
Node.Tok;
74 Node.Tok->Previous = Current;
75 Current = Current->Next;
86 Current->Children.clear();
87 for (
const auto &Child :
Node.Children) {
89 if (
Children.back()->ContainsMacroCall)
91 Current->Children.push_back(
Children.back());
98 Size += Child->size();
107 Current->Children.clear();
108 Current->Role.reset();
109 Current = Current->Next;
119 template <
typename... Ts>
bool startsWith(Ts... Tokens)
const {
127 template <
typename... Ts>
bool endsWith(Ts... Tokens)
const {
151 startsWith(tok::kw_inline, tok::kw_namespace) ||
152 startsWith(tok::kw_export, tok::kw_namespace);
216 : Style(Style), IsCpp(Style.isCpp()),
218 assert(IsCpp == LangOpts.CXXOperatorNames);
232 bool InFunctionDecl)
const;
234 bool spaceRequiredBeforeParens(
const FormatToken &Right)
const;
258 unsigned Depth)
const;
260 getTokenReferenceAlignment(
const FormatToken &PointerOrReference)
const;
This file contains the declaration of the UnwrappedLineParser, which turns a stream of tokens into Un...
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
The base class of the type hierarchy.
The JSON file list parser is used to communicate input to InstallAPI.