Lines Matching refs:TokenInfo

29 struct Parser::TokenInfo {  struct in clang::ast_matchers::dynamic::Parser
47 TokenInfo() : Text(), Kind(TK_Eof), Range(), Value() {} in TokenInfo() function
55 const char* const Parser::TokenInfo::ID_Bind = "bind";
74 const TokenInfo &peekNextToken() const { return NextToken; } in peekNextToken()
77 TokenInfo consumeNextToken() { in consumeNextToken()
78 TokenInfo ThisToken = NextToken; in consumeNextToken()
83 TokenInfo::TokenKind nextTokenKind() const { return NextToken.Kind; } in nextTokenKind()
86 TokenInfo getNextToken() { in getNextToken()
88 TokenInfo Result; in getNextToken()
92 Result.Kind = TokenInfo::TK_CodeCompletion; in getNextToken()
99 Result.Kind = TokenInfo::TK_Eof; in getNextToken()
106 Result.Kind = TokenInfo::TK_Comma; in getNextToken()
111 Result.Kind = TokenInfo::TK_Period; in getNextToken()
116 Result.Kind = TokenInfo::TK_OpenParen; in getNextToken()
121 Result.Kind = TokenInfo::TK_CloseParen; in getNextToken()
148 Result.Kind = TokenInfo::TK_CodeCompletion; in getNextToken()
157 Result.Kind = TokenInfo::TK_Ident; in getNextToken()
161 Result.Kind = TokenInfo::TK_InvalidChar; in getNextToken()
173 void consumeUnsignedLiteral(TokenInfo *Result) { in consumeUnsignedLiteral()
189 Result->Kind = TokenInfo::TK_Literal; in consumeUnsignedLiteral()
196 Result->Kind = TokenInfo::TK_Error; in consumeUnsignedLiteral()
204 void consumeStringLiteral(TokenInfo *Result) { in consumeStringLiteral()
217 Result->Kind = TokenInfo::TK_Literal; in consumeStringLiteral()
231 Result->Kind = TokenInfo::TK_Error; in consumeStringLiteral()
256 TokenInfo NextToken;
294 const TokenInfo NameToken = Tokenizer->consumeNextToken(); in parseIdentifierPrefixImpl()
296 if (Tokenizer->nextTokenKind() != TokenInfo::TK_OpenParen) { in parseIdentifierPrefixImpl()
306 if ((Tokenizer->nextTokenKind() == TokenInfo::TK_Comma || in parseIdentifierPrefixImpl()
307 Tokenizer->nextTokenKind() == TokenInfo::TK_CloseParen || in parseIdentifierPrefixImpl()
308 Tokenizer->nextTokenKind() == TokenInfo::TK_Eof) && in parseIdentifierPrefixImpl()
325 bool Parser::parseMatcherExpressionImpl(const TokenInfo &NameToken, in parseMatcherExpressionImpl()
327 assert(NameToken.Kind == TokenInfo::TK_Ident); in parseMatcherExpressionImpl()
328 const TokenInfo OpenToken = Tokenizer->consumeNextToken(); in parseMatcherExpressionImpl()
329 if (OpenToken.Kind != TokenInfo::TK_OpenParen) { in parseMatcherExpressionImpl()
344 TokenInfo EndToken; in parseMatcherExpressionImpl()
349 while (Tokenizer->nextTokenKind() != TokenInfo::TK_Eof) { in parseMatcherExpressionImpl()
350 if (Tokenizer->nextTokenKind() == TokenInfo::TK_CloseParen) { in parseMatcherExpressionImpl()
357 const TokenInfo CommaToken = Tokenizer->consumeNextToken(); in parseMatcherExpressionImpl()
358 if (CommaToken.Kind != TokenInfo::TK_Comma) { in parseMatcherExpressionImpl()
380 if (EndToken.Kind == TokenInfo::TK_Eof) { in parseMatcherExpressionImpl()
386 if (Tokenizer->peekNextToken().Kind == TokenInfo::TK_Period) { in parseMatcherExpressionImpl()
389 const TokenInfo BindToken = Tokenizer->consumeNextToken(); in parseMatcherExpressionImpl()
390 if (BindToken.Kind == TokenInfo::TK_CodeCompletion) { in parseMatcherExpressionImpl()
395 const TokenInfo OpenToken = Tokenizer->consumeNextToken(); in parseMatcherExpressionImpl()
396 const TokenInfo IDToken = Tokenizer->consumeNextToken(); in parseMatcherExpressionImpl()
397 const TokenInfo CloseToken = Tokenizer->consumeNextToken(); in parseMatcherExpressionImpl()
401 if (BindToken.Kind != TokenInfo::TK_Ident || in parseMatcherExpressionImpl()
402 BindToken.Text != TokenInfo::ID_Bind) { in parseMatcherExpressionImpl()
406 if (OpenToken.Kind != TokenInfo::TK_OpenParen) { in parseMatcherExpressionImpl()
410 if (IDToken.Kind != TokenInfo::TK_Literal || !IDToken.Value.isString()) { in parseMatcherExpressionImpl()
414 if (CloseToken.Kind != TokenInfo::TK_CloseParen) { in parseMatcherExpressionImpl()
439 void Parser::addCompletion(const TokenInfo &CompToken, in addCompletion()
464 const TokenInfo CompToken = Tokenizer->consumeNextToken(); in addExpressionCompletions()
465 assert(CompToken.Kind == TokenInfo::TK_CodeCompletion); in addExpressionCompletions()
489 case TokenInfo::TK_Literal: in parseExpressionImpl()
493 case TokenInfo::TK_Ident: in parseExpressionImpl()
496 case TokenInfo::TK_CodeCompletion: in parseExpressionImpl()
500 case TokenInfo::TK_Eof: in parseExpressionImpl()
505 case TokenInfo::TK_Error: in parseExpressionImpl()
509 case TokenInfo::TK_OpenParen: in parseExpressionImpl()
510 case TokenInfo::TK_CloseParen: in parseExpressionImpl()
511 case TokenInfo::TK_Comma: in parseExpressionImpl()
512 case TokenInfo::TK_Period: in parseExpressionImpl()
513 case TokenInfo::TK_InvalidChar: in parseExpressionImpl()
514 const TokenInfo Token = Tokenizer->consumeNextToken(); in parseExpressionImpl()
563 if (Tokenizer.peekNextToken().Kind != TokenInfo::TK_Eof) { in parseExpression()