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

/freebsd-13-stable/contrib/llvm-project/clang/lib/Format/
H A DFormatTokenLexer.h19 #include "FormatToken.h"
42 llvm::SpecificBumpPtrAllocator<FormatToken> &Allocator,
45 ArrayRef<FormatToken *> lex();
66 bool precedesOperand(FormatToken *Tok);
68 bool canPrecedeRegexLiteral(FormatToken *Prev);
95 FormatToken *getStashedToken();
97 FormatToken *getNextToken();
99 FormatToken *FormatTok;
111 llvm::SpecificBumpPtrAllocator<FormatToken> &Allocator;
114 SmallVector<FormatToken *, 1
[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,
157 void distributeComments(const SmallVectorImpl<FormatToken *> &Comments,
158 const FormatToken *NextTok);
162 void pushToken(FormatToken *Tok);
174 bool isOnNewLine(const FormatToken &FormatTok);
190 SmallVector<FormatToken *, 1> CommentsBeforeNextToken;
191 FormatToken *FormatTok;
223 ArrayRef<FormatToken *> AllTokens;
277 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;
145 void addEndComment(const FormatToken *RBraceTok, StringRef EndCommentText,
157 void updateEndComment(const FormatToken *RBraceTo
[all...]
H A DNamespaceEndCommentsFixer.h29 const FormatToken *
H A DWhitespaceManager.h52 void replaceWhitespace(FormatToken &Tok, unsigned Newlines, unsigned Spaces,
60 void addUntouchableToken(const FormatToken &Tok, bool InPPDirective);
78 void replaceWhitespaceInToken(const FormatToken &Tok, unsigned Offset,
109 Change(const FormatToken &Tok, bool CreateReplacement,
119 const FormatToken *Tok;
123 // 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,
221 const FormatToken *To
[all...]
H A DFormatToken.cpp1 //===--- FormatToken.cpp - Format C++ code --------------------------------===//
15 #include "FormatToken.h"
39 bool FormatToken::isSimpleTypeSpecifier() const {
73 void TokenRole::precomputeFormattingInfos(const FormatToken *Token) {}
85 const FormatToken *LBrace =
146 static unsigned CodePointsBetween(const FormatToken *Begin,
147 const FormatToken *End) {
152 void CommaSeparatedList::precomputeFormattingInfos(const FormatToken *Token) {
175 FormatToken *ItemBegin = Token->Next;
195 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
142 struct FormatToken { struct in namespace:clang::format
143 FormatToken() {} function in struct:clang::format::FormatToken
295 FormatToken *NextOperator = nullptr;
308 FormatToken *MatchingParen = nullptr;
311 FormatToken *Previous = nullptr;
314 FormatToken *Next = nullptr;
503 FormatToken *getPreviousNonComment() const {
504 FormatToken *To
[all...]
H A DTokenAnnotator.cpp16 #include "FormatToken.h"
40 static bool canBeObjCSelectorComponent(const FormatToken &Tok) {
46 static bool isLambdaParameterList(const FormatToken *Left) {
61 static bool isKeywordWithCondition(const FormatToken &Tok) {
88 const FormatToken &Previous = *CurrentToken->Previous; // The '<'.
98 FormatToken *Left = CurrentToken->Previous;
163 if (FormatToken *Previous = CurrentToken->getPreviousNonComment()) {
200 FormatToken *Left = CurrentToken->Previous;
214 if (FormatToken *MaybeSel = Left->Previous) {
292 FormatToken *PossibleObjCForInToke
[all...]
H A DUnwrappedLineParser.cpp16 #include "FormatToken.h"
31 virtual FormatToken *getNextToken() = 0;
34 virtual FormatToken *setPosition(unsigned Position) = 0;
60 static bool isLineComment(const FormatToken &FormatTok) {
67 static bool continuesLineComment(const FormatToken &FormatTok,
68 const FormatToken *Previous,
69 const FormatToken *MinColumnToken) {
82 FormatToken *&ResetToken)
100 FormatToken *getNextToken() override {
113 FormatToken *setPositio
[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 DTokenAnalyzer.cpp19 #include "FormatToken.h"
67 llvm::SpecificBumpPtrAllocator<FormatToken> Allocator;
73 ArrayRef<FormatToken *> Toks(Lex.lex());
74 SmallVector<FormatToken *, 10> Tokens(Toks.begin(), Toks.end());
H A DFormatTokenLexer.cpp11 /// into a FormatToken stream suitable for ClangFormat.
16 #include "FormatToken.h"
28 llvm::SpecificBumpPtrAllocator<FormatToken> &Allocator,
55 ArrayRef<FormatToken *> FormatTokenLexer::lex() {
446 SmallVectorImpl<FormatToken *>::const_iterator First =
466 bool FormatTokenLexer::precedesOperand(FormatToken *Tok) {
479 bool FormatTokenLexer::canPrecedeRegexLiteral(FormatToken *Prev) {
505 FormatToken *RegexToken = Tokens.back();
509 FormatToken *Prev = nullptr;
560 FormatToken *CSharpStringLitera
[all...]
H A DUnwrappedLineFormatter.cpp23 const FormatToken *Next = Line.First->getNextNonComment();
24 const FormatToken *NextNext = Next ? Next->getNextNonComment() : nullptr;
97 int getIndentOffset(const FormatToken &RootToken) {
139 const FormatToken *getMatchingNamespaceToken(
152 const FormatToken *NamespaceToken = Line->First->getNamespaceToken();
159 const FormatToken *NamespaceToken =
235 const FormatToken *Tok = I[-1]->First;
528 const FormatToken *Tok = Line.First->getNextNonComment();
572 FormatToken *Tok = I[1]->First;
583 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,
721 const FormatToken &Token, unsigned StartColumn,
727 FormatToken *LineTok = nullptr;
728 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,
46 void WhitespaceManager::replaceWhitespace(FormatToken &Tok, unsigned Newlines,
59 void WhitespaceManager::addUntouchableToken(const FormatToken &Tok,
76 const FormatToken &Tok, unsigned Offset, unsigned ReplaceChars,
525 const FormatToken *Current = C.Tok;
659 for (FormatToken *Next = C.Tok->Next; Next; Next = Next->Next) {
H A DFormat.cpp1404 for (FormatToken *FormatTok = Line->First; FormatTok;
1523 for (FormatToken *Tok = Line->First->Next; Tok; Tok = Tok->Next) {
1540 for (FormatToken *Tok = Line->First; Tok && Tok->Next; Tok = Tok->Next) {
1563 FormatToken *Tok = AnnotatedLines[i]->First->Next;
1624 for (FormatToken *FormatTok = Line->First; FormatTok;
1628 FormatToken *Matching = FormatTok->MatchingParen;
1635 FormatToken *Prev = FormatTok->getPreviousNonComment();
1706 for (FormatToken *Tok = Line.First; Tok != nullptr; Tok = Tok->Next) {
1724 FormatToken *Tok = AnnotatedLines[Line]->First;
1794 void cleanupPair(FormatToken *Star
[all...]
/freebsd-13-stable/lib/clang/libclang/
H A DMakefile358 SRCS_EXT+= Format/FormatToken.cpp

Completed in 208 milliseconds