Home | History | Annotate | Download | only in libclang

Lines Matching refs:Tokens

4598   // Lex tokens until we hit the end of the range.
4647 CXToken **Tokens, unsigned *NumTokens) {
4648 if (Tokens)
4649 *Tokens = 0;
4654 if (!CXXUnit || !Tokens || !NumTokens)
4669 *Tokens = (CXToken *)malloc(sizeof(CXToken) * CXTokens.size());
4670 memmove(*Tokens, CXTokens.data(), sizeof(CXToken) * CXTokens.size());
4675 CXToken *Tokens, unsigned NumTokens) {
4676 free(Tokens);
4692 CXToken *Tokens;
4705 return SourceLocation::getFromRawEncoding(Tokens[tokI].int_data[1]);
4708 return Tokens[tokI].int_data[3] != 0;
4711 return SourceLocation::getFromRawEncoding(Tokens[tokI].int_data[3]);
4720 CXToken *tokens, CXCursor *cursors, unsigned numTokens,
4722 : Annotated(annotated), Tokens(tokens), Cursors(cursors),
4745 // Walk the AST within the region of interest, annotating tokens
4750 AnnotateTokensData::iterator Pos = Annotated.find(Tokens[I].int_data[1]);
4757 // Finish up annotating any tokens left.
4763 AnnotateTokensData::iterator Pos = Annotated.find(Tokens[I].int_data[1]);
4768 /// \brief It annotates and advances tokens with a cursor until the comparison
4772 /// Pass RangeBefore to annotate tokens with a cursor until a range is reached.
4773 /// Pass RangeOverlap to annotate tokens inside a range.
4792 /// \brief Special annotation handling for macro argument tokens.
4799 "Should be called only for macro arg tokens");
4804 // We only advance once past all of the macro arg tokens if all of them
4806 // at the start of the macro arg tokens so that the failing token will be
4824 TokIdx = I; // All of the tokens were handled, advance beyond all of them.
4892 // Skip tokens up until we catch up to the beginning of the preprocessing
4908 // Look at all of the tokens within this range.
4959 // get cursor mappings for tokens that are the *arguments* of a macro
5003 // Scan the tokens that are at the end of the cursor, but are not captured
5007 // Scan the tokens that are at the beginning of the cursor, but are not
5028 /// and mark tokens that are macro arguments. This info is used by the
5032 CXToken *Tokens;
5038 CXToken *tokens, unsigned numTokens)
5039 : SM(SM), Tokens(tokens), NumTokens(numTokens), CurIdx(0) { }
5074 return SourceLocation::getFromRawEncoding(Tokens[tokI].int_data[1]);
5079 // to mark macro arg expanded tokens with their expanded locations.
5080 Tokens[tokI].int_data[3] = loc.getRawEncoding();
5097 CXToken *Tokens;
5129 // Lex tokens in raw mode until we hit the end of the range, to avoid
5138 // don't see it while preprocessing these tokens later, but keep track
5174 CXToken *Tokens = ((clang_annotateTokens_Data*)UserData)->Tokens;
5178 // Determine the region of interest, which contains all of the tokens.
5181 cxloc::translateSourceLocation(clang_getTokenLocation(TU, Tokens[0])));
5184 Tokens[NumTokens-1])));
5190 // Relex the tokens within the source range to look for preprocessing
5195 // Search and mark tokens that are macro argument expansions.
5197 Tokens, NumTokens);
5206 AnnotateTokensWorker W(Annotated, Tokens, Cursors, NumTokens,
5217 // take another pass through the tokens to mark them as such.
5220 if (clang_getTokenKind(Tokens[I]) != CXToken_Identifier)
5224 IdentifierInfo *II = static_cast<IdentifierInfo *>(Tokens[I].ptr_data);
5242 Tokens[I].int_data[0] = CXToken_Keyword;
5249 IdentifierInfo *II = static_cast<IdentifierInfo *>(Tokens[I].ptr_data);
5258 Tokens[I].int_data[0] = CXToken_Keyword;
5264 Tokens[I].int_data[0] = CXToken_Keyword;
5274 CXToken *Tokens, unsigned NumTokens,
5277 if (NumTokens == 0 || !Tokens || !Cursors)
5291 clang_annotateTokens_Data data = { TU, CXXUnit, Tokens, NumTokens, Cursors };
5295 fprintf(stderr, "libclang: crash detected while annotating tokens\n");