Home
last modified time | relevance | path

Searched refs:TokenKind (Results 1 – 25 of 67) 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()
DIdentifierTable.h153 tok::TokenKind getTokenID() const { return (tok::TokenKind)TokenID; } in getTokenID()
169 void revertIdentifierToTokenID(tok::TokenKind TK) { in revertIdentifierToTokenID()
485 IdentifierInfo &get(StringRef Name, tok::TokenKind TokenCode) { in get()
DOperatorPrecedence.h47 prec::Level getBinOpPrecedence(tok::TokenKind Kind, bool GreaterThanIsOperator,
/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()
200 AsmToken::TokenKind getKind() const { return getTok().getKind(); } in getKind()
203 bool is(AsmToken::TokenKind K) const { return getTok().is(K); } in is()
206 bool isNot(AsmToken::TokenKind K) const { return getTok().isNot(K); } in isNot()
/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()
97 bool isOneOf(tok::TokenKind K1, tok::TokenKind K2) const { in isOneOf()
101 bool isOneOf(tok::TokenKind K1, tok::TokenKind K2, Ts... Ks) const { in isOneOf()
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/llvm/lib/CodeGen/MIRParser/
DMILexer.h29 enum TokenKind { enum
123 TokenKind Kind;
132 MIToken &reset(TokenKind Kind, StringRef Range);
138 TokenKind kind() const { return Kind; } in kind()
163 bool is(TokenKind K) const { return Kind == K; } in is()
165 bool isNot(TokenKind K) const { return Kind != K; } in isNot()
DMILexer.cpp58 MIToken &MIToken::reset(TokenKind Kind, StringRef Range) { in reset()
153 Cursor C, MIToken &Token, MIToken::TokenKind Type, unsigned PrefixLength, in lexName()
186 static MIToken::TokenKind getIdentifierKind(StringRef Identifier) { in getIdentifierKind()
187 return StringSwitch<MIToken::TokenKind>(Identifier) in getIdentifierKind()
278 MIToken::TokenKind Kind) { in maybeLexIndex()
291 MIToken::TokenKind Kind) { in maybeLexIndexAndName()
450 static MIToken::TokenKind getMetadataKeywordKind(StringRef Identifier) { in getMetadataKeywordKind()
451 return StringSwitch<MIToken::TokenKind>(Identifier) in getMetadataKeywordKind()
480 static MIToken::TokenKind symbolToken(char C) { in symbolToken()
506 MIToken::TokenKind Kind; in maybeLexSymbol()
DMIParser.cpp176 bool expectAndConsume(MIToken::TokenKind TokenKind);
180 bool consumeIfPresent(MIToken::TokenKind TokenKind);
277 static const char *toString(MIToken::TokenKind TokenKind) { in toString() argument
278 switch (TokenKind) { in toString()
294 bool MIParser::expectAndConsume(MIToken::TokenKind TokenKind) { in expectAndConsume() argument
295 if (Token.isNot(TokenKind)) in expectAndConsume()
296 return error(Twine("expected ") + toString(TokenKind)); in expectAndConsume()
301 bool MIParser::consumeIfPresent(MIToken::TokenKind TokenKind) { in consumeIfPresent() argument
302 if (Token.isNot(TokenKind)) in consumeIfPresent()
/external/clang/unittests/Lex/
DLexerTest.cpp63 ArrayRef<tok::TokenKind> ExpectedTokens) { in CheckLex()
115 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
129 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
141 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
154 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
167 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
181 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
196 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
209 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F()
222 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.cpp160 tok::TokenKind TokenCode, unsigned Flags, in AddKeyword()
185 tok::TokenKind TokenCode, in AddCXXOperatorKeyword()
233 tok::TokenKind K) { in getTokenKwStatus()
/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.h143 llvm::SmallDenseMap<IdentifierInfo *, tok::TokenKind> RevertibleTypeTraits;
293 bool TryConsumeToken(tok::TokenKind Expected) { in TryConsumeToken()
303 bool TryConsumeToken(tok::TokenKind Expected, SourceLocation &Loc) { in TryConsumeToken()
458 tok::TokenKind Kind = Tok.getKind(); in isEofOrEom()
736 bool ExpectAndConsume(tok::TokenKind ExpectedTok,
862 bool SkipUntil(tok::TokenKind T,
866 bool SkipUntil(tok::TokenKind T1, tok::TokenKind T2,
868 tok::TokenKind TokArray[] = {T1, T2};
871 bool SkipUntil(tok::TokenKind T1, tok::TokenKind T2, tok::TokenKind T3,
873 tok::TokenKind TokArray[] = {T1, T2, T3};
[all …]
/external/clang/lib/Format/
DWhitespaceManager.h111 StringRef CurrentLinePrefix, tok::TokenKind Kind,
126 tok::TokenKind Kind;
/external/clang/lib/Parse/
DRAIIObjectsForParser.h367 tok::TokenKind Kind, Close, FinalToken;
386 BalancedDelimiterTracker(Parser& p, tok::TokenKind k,
387 tok::TokenKind FinalToken = tok::semi)
427 tok::TokenKind SkipToTok = tok::unknown);
DParseCXXInlineMethods.cpp135 tok::TokenKind kind = Tok.getKind(); in ParseCXXInlineMethodDef()
199 tok::TokenKind kind = Tok.getKind(); in ParseCXXNonStaticMemberInitializer()
660 bool Parser::ConsumeAndStoreUntil(tok::TokenKind T1, tok::TokenKind T2, in ConsumeAndStoreUntil()
868 tok::TokenKind kind = Tok.getKind(); in ConsumeAndStoreFunctionPrologue()
887 tok::TokenKind CloseKind = IsLParen ? tok::r_paren : tok::r_brace; in ConsumeAndStoreFunctionPrologue()
959 tok::TokenKind EndKind) in UnannotatedTentativeParsingAction()
986 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()
2851 static TypeTrait TypeTraitFromTokKind(tok::TokenKind kind) { in TypeTraitFromTokKind()
2865 static ArrayTypeTrait ArrayTypeTraitFromTokKind(tok::TokenKind kind) { in ArrayTypeTraitFromTokKind()
2873 static ExpressionTrait ExpressionTraitFromTokKind(tok::TokenKind kind) { in ExpressionTraitFromTokKind()
2881 static unsigned TypeTraitArity(tok::TokenKind kind) { in TypeTraitArity()
[all …]
/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/llvm/lib/Target/Hexagon/AsmParser/
DHexagonAsmParser.cpp1148 if (MaybeDotNew.is(AsmToken::TokenKind::Identifier) && in parseOperand()
1164 if (MaybeDotNew.is(AsmToken::TokenKind::Identifier) && in parseOperand()
1184 if (Token.is(AsmToken::TokenKind::LCurly) || in isLabel()
1185 Token.is(AsmToken::TokenKind::RCurly)) in isLabel()
1187 if (!Token.is(AsmToken::TokenKind::Identifier)) in isLabel()
1308 case AsmToken::TokenKind::Hash: in parseExpression()
1310 if ((Tokens.end () - 2)->getKind() == AsmToken::TokenKind::Plus) { in parseExpression()
1312 AsmToken(AsmToken::TokenKind::Comma, Comma)); in parseExpression()
1316 case AsmToken::TokenKind::RCurly: in parseExpression()
1317 case AsmToken::TokenKind::EndOfStatement: in parseExpression()
[all …]

123