Home
last modified time | relevance | path

Searched refs:TokenKind (Results 1 – 25 of 62) 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/include/clang/Basic/
DTokenKinds.h25 enum TokenKind : unsigned short { enum
57 const char *getTokenName(TokenKind Kind) LLVM_READNONE;
66 const char *getPunctuatorSpelling(TokenKind Kind) LLVM_READNONE;
70 const char *getKeywordSpelling(TokenKind Kind) LLVM_READNONE;
73 inline bool isAnyIdentifier(TokenKind K) { in isAnyIdentifier()
79 inline bool isStringLiteral(TokenKind K) { in isStringLiteral()
87 inline bool isLiteral(TokenKind K) { in isLiteral()
95 inline bool isAnnotation(TokenKind K) { in isAnnotation()
DOperatorPrecedence.h47 prec::Level getBinOpPrecedence(tok::TokenKind Kind, bool GreaterThanIsOperator,
DIdentifierTable.h151 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.h24 enum TokenKind { enum
56 TokenKind Kind;
66 AsmToken(TokenKind Kind, StringRef Str, APInt IntVal) in AsmToken()
68 AsmToken(TokenKind Kind, StringRef Str, int64_t IntVal = 0)
71 TokenKind getKind() const { return Kind; } in getKind()
72 bool is(TokenKind K) const { return Kind == K; } in is()
73 bool isNot(TokenKind K) const { return Kind != K; } in isNot()
178 AsmToken::TokenKind getKind() const { return CurTok.getKind(); } in getKind()
181 bool is(AsmToken::TokenKind K) const { return CurTok.is(K); } in is()
184 bool isNot(AsmToken::TokenKind K) const { return CurTok.isNot(K); } in isNot()
/external/clang/unittests/Lex/
DLexerTest.cpp64 ArrayRef<tok::TokenKind> ExpectedTokens) { in CheckLex()
116 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
130 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
142 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
155 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
168 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
182 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
197 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
210 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
223 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
[all …]
/external/clang/lib/Basic/
DTokenKinds.cpp25 const char *tok::getTokenName(TokenKind Kind) { in getTokenName()
32 const char *tok::getPunctuatorSpelling(TokenKind Kind) { in getPunctuatorSpelling()
41 const char *tok::getKeywordSpelling(TokenKind Kind) { in getKeywordSpelling()
DOperatorPrecedence.cpp18 prec::Level getBinOpPrecedence(tok::TokenKind Kind, bool GreaterThanIsOperator, in getBinOpPrecedence()
DIdentifierTable.cpp154 tok::TokenKind TokenCode, unsigned Flags, in AddKeyword()
179 tok::TokenKind TokenCode, in AddCXXOperatorKeyword()
224 tok::TokenKind K) { in getTokenKwStatus()
/external/clang/include/clang/Lex/
DToken.h68 tok::TokenKind Kind;
90 tok::TokenKind getKind() const { return Kind; } in getKind()
91 void setKind(tok::TokenKind K) { Kind = K; } in setKind()
95 bool is(tok::TokenKind K) const { return Kind == K; } in is()
96 bool isNot(tok::TokenKind K) const { return Kind != K; } in isNot()
DLexer.h438 tok::TokenKind TKind,
483 tok::TokenKind Kind) { in FormTokenWithChars()
603 tok::TokenKind Kind);
605 tok::TokenKind Kind);
608 tok::TokenKind Kind);
DPTHLexer.h86 tok::TokenKind x = (tok::TokenKind)*CurPtr; in isNextPPTokenLParen()
DLiteralSupport.h156 tok::TokenKind Kind;
164 tok::TokenKind kind);
192 tok::TokenKind Kind;
/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);
/external/clang/include/clang/Parse/
DParser.h140 llvm::SmallDenseMap<IdentifierInfo *, tok::TokenKind> RevertibleTypeTraits;
289 bool TryConsumeToken(tok::TokenKind Expected) { in TryConsumeToken()
299 bool TryConsumeToken(tok::TokenKind Expected, SourceLocation &Loc) { in TryConsumeToken()
448 tok::TokenKind Kind = Tok.getKind(); in isEofOrEom()
714 bool ExpectAndConsume(tok::TokenKind ExpectedTok,
840 bool SkipUntil(tok::TokenKind T,
844 bool SkipUntil(tok::TokenKind T1, tok::TokenKind T2,
846 tok::TokenKind TokArray[] = {T1, T2};
849 bool SkipUntil(tok::TokenKind T1, tok::TokenKind T2, tok::TokenKind T3,
851 tok::TokenKind TokArray[] = {T1, T2, T3};
[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.cpp138 tok::TokenKind kind = Tok.getKind(); in ParseCXXInlineMethodDef()
202 tok::TokenKind kind = Tok.getKind(); in ParseCXXNonStaticMemberInitializer()
663 bool Parser::ConsumeAndStoreUntil(tok::TokenKind T1, tok::TokenKind T2, in ConsumeAndStoreUntil()
871 tok::TokenKind kind = Tok.getKind(); in ConsumeAndStoreFunctionPrologue()
890 tok::TokenKind CloseKind = IsLParen ? tok::r_paren : tok::r_brace; in ConsumeAndStoreFunctionPrologue()
962 tok::TokenKind EndKind) in UnannotatedTentativeParsingAction()
989 tok::TokenKind EndKind;
DParseExprCXX.cpp28 static int SelectDigraphErrorMessage(tok::TokenKind Kind) { in SelectDigraphErrorMessage()
52 Token &ColonToken, tok::TokenKind Kind, bool AtDigraph) { in FixDigraph()
227 tok::TokenKind NextKind = NextToken().getKind(); in ParseOptionalCXXScopeSpecifier()
1268 tok::TokenKind Kind = Tok.getKind(); in ParseCXXCasts()
1458 tok::TokenKind OpKind, in ParseCXXPseudoDestructor()
1532 tok::TokenKind Kind = Tok.getKind(); in ParseCXXBoolLiteral()
2843 static TypeTrait TypeTraitFromTokKind(tok::TokenKind kind) { in TypeTraitFromTokKind()
2857 static ArrayTypeTrait ArrayTypeTraitFromTokKind(tok::TokenKind kind) { in ArrayTypeTraitFromTokKind()
2865 static ExpressionTrait ExpressionTraitFromTokKind(tok::TokenKind kind) { in ExpressionTraitFromTokKind()
2873 static unsigned TypeTraitArity(tok::TokenKind kind) { in TypeTraitArity()
[all …]
DParseExpr.cpp209 tok::TokenKind K = Tok.getKind(); in isNotExpressionStart()
222 static bool isFoldOperator(tok::TokenKind Kind) { in isFoldOperator()
658 tok::TokenKind SavedKind = Tok.getKind(); in ParseCastExpression()
815 llvm::SmallDenseMap<IdentifierInfo *, tok::TokenKind>::iterator Known in ParseCastExpression()
1396 tok::TokenKind OpKind = Tok.getKind(); in ParsePostfixExpressionSuffix()
1492 tok::TokenKind OpKind = Tok.getKind(); in ParsePostfixExpressionSuffix()
1817 tok::TokenKind T = Tok.getKind(); in ParseBuiltinPrimaryExpression()
2122 tok::TokenKind tokenKind = Tok.getKind(); in ParseParenExpression()
2456 tok::TokenKind Kind = tok::unknown; in ParseFoldExpression()
2733 tok::TokenKind Kind = Tok.getKind(); in ParseObjCBoolLiteral()
DParser.cpp103 static bool IsCommonTypo(tok::TokenKind ExpectedTok, const Token &Tok) { in IsCommonTypo()
111 bool Parser::ExpectAndConsume(tok::TokenKind ExpectedTok, unsigned DiagID, in ExpectAndConsume()
232 bool Parser::SkipUntil(ArrayRef<tok::TokenKind> Toks, SkipUntilFlags Flags) { in SkipUntil()
725 tok::TokenKind NextKind = NextToken().getKind(); in ParseExternalDeclaration()
1697 tok::TokenKind Kind = Tok.getKind(); in isTokenEqualOrEqualTypo()
1928 tok::TokenKind SkipToTok) { in expectAndConsume()
/external/clang/lib/Format/
DWhitespaceManager.h112 StringRef CurrentLinePrefix, tok::TokenKind Kind,
127 tok::TokenKind Kind;
/external/clang/lib/Lex/
DPTHLexer.cpp61 tok::TokenKind TKind = (tok::TokenKind) (Word0 & 0xFF); in Lex()
173 tok::TokenKind x = (tok::TokenKind) (uint8_t) *p; in DiscardToEndOfLine()
275 assert(((tok::TokenKind)*CurPtr) == tok::hash); in SkipBlock()
/external/clang/lib/ASTMatchers/Dynamic/
DParser.cpp31 enum TokenKind { enum
50 TokenKind Kind;
83 TokenInfo::TokenKind nextTokenKind() const { return NextToken.Kind; } in nextTokenKind()
/external/clang/bindings/python/clang/
Dcindex.py461 class TokenKind(object): class
477 result = TokenKind._value_map.get(value, None)
491 if value in TokenKind._value_map:
494 kind = TokenKind(value, name)
495 TokenKind._value_map[value] = kind
496 setattr(TokenKind, name, kind)
2783 return TokenKind.from_value(conf.lib.clang_getTokenKind(self))
3581 TokenKind.register(value, name)

123