Lines Matching defs:FormatToken
113 struct FormatToken { struct
114 FormatToken() {} in FormatToken() argument
117 Token Tok;
123 unsigned NewlinesBefore = 0;
127 bool HasUnescapedNewline = false;
130 SourceRange WhitespaceRange;
134 unsigned LastNewlineOffset = 0;
139 unsigned ColumnWidth = 0;
143 unsigned LastLineColumnWidth = 0;
146 bool IsMultiline = false;
149 bool IsFirst = false;
155 bool MustBreakBefore = false;
161 StringRef TokenText;
164 bool IsUnterminatedLiteral = 0;
167 BraceBlockKind BlockKind = BK_Unknown;
169 TokenType Type = TT_Unknown;
172 unsigned SpacesRequiredBefore = 0;
175 bool CanBreakBefore = false;
178 bool ClosesTemplateDeclaration = false;
185 unsigned ParameterCount = 0;
189 unsigned BlockParameterCount = 0;
193 tok::TokenKind ParentBracket = tok::unknown;
197 std::unique_ptr<TokenRole> Role;
200 ParameterPackingKind PackingKind = PPK_Inconclusive;
204 unsigned TotalLength = 0;
208 unsigned OriginalColumn = 0;
212 unsigned UnbreakableTailLength = 0;
217 unsigned BindingStrength = 0;
221 unsigned NestingLevel = 0;
224 unsigned SplitPenalty = 0;
254 FormatToken *NextOperator = nullptr; argument
262 FormatToken *MatchingParen = nullptr; argument
265 FormatToken *Previous = nullptr; argument
268 FormatToken *Next = nullptr; argument
272 SmallVector<AnnotatedLine *, 1> Children;
275 FormatDecision Decision = FD_Unformatted;
280 bool Finalized = false;
282 bool is(tok::TokenKind Kind) const { return Tok.is(Kind); } in is()
283 bool is(TokenType TT) const { return Type == TT; } in is()
284 bool is(const IdentifierInfo *II) const { in is()
287 bool is(tok::PPKeywordKind Kind) const { in is()
291 template <typename A, typename B> bool isOneOf(A K1, B K2) const { in isOneOf()
295 bool isOneOf(A K1, B K2, Ts... Ks) const { in isOneOf()
298 template <typename T> bool isNot(T Kind) const { return !is(Kind); } in isNot()
303 bool startsSequence(A K1, Ts... Tokens) const { in startsSequence()
310 bool endsSequence(A K1, Ts... Tokens) const { in endsSequence()
314 bool isStringLiteral() const { return tok::isStringLiteral(Tok.getKind()); } in isStringLiteral()
316 bool isObjCAtKeyword(tok::ObjCKeywordKind Kind) const { in isObjCAtKeyword()
328 bool isObjCAccessSpecifier() const { in isObjCAccessSpecifier()
336 bool opensScope() const { in opensScope()
341 bool closesScope() const { in closesScope()
347 bool isMemberAccess() const { in isMemberAccess()
353 bool isUnaryOperator() const { in isUnaryOperator()
369 bool isBinaryOperator() const { in isBinaryOperator()
374 bool isTrailingComment() const { in isTrailingComment()
381 bool isFunctionLikeKeyword() const { in isFunctionLikeKeyword()
413 FormatToken *getPreviousNonComment() const { in getPreviousNonComment() argument
421 const FormatToken *getNextNonComment() const { in getNextNonComment() argument
444 FormatToken(const FormatToken &) = delete; argument
445 void operator=(const FormatToken &) = delete; argument
448 bool startsSequenceInternal(A K1, Ts... Tokens) const { in startsSequenceInternal()
455 bool startsSequenceInternal(A K1) const { in startsSequenceInternal()
462 bool endsSequenceInternal(A K1) const { in endsSequenceInternal()
486 virtual void precomputeFormattingInfos(const FormatToken *Token); argument