Searched refs:FormatToken (Results 1 - 23 of 23) sorted by relevance

/freebsd-12-stable/contrib/llvm-project/clang/lib/Format/
H A DFormatTokenLexer.h19 #include "FormatToken.h"
42 ArrayRef<FormatToken *> lex();
61 bool precedesOperand(FormatToken *Tok);
63 bool canPrecedeRegexLiteral(FormatToken *Prev);
88 FormatToken *getStashedToken();
90 FormatToken *getNextToken();
92 FormatToken *FormatTok;
104 llvm::SpecificBumpPtrAllocator<FormatToken> Allocator;
107 SmallVector<FormatToken *, 16> Tokens;
116 void readRawToken(FormatToken
[all...]
H A DAffectedRangeManager.h22 struct FormatToken;
42 bool affectsTokenRange(const FormatToken &First, const FormatToken &Last,
47 bool affectsLeadingEmptyLines(const FormatToken &Tok);
H A DTokenAnnotator.h54 FormatToken *Current = First;
76 FormatToken *Current = First;
122 FormatToken *First;
123 FormatToken *Last;
172 unsigned splitPenalty(const AnnotatedLine &Line, const FormatToken &Tok,
175 bool spaceRequiredBeforeParens(const FormatToken &Right) const;
177 bool spaceRequiredBetween(const AnnotatedLine &Line, const FormatToken &Left,
178 const FormatToken &Right);
180 bool spaceRequiredBefore(const AnnotatedLine &Line, const FormatToken &Right);
182 bool mustBreakBefore(const AnnotatedLine &Line, const FormatToken
[all...]
H A DUnwrappedLineParser.h18 #include "FormatToken.h"
79 unsigned FirstStartColumn, ArrayRef<FormatToken *> Tokens,
150 void distributeComments(const SmallVectorImpl<FormatToken *> &Comments,
151 const FormatToken *NextTok);
155 void pushToken(FormatToken *Tok);
167 bool isOnNewLine(const FormatToken &FormatTok);
183 SmallVector<FormatToken *, 1> CommentsBeforeNextToken;
184 FormatToken *FormatTok;
216 ArrayRef<FormatToken *> AllTokens;
270 FormatToken *IncludeGuardToke
[all...]
H A DNamespaceEndCommentsFixer.cpp31 std::string computeName(const FormatToken *NamespaceTok) {
36 const FormatToken *Tok = NamespaceTok->getNextNonComment();
51 const FormatToken *FirstNSTok = Tok;
69 const FormatToken *NamespaceTok) {
84 bool hasEndComment(const FormatToken *RBraceTok) {
88 bool validEndComment(const FormatToken *RBraceTok, StringRef NamespaceName,
89 const FormatToken *NamespaceTok) {
91 const FormatToken *Comment = RBraceTok->Next;
127 void addEndComment(const FormatToken *RBraceTok, StringRef EndCommentText,
139 void updateEndComment(const FormatToken *RBraceTo
[all...]
H A DNamespaceEndCommentsFixer.h29 const FormatToken *
H A DWhitespaceManager.h51 void replaceWhitespace(FormatToken &Tok, unsigned Newlines, unsigned Spaces,
59 void addUntouchableToken(const FormatToken &Tok, bool InPPDirective);
77 void replaceWhitespaceInToken(const FormatToken &Tok, unsigned Offset,
108 Change(const FormatToken &Tok, bool CreateReplacement,
118 const FormatToken *Tok;
122 // FormatToken around to query its information.
H A DBreakableToken.h32 bool switchesFormatting(const FormatToken &Token);
234 BreakableToken(const FormatToken &Tok, bool InPPDirective,
239 const FormatToken &Tok;
251 BreakableStringLiteral(const FormatToken &Tok, unsigned StartColumn,
292 BreakableComment(const FormatToken &Token, unsigned StartColumn,
307 const FormatToken &tokenAt(unsigned LineIndex) const;
329 SmallVector<FormatToken *, 16> Tokens;
359 BreakableBlockComment(const FormatToken &Token, unsigned StartColumn,
438 BreakableLineCommentSection(const FormatToken &Token, unsigned StartColumn,
486 FormatToken *LastLineTo
[all...]
H A DContinuationIndenter.h19 #include "FormatToken.h"
32 struct FormatToken;
111 unsigned reformatRawStringLiteral(const FormatToken &Current,
118 unsigned handleEndOfLine(const FormatToken &Current, LineState &State,
123 llvm::Optional<FormatStyle> getRawStringStyle(const FormatToken &Current,
144 std::pair<unsigned, bool> breakProtrudingToken(const FormatToken &Current,
152 createBreakableToken(const FormatToken &Current, LineState &State,
182 unsigned addMultilineToken(const FormatToken &Current, LineState &State);
202 ParenState(const FormatToken *Tok, unsigned Indent, unsigned LastSpace,
218 const FormatToken *To
[all...]
H A DFormatToken.cpp1 //===--- FormatToken.cpp - Format C++ code --------------------------------===//
15 #include "FormatToken.h"
39 bool FormatToken::isSimpleTypeSpecifier() const {
72 void TokenRole::precomputeFormattingInfos(const FormatToken *Token) {}
84 const FormatToken *LBrace =
145 static unsigned CodePointsBetween(const FormatToken *Begin,
146 const FormatToken *End) {
151 void CommaSeparatedList::precomputeFormattingInfos(const FormatToken *Token) {
174 FormatToken *ItemBegin = Token->Next;
194 const FormatToken *ItemEn
[all...]
H A DAffectedRangeManager.cpp16 #include "FormatToken.h"
35 FormatToken *Last = Line->Last;
72 bool AffectedRangeManager::affectsTokenRange(const FormatToken &First,
73 const FormatToken &Last,
84 bool AffectedRangeManager::affectsLeadingEmptyLines(const FormatToken &Tok) {
119 for (FormatToken *Tok = Line->First; Tok; Tok = Tok->Next) {
H A DFormatToken.h1 //===--- FormatToken.h - Format C++ code ------------------------*- C++ -*-===//
10 /// This file contains the declaration of the FormatToken, a wrapper
131 struct FormatToken { struct in namespace:clang::format
132 FormatToken() {} function in struct:clang::format::FormatToken
281 FormatToken *NextOperator = nullptr;
294 FormatToken *MatchingParen = nullptr;
297 FormatToken *Previous = nullptr;
300 FormatToken *Next = nullptr;
489 FormatToken *getPreviousNonComment() const {
490 FormatToken *To
[all...]
H A DTokenAnnotator.cpp16 #include "FormatToken.h"
40 static bool canBeObjCSelectorComponent(const FormatToken &Tok) {
46 static bool isLambdaParameterList(const FormatToken *Left) {
81 const FormatToken &Previous = *CurrentToken->Previous; // The '<'.
91 FormatToken *Left = CurrentToken->Previous;
150 if (FormatToken *Previous = CurrentToken->getPreviousNonComment()) {
166 FormatToken *Left = CurrentToken->Previous;
175 if (FormatToken *MaybeSel = Left->Previous) {
253 FormatToken *PossibleObjCForInToken = nullptr;
260 FormatToken *Pre
[all...]
H A DUnwrappedLineParser.cpp30 virtual FormatToken *getNextToken() = 0;
33 virtual FormatToken *setPosition(unsigned Position) = 0;
59 static bool isLineComment(const FormatToken &FormatTok) {
66 static bool continuesLineComment(const FormatToken &FormatTok,
67 const FormatToken *Previous,
68 const FormatToken *MinColumnToken) {
81 FormatToken *&ResetToken)
99 FormatToken *getNextToken() override {
112 FormatToken *setPosition(unsigned Position) override {
125 FormatToken FakeEO
[all...]
H A DContinuationIndenter.cpp37 static unsigned getLengthToMatchingParen(const FormatToken &Tok,
79 FormatToken *End = Tok.MatchingParen;
86 auto FindParenState = [&](const FormatToken *LBrace) -> const ParenState * {
107 static unsigned getLengthToNextOperator(const FormatToken &Tok) {
115 static bool startsSegmentOfBuilderTypeCall(const FormatToken &Tok) {
120 static bool startsNextParameter(const FormatToken &Current,
122 const FormatToken &Previous = *Current.Previous;
136 static bool opensProtoMessageField(const FormatToken &LessTok,
278 const FormatToken &Current = *State.NextToken;
279 const FormatToken
[all...]
H A DFormatTokenLexer.cpp11 /// into a FormatToken stream suitable for ClangFormat.
16 #include "FormatToken.h"
48 ArrayRef<FormatToken *> FormatTokenLexer::lex() {
317 SmallVectorImpl<FormatToken *>::const_iterator First =
337 bool FormatTokenLexer::precedesOperand(FormatToken *Tok) {
350 bool FormatTokenLexer::canPrecedeRegexLiteral(FormatToken *Prev) {
376 FormatToken *RegexToken = Tokens.back();
380 FormatToken *Prev = nullptr;
431 FormatToken *BacktickToken = Tokens.back();
498 FormatToken *HashToke
[all...]
H A DUnwrappedLineFormatter.cpp23 const FormatToken *Next = Line.First->getNextNonComment();
24 const FormatToken *NextNext = Next ? Next->getNextNonComment() : nullptr;
95 int getIndentOffset(const FormatToken &RootToken) {
137 const FormatToken *getMatchingNamespaceToken(
150 const FormatToken *NamespaceToken = Line->First->getNamespaceToken();
157 const FormatToken *NamespaceToken =
233 const FormatToken *Tok = I[-1]->First;
538 const FormatToken *Tok = Line.First->getNextNonComment();
582 FormatToken *Tok = I[1]->First;
593 FormatToken *RecordTo
[all...]
H A DSortJavaScriptImports.cpp206 FormatToken *Current;
207 FormatToken *LineEnd;
209 FormatToken invalidToken;
215 FormatToken *skipComments(FormatToken *Tok) {
H A DBreakableToken.cpp186 bool switchesFormatting(const FormatToken &Token) {
235 const FormatToken &Tok, unsigned StartColumn, StringRef Prefix,
262 BreakableComment::BreakableComment(const FormatToken &Token,
299 const FormatToken &BreakableComment::tokenAt(unsigned LineIndex) const {
334 const FormatToken &Token, unsigned StartColumn,
722 const FormatToken &Token, unsigned StartColumn,
728 FormatToken *LineTok = nullptr;
729 for (const FormatToken *CurrentTok = &Tok;
H A DUsingDeclarationsSorter.cpp87 std::string computeUsingDeclarationLabel(const FormatToken *UsingTok) {
90 const FormatToken *Tok = UsingTok->Next;
H A DWhitespaceManager.cpp27 WhitespaceManager::Change::Change(const FormatToken &Tok,
45 void WhitespaceManager::replaceWhitespace(FormatToken &Tok, unsigned Newlines,
58 void WhitespaceManager::addUntouchableToken(const FormatToken &Tok,
75 const FormatToken &Tok, unsigned Offset, unsigned ReplaceChars,
482 const FormatToken *Current = C.Tok;
596 for (FormatToken *Next = C.Tok->Next; Next; Next = Next->Next) {
H A DFormat.cpp1280 for (FormatToken *FormatTok = Line->First; FormatTok;
1399 for (FormatToken *Tok = Line->First->Next; Tok; Tok = Tok->Next) {
1416 for (FormatToken *Tok = Line->First; Tok && Tok->Next; Tok = Tok->Next) {
1439 FormatToken *Tok = AnnotatedLines[i]->First->Next;
1513 for (FormatToken *Tok = Line.First; Tok != nullptr; Tok = Tok->Next) {
1531 FormatToken *Tok = AnnotatedLines[Line]->First;
1601 void cleanupPair(FormatToken *Start, LeftKind LK, RightKind RK,
1603 auto NextNotDeleted = [this](const FormatToken &Tok) -> FormatToken * {
1628 void cleanupLeft(FormatToken *Star
[all...]
/freebsd-12-stable/lib/clang/libclang/
H A DMakefile351 SRCS_EXT+= Format/FormatToken.cpp

Completed in 291 milliseconds