15#ifndef LLVM_CLANG_LIB_FORMAT_TOKENANNOTATOR_H
16#define LLVM_CLANG_LIB_FORMAT_TOKENANNOTATOR_H
60 assert(!
Line.Tokens.empty());
69 if (
Node.Tok->MacroParent)
71 Current->Next =
Node.Tok;
72 Node.Tok->Previous = Current;
73 Current = Current->Next;
84 Current->Children.clear();
85 for (
const auto &Child :
Node.Children) {
87 if (
Children.back()->ContainsMacroCall)
89 Current->Children.push_back(
Children.back());
96 Size += Child->size();
105 Current->Children.clear();
106 Current->Role.reset();
107 Current = Current->Next;
117 template <
typename... Ts>
bool startsWith(Ts... Tokens)
const {
125 template <
typename... Ts>
bool endsWith(Ts... Tokens)
const {
149 startsWith(tok::kw_inline, tok::kw_namespace) ||
150 startsWith(tok::kw_export, tok::kw_namespace);
214 : Style(Style), Keywords(Keywords) {
215 assert(
IsCpp == Style.isCpp());
229 bool InFunctionDecl)
const;
231 bool spaceRequiredBeforeParens(
const FormatToken &Right)
const;
255 unsigned Depth)
const;
257 getTokenReferenceAlignment(
const FormatToken &PointerOrReference)
const;
This file contains the declaration of the UnwrappedLineParser, which turns a stream of tokens into Un...
The JSON file list parser is used to communicate input to InstallAPI.