Lines Matching defs:is

143   /// Whether there is at least one unescaped newline before the \c
151 /// whitespace (relative to \c WhiteSpaceStart). 0 if there is no '\n'.
166 /// Indicates that this is the first token of the file.
181 /// Set to \c true if this token is an unterminated literal.
184 /// Contains the kind of block if this token is a brace.
192 /// \c true if it is allowed to break before this token.
195 /// \c true if this is the ">" of "template<..>".
198 /// Number of parameters, if this is "(", "[" or "<".
202 /// if this is "(", "[" or "<".
205 /// If this is a bracket ("<", "(", "[" or "{"), contains the kind of
213 /// If this is an opening parenthesis, how are the parameters packed?
221 /// The configured TabWidth is used as tab width.
229 /// The binding strength of a token. This is a combined value of
243 /// If this is the first ObjC selector name in an ObjC method
250 /// If this is the first ObjC selector name in an ObjC method
255 /// The 0-based index of the parameter/argument. For ObjC it is set
275 /// If this is an operator (or "."/"->") in a sequence of operators
279 /// If this is an operator (or "."/"->") in a sequence of operators
293 /// If this is a bracket, this points to the matching one.
314 bool is(tok::TokenKind Kind) const { return Tok.is(Kind); }
315 bool is(TokenType TT) const { return Type == TT; }
316 bool is(const IdentifierInfo *II) const {
319 bool is(tok::PPKeywordKind Kind) const {
324 return is(K1) || is(K2);
328 return is(K1) || isOneOf(K2, Ks...);
330 template <typename T> bool isNot(T Kind) const { return !is(Kind); }
333 return is(tok::kw_if) || endsSequence(tok::kw_constexpr, tok::kw_if) ||
371 (!ColonRequired || (Next && Next->is(tok::colon)));
374 /// Determine whether the token is a simple-type-specifier.
378 return is(tok::at) && Next &&
385 /// Returns whether \p Tok is ([{ or an opening < of a template or in
388 if (is(TT_TemplateString) && TokenText.endswith("${"))
390 if (is(TT_DictLiteral) && is(tok::less))
395 /// Returns whether \p Tok is )]} or a closing > of a template or in
398 if (is(TT_TemplateString) && TokenText.startswith("}"))
400 if (is(TT_DictLiteral) && is(tok::greater))
406 /// Returns \c true if this is a "." or "->" accessing a member.
430 // Comma is a binary operator, but does not behave as such wrt. formatting.
435 return is(tok::comment) &&
436 (is(TT_LineComment) || !Next || Next->NewlinesBefore > 0);
439 /// Returns \c true if this is a keyword that can be used
459 /// Returns \c true if this is a string literal that's like a label,
462 if (!is(tok::string_literal))
491 while (Tok && Tok->is(tok::comment))
499 while (Tok && Tok->is(tok::comment))
507 if (is(TT_TemplateString) && opensScope())
509 return is(TT_ArrayInitializerLSquare) || is(TT_ProtoExtensionLSquare) ||
510 (is(tok::l_brace) &&
511 (BlockKind == BK_Block || is(TT_DictLiteral) ||
513 (is(tok::less) && (Style.Language == FormatStyle::LK_Proto ||
517 /// Returns whether the token is the left square bracket of a C++
527 return T && T->is(tok::kw_auto);
532 if (is(TT_TemplateString) && closesScope())
541 if (is(tok::comment))
559 if (is(tok::comment) && Next)
561 return is(K1) && Next && Next->startsSequenceInternal(Tokens...);
565 if (is(tok::comment) && Next)
567 return is(K1);
571 if (is(tok::comment) && Previous)
573 return is(K1);
578 if (is(tok::comment) && Previous)
580 return is(K1) && Previous && Previous->endsSequenceInternal(Tokens...);
598 /// Assumes that the token having this role is already formatted.
708 kw_is = &IdentTable.get("is");
775 // is
894 /// Returns \c true if \p Tok is a true JavaScript identifier, returns
895 /// \c false if it is a keyword or a pseudo keyword.
897 return Tok.is(tok::identifier) &&
902 /// Returns \c true if \p Tok is a C# keyword, returns
903 /// \c false if it is a anything else.
952 return Tok.is(tok::identifier) &&