Lines Matching refs:tok

402   tok::TokenKind ParentBracket = tok::unknown;
509 bool is(tok::TokenKind Kind) const { return Tok.is(Kind); } in is()
514 bool is(tok::PPKeywordKind Kind) const { in is()
531 return is(tok::kw_if) || endsSequence(tok::kw_constexpr, tok::kw_if) ||
532 (endsSequence(tok::identifier, tok::kw_if) && AllowConstexprMacro);
561 bool isStringLiteral() const { return tok::isStringLiteral(Tok.getKind()); } in isStringLiteral()
563 bool isObjCAtKeyword(tok::ObjCKeywordKind Kind) const { in isObjCAtKeyword()
568 return isOneOf(tok::kw_public, tok::kw_protected, tok::kw_private) &&
569 (!ColonRequired || (Next && Next->is(tok::colon)));
573 return isOneOf(tok::kw_const, tok::kw_restrict, tok::kw_volatile, in canBePointerOrReferenceQualifier()
574 tok::kw___attribute, tok::kw__Nonnull, tok::kw__Nullable, in canBePointerOrReferenceQualifier()
575 tok::kw__Null_unspecified, tok::kw___ptr32, tok::kw___ptr64, in canBePointerOrReferenceQualifier()
585 return is(tok::at) && Next && in isObjCAccessSpecifier()
586 (Next->isObjCAtKeyword(tok::objc_public) || in isObjCAccessSpecifier()
587 Next->isObjCAtKeyword(tok::objc_protected) || in isObjCAccessSpecifier()
588 Next->isObjCAtKeyword(tok::objc_package) || in isObjCAccessSpecifier()
589 Next->isObjCAtKeyword(tok::objc_private)); in isObjCAccessSpecifier()
597 if (is(TT_DictLiteral) && is(tok::less)) in opensScope()
599 return isOneOf(tok::l_paren, tok::l_brace, tok::l_square, in opensScope()
607 if (is(TT_DictLiteral) && is(tok::greater)) in closesScope()
609 return isOneOf(tok::r_paren, tok::r_brace, tok::r_square, in closesScope()
615 return isOneOf(tok::arrow, tok::period, tok::arrowstar) && in isMemberAccess()
622 case tok::plus: in isUnaryOperator()
623 case tok::plusplus: in isUnaryOperator()
624 case tok::minus: in isUnaryOperator()
625 case tok::minusminus: in isUnaryOperator()
626 case tok::exclaim: in isUnaryOperator()
627 case tok::tilde: in isUnaryOperator()
628 case tok::kw_sizeof: in isUnaryOperator()
629 case tok::kw_alignof: in isUnaryOperator()
642 return is(tok::comment) && in isTrailingComment()
650 case tok::kw_throw: in isFunctionLikeKeyword()
651 case tok::kw_typeid: in isFunctionLikeKeyword()
652 case tok::kw_return: in isFunctionLikeKeyword()
653 case tok::kw_sizeof: in isFunctionLikeKeyword()
654 case tok::kw_alignof: in isFunctionLikeKeyword()
655 case tok::kw_alignas: in isFunctionLikeKeyword()
656 case tok::kw_decltype: in isFunctionLikeKeyword()
657 case tok::kw_noexcept: in isFunctionLikeKeyword()
658 case tok::kw_static_assert: in isFunctionLikeKeyword()
659 case tok::kw__Atomic: in isFunctionLikeKeyword()
660 case tok::kw___attribute: in isFunctionLikeKeyword()
661 case tok::kw___underlying_type: in isFunctionLikeKeyword()
662 case tok::kw_requires: in isFunctionLikeKeyword()
672 if (!is(tok::string_literal)) in isLabelString()
707 while (Tok && Tok->is(tok::comment)) in getPreviousNonComment()
715 while (Tok && Tok->is(tok::comment)) in getNextNonComment()
727 if (!Style.isCpp() || isNot(tok::l_square)) in isCppStructuredBinding()
732 } while (T && T->isOneOf(tok::kw_const, tok::kw_volatile, tok::amp, in isCppStructuredBinding()
733 tok::ampamp)); in isCppStructuredBinding()
734 return T && T->is(tok::kw_auto); in isCppStructuredBinding()
748 if (is(tok::comment)) in getNamespaceToken()
751 if (NamespaceTok && NamespaceTok->isOneOf(tok::kw_inline, tok::kw_export)) in getNamespaceToken()
754 NamespaceTok->isOneOf(tok::kw_namespace, TT_NamespaceMacro) in getNamespaceToken()
768 if (is(tok::comment) && Next) in startsSequenceInternal()
774 if (is(tok::comment) && Next) in startsSequenceInternal()
780 if (is(tok::comment) && Previous) in endsSequenceInternal()
787 if (is(tok::comment) && Previous) in endsSequenceInternal()
1531 case tok::kw_break:
1532 case tok::kw_case:
1533 case tok::kw_catch:
1534 case tok::kw_class:
1535 case tok::kw_continue:
1536 case tok::kw_const:
1537 case tok::kw_default:
1538 case tok::kw_delete:
1539 case tok::kw_do:
1540 case tok::kw_else:
1541 case tok::kw_enum:
1542 case tok::kw_export:
1543 case tok::kw_false:
1544 case tok::kw_for:
1545 case tok::kw_if:
1546 case tok::kw_import:
1547 case tok::kw_module:
1548 case tok::kw_new:
1549 case tok::kw_private:
1550 case tok::kw_protected:
1551 case tok::kw_public:
1552 case tok::kw_return:
1553 case tok::kw_static:
1554 case tok::kw_switch:
1555 case tok::kw_this:
1556 case tok::kw_throw:
1557 case tok::kw_true:
1558 case tok::kw_try:
1559 case tok::kw_typeof:
1560 case tok::kw_void:
1561 case tok::kw_while:
1564 case tok::identifier: {
1580 #define KEYWORD(X, Y) case tok::kw_##X:
1595 case tok::kw_bool: in isCSharpKeyword()
1596 case tok::kw_break: in isCSharpKeyword()
1597 case tok::kw_case: in isCSharpKeyword()
1598 case tok::kw_catch: in isCSharpKeyword()
1599 case tok::kw_char: in isCSharpKeyword()
1600 case tok::kw_class: in isCSharpKeyword()
1601 case tok::kw_const: in isCSharpKeyword()
1602 case tok::kw_continue: in isCSharpKeyword()
1603 case tok::kw_default: in isCSharpKeyword()
1604 case tok::kw_do: in isCSharpKeyword()
1605 case tok::kw_double: in isCSharpKeyword()
1606 case tok::kw_else: in isCSharpKeyword()
1607 case tok::kw_enum: in isCSharpKeyword()
1608 case tok::kw_explicit: in isCSharpKeyword()
1609 case tok::kw_extern: in isCSharpKeyword()
1610 case tok::kw_false: in isCSharpKeyword()
1611 case tok::kw_float: in isCSharpKeyword()
1612 case tok::kw_for: in isCSharpKeyword()
1613 case tok::kw_goto: in isCSharpKeyword()
1614 case tok::kw_if: in isCSharpKeyword()
1615 case tok::kw_int: in isCSharpKeyword()
1616 case tok::kw_long: in isCSharpKeyword()
1617 case tok::kw_namespace: in isCSharpKeyword()
1618 case tok::kw_new: in isCSharpKeyword()
1619 case tok::kw_operator: in isCSharpKeyword()
1620 case tok::kw_private: in isCSharpKeyword()
1621 case tok::kw_protected: in isCSharpKeyword()
1622 case tok::kw_public: in isCSharpKeyword()
1623 case tok::kw_return: in isCSharpKeyword()
1624 case tok::kw_short: in isCSharpKeyword()
1625 case tok::kw_sizeof: in isCSharpKeyword()
1626 case tok::kw_static: in isCSharpKeyword()
1627 case tok::kw_struct: in isCSharpKeyword()
1628 case tok::kw_switch: in isCSharpKeyword()
1629 case tok::kw_this: in isCSharpKeyword()
1630 case tok::kw_throw: in isCSharpKeyword()
1631 case tok::kw_true: in isCSharpKeyword()
1632 case tok::kw_try: in isCSharpKeyword()
1633 case tok::kw_typeof: in isCSharpKeyword()
1634 case tok::kw_using: in isCSharpKeyword()
1635 case tok::kw_virtual: in isCSharpKeyword()
1636 case tok::kw_void: in isCSharpKeyword()
1637 case tok::kw_volatile: in isCSharpKeyword()
1638 case tok::kw_while: in isCSharpKeyword()
1641 return Tok.is(tok::identifier) && in isCSharpKeyword()
1649 case tok::kw_case: in isVerilogIdentifier()
1650 case tok::kw_class: in isVerilogIdentifier()
1651 case tok::kw_const: in isVerilogIdentifier()
1652 case tok::kw_continue: in isVerilogIdentifier()
1653 case tok::kw_default: in isVerilogIdentifier()
1654 case tok::kw_do: in isVerilogIdentifier()
1655 case tok::kw_extern: in isVerilogIdentifier()
1656 case tok::kw_else: in isVerilogIdentifier()
1657 case tok::kw_enum: in isVerilogIdentifier()
1658 case tok::kw_for: in isVerilogIdentifier()
1659 case tok::kw_if: in isVerilogIdentifier()
1660 case tok::kw_restrict: in isVerilogIdentifier()
1661 case tok::kw_signed: in isVerilogIdentifier()
1662 case tok::kw_static: in isVerilogIdentifier()
1663 case tok::kw_struct: in isVerilogIdentifier()
1664 case tok::kw_typedef: in isVerilogIdentifier()
1665 case tok::kw_union: in isVerilogIdentifier()
1666 case tok::kw_unsigned: in isVerilogIdentifier()
1667 case tok::kw_virtual: in isVerilogIdentifier()
1668 case tok::kw_while: in isVerilogIdentifier()
1670 case tok::identifier: in isVerilogIdentifier()
1687 case tok::pp_define: in isVerilogPPDirective()
1688 case tok::pp_else: in isVerilogPPDirective()
1689 case tok::pp_endif: in isVerilogPPDirective()
1690 case tok::pp_ifdef: in isVerilogPPDirective()
1691 case tok::pp_ifndef: in isVerilogPPDirective()
1692 case tok::pp_include: in isVerilogPPDirective()
1693 case tok::pp_line: in isVerilogPPDirective()
1694 case tok::pp_pragma: in isVerilogPPDirective()
1695 case tok::pp_undef: in isVerilogPPDirective()
1730 (Style.isVerilog() ? isVerilogBegin(Tok) : Tok.is(tok::l_brace)); in isBlockBegin()