Home
last modified time | relevance | path

Searched refs:TokenKind (Results 1 – 25 of 56) sorted by relevance

123

/external/clang/bindings/python/tests/cindex/
Dtest_token_kind.py1 from clang.cindex import TokenKind
9 t = TokenKind(5, 'foo')
18 TokenKind.register(2, 'foo')
24 TokenKind.from_value(-1)
28 ok_(hasattr(TokenKind, 'LITERAL'))
29 literal = TokenKind.LITERAL
31 ok_(isinstance(literal, TokenKind))
35 t = TokenKind.from_value(3)
36 ok_(isinstance(t, TokenKind))
37 eq_(t, TokenKind.LITERAL)
[all …]
Dtest_tokens.py5 from clang.cindex import TokenKind
19 assert tokens[1].kind == TokenKind.IDENTIFIER
/external/clang/lib/Format/
DFormatToken.h197 bool is(tok::TokenKind Kind) const { return Tok.is(Kind); } in is()
199 bool isOneOf(tok::TokenKind K1, tok::TokenKind K2) const { in isOneOf()
203 bool isOneOf(tok::TokenKind K1, tok::TokenKind K2, tok::TokenKind K3) const { in isOneOf()
207 bool isOneOf(tok::TokenKind K1, tok::TokenKind K2, tok::TokenKind K3,
208 tok::TokenKind K4, tok::TokenKind K5 = tok::NUM_TOKENS,
209 tok::TokenKind K6 = tok::NUM_TOKENS,
210 tok::TokenKind K7 = tok::NUM_TOKENS,
211 tok::TokenKind K8 = tok::NUM_TOKENS,
212 tok::TokenKind K9 = tok::NUM_TOKENS,
213 tok::TokenKind K10 = tok::NUM_TOKENS,
[all …]
DWhitespaceManager.h100 StringRef CurrentLinePrefix, tok::TokenKind Kind,
115 tok::TokenKind Kind;
/external/clang/include/clang/Basic/
DTokenKinds.h23 enum TokenKind { enum
55 const char *getTokenName(enum TokenKind Kind);
64 const char *getTokenSimpleSpelling(enum TokenKind Kind);
67 inline bool isAnyIdentifier(TokenKind K) { in isAnyIdentifier()
73 inline bool isStringLiteral(TokenKind K) { in isStringLiteral()
81 inline bool isLiteral(TokenKind K) { in isLiteral()
89 inline bool isAnnotation(TokenKind K) { in isAnnotation()
DOperatorPrecedence.h47 prec::Level getBinOpPrecedence(tok::TokenKind Kind, bool GreaterThanIsOperator,
DIdentifierTable.h154 tok::TokenKind getTokenID() const { return (tok::TokenKind)TokenID; } in getTokenID()
478 IdentifierInfo &get(StringRef Name, tok::TokenKind TokenCode) { in get()
/external/llvm/include/llvm/MC/MCParser/
DMCAsmLexer.h23 enum TokenKind { enum
54 TokenKind Kind;
64 AsmToken(TokenKind _Kind, StringRef _Str, int64_t _IntVal = 0)
67 TokenKind getKind() const { return Kind; } in getKind()
68 bool is(TokenKind K) const { return Kind == K; } in is()
69 bool isNot(TokenKind K) const { return Kind != K; } in isNot()
163 AsmToken::TokenKind getKind() const { return CurTok.getKind(); } in getKind()
166 bool is(AsmToken::TokenKind K) const { return CurTok.is(K); } in is()
169 bool isNot(AsmToken::TokenKind K) const { return CurTok.isNot(K); } in isNot()
/external/clang/include/clang/Lex/
DToken.h84 tok::TokenKind getKind() const { return (tok::TokenKind)Kind; } in getKind()
85 void setKind(tok::TokenKind K) { Kind = K; } in setKind()
89 bool is(tok::TokenKind K) const { return Kind == (unsigned) K; } in is()
90 bool isNot(tok::TokenKind K) const { return Kind != (unsigned) K; } in isNot()
147 return tok::getTokenName( (tok::TokenKind) Kind); in getName()
DLexer.h419 tok::TokenKind TKind,
462 tok::TokenKind Kind) { in FormTokenWithChars()
579 tok::TokenKind Kind);
581 tok::TokenKind Kind);
584 tok::TokenKind Kind);
DPTHLexer.h87 tok::TokenKind x = (tok::TokenKind)*CurPtr; in isNextPPTokenLParen()
DLiteralSupport.h141 tok::TokenKind Kind;
149 tok::TokenKind kind);
177 tok::TokenKind Kind;
/external/clang/unittests/Lex/
DLexerTest.cpp60 ArrayRef<tok::TokenKind> ExpectedTokens) { in CheckLex()
112 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
126 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
138 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
151 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
164 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
178 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
193 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
206 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
219 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
[all …]
/external/clang/include/clang/AST/
DCommentLexer.h34 enum TokenKind { enum
65 tok::TokenKind Kind;
91 tok::TokenKind getKind() const LLVM_READONLY { return Kind; } in getKind()
92 void setKind(tok::TokenKind K) { Kind = K; } in setKind()
94 bool is(tok::TokenKind K) const LLVM_READONLY { return Kind == K; } in is()
95 bool isNot(tok::TokenKind K) const LLVM_READONLY { return Kind != K; } in isNot()
296 tok::TokenKind Kind) { in formTokenWithChars()
/external/clang/lib/Basic/
DTokenKinds.cpp25 const char *tok::getTokenName(enum TokenKind Kind) { in getTokenName()
30 const char *tok::getTokenSimpleSpelling(enum TokenKind Kind) { in getTokenSimpleSpelling()
DOperatorPrecedence.cpp18 prec::Level getBinOpPrecedence(tok::TokenKind Kind, bool GreaterThanIsOperator, in getBinOpPrecedence()
/external/clang/include/clang/Parse/
DParser.h140 llvm::SmallDenseMap<IdentifierInfo *, tok::TokenKind> RevertableTypeTraits;
638 bool ExpectAndConsume(tok::TokenKind ExpectedTok, unsigned Diag,
640 tok::TokenKind SkipToTok = tok::unknown);
745 bool SkipUntil(tok::TokenKind T, bool StopAtSemi = true,
750 bool SkipUntil(tok::TokenKind T1, tok::TokenKind T2, bool StopAtSemi = true,
752 tok::TokenKind TokArray[] = {T1, T2};
755 bool SkipUntil(tok::TokenKind T1, tok::TokenKind T2, tok::TokenKind T3,
758 tok::TokenKind TokArray[] = {T1, T2, T3};
761 bool SkipUntil(ArrayRef<tok::TokenKind> Toks, bool StopAtSemi = true,
1101 bool ConsumeAndStoreUntil(tok::TokenKind T1,
[all …]
/external/clang/lib/Parse/
DRAIIObjectsForParser.h361 tok::TokenKind Kind, Close, FinalToken;
380 BalancedDelimiterTracker(Parser& p, tok::TokenKind k,
381 tok::TokenKind FinalToken = tok::semi)
421 tok::TokenKind SkipToTok = tok::unknown);
DParseCXXInlineMethods.cpp147 tok::TokenKind kind = Tok.getKind(); in ParseCXXInlineMethodDef()
209 tok::TokenKind kind = Tok.getKind(); in ParseCXXNonStaticMemberInitializer()
559 bool Parser::ConsumeAndStoreUntil(tok::TokenKind T1, tok::TokenKind T2, in ConsumeAndStoreUntil()
762 tok::TokenKind kind = Tok.getKind(); in ConsumeAndStoreFunctionPrologue()
DParseExprCXX.cpp26 static int SelectDigraphErrorMessage(tok::TokenKind Kind) { in SelectDigraphErrorMessage()
48 Token &ColonToken, tok::TokenKind Kind, bool AtDigraph) { in FixDigraph()
212 tok::TokenKind NextKind = NextToken().getKind(); in ParseOptionalCXXScopeSpecifier()
1086 tok::TokenKind Kind = Tok.getKind(); in ParseCXXCasts()
1276 tok::TokenKind OpKind, in ParseCXXPseudoDestructor()
1353 tok::TokenKind Kind = Tok.getKind(); in ParseCXXBoolLiteral()
2617 static UnaryTypeTrait UnaryTypeTraitFromTokKind(tok::TokenKind kind) { in UnaryTypeTraitFromTokKind()
2672 static BinaryTypeTrait BinaryTypeTraitFromTokKind(tok::TokenKind kind) { in BinaryTypeTraitFromTokKind()
2684 static TypeTrait TypeTraitFromTokKind(tok::TokenKind kind) { in TypeTraitFromTokKind()
2692 static ArrayTypeTrait ArrayTypeTraitFromTokKind(tok::TokenKind kind) { in ArrayTypeTraitFromTokKind()
[all …]
DParseExpr.cpp208 tok::TokenKind K = Tok.getKind(); in isNotExpressionStart()
620 tok::TokenKind SavedKind = Tok.getKind(); in ParseCastExpression()
749 llvm::SmallDenseMap<IdentifierInfo *, tok::TokenKind>::iterator Known in ParseCastExpression()
1362 tok::TokenKind OpKind = Tok.getKind(); in ParsePostfixExpressionSuffix()
1453 tok::TokenKind OpKind = Tok.getKind(); in ParsePostfixExpressionSuffix()
1751 tok::TokenKind T = Tok.getKind(); in ParseBuiltinPrimaryExpression()
2010 tok::TokenKind tokenKind = Tok.getKind(); in ParseParenExpression()
2516 tok::TokenKind Kind = Tok.getKind(); in ParseObjCBoolLiteral()
DParser.cpp147 static bool IsCommonTypo(tok::TokenKind ExpectedTok, const Token &Tok) { in IsCommonTypo()
161 bool Parser::ExpectAndConsume(tok::TokenKind ExpectedTok, unsigned DiagID, in ExpectAndConsume()
162 const char *Msg, tok::TokenKind SkipToTok) { in ExpectAndConsume()
264 bool Parser::SkipUntil(ArrayRef<tok::TokenKind> Toks, bool StopAtSemi, in SkipUntil()
742 tok::TokenKind NextKind = NextToken().getKind(); in ParseExternalDeclaration()
1693 tok::TokenKind Kind = Tok.getKind(); in isTokenEqualOrEqualTypo()
1929 tok::TokenKind SkipToToc ) { in expectAndConsume()
/external/clang/lib/Lex/
DPTHLexer.cpp61 tok::TokenKind TKind = (tok::TokenKind) (Word0 & 0xFF); in Lex()
180 tok::TokenKind x = (tok::TokenKind) (uint8_t) *p; in DiscardToEndOfLine()
279 assert(((tok::TokenKind)*CurPtr) == tok::hash); in SkipBlock()
DModuleMap.cpp715 enum TokenKind { enum
751 bool is(TokenKind K) const { return Kind == K; } in is()
812 void skipUntil(MMToken::TokenKind K);
818 void parseHeaderDecl(clang::MMToken::TokenKind,
862 Tok.Kind = llvm::StringSwitch<MMToken::TokenKind>(Tok.getString()) in consumeToken()
948 void ModuleMapParser::skipUntil(MMToken::TokenKind K) { in skipUntil()
1335 void ModuleMapParser::parseHeaderDecl(MMToken::TokenKind LeadingToken, in parseHeaderDecl()
/external/clang/lib/ASTMatchers/Dynamic/
DParser.cpp30 enum TokenKind { enum
48 TokenKind Kind;
73 TokenInfo::TokenKind nextTokenKind() const { return NextToken.Kind; } in nextTokenKind()

123