15#ifndef LLVM_CLANG_LIB_FORMAT_TOKENANNOTATOR_H
16#define LLVM_CLANG_LIB_FORMAT_TOKENANNOTATOR_H
64 assert(!
Line.Tokens.empty());
73 if (
Node.Tok->MacroParent)
75 Current->Next =
Node.Tok;
76 Node.Tok->Previous = Current;
77 Current = Current->Next;
88 Current->Children.clear();
89 for (
const auto &Child :
Node.Children) {
91 if (
Children.back()->ContainsMacroCall)
93 Current->Children.push_back(
Children.back());
100 Size += Child->size();
109 Current->Children.clear();
110 Current->Role.reset();
111 Current = Current->Next;
121 template <
typename... Ts>
bool startsWith(Ts... Tokens)
const {
129 template <
typename... Ts>
bool endsWith(Ts... Tokens)
const {
153 startsWith(tok::kw_inline, tok::kw_namespace) ||
154 startsWith(tok::kw_export, tok::kw_namespace);
221 : Style(Style), IsCpp(Style.isCpp()),
223 assert(IsCpp == LangOpts.CXXOperatorNames);
237 bool InFunctionDecl)
const;
239 bool spaceRequiredBeforeParens(
const FormatToken &Right)
const;
263 unsigned Depth)
const;
265 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.