Searched defs:Tok (Results 1 - 25 of 46) sorted by relevance

12

/external/clang/include/clang/AST/
H A DCommentBriefParser.h36 Token Tok; member in class:clang::comments::BriefParser
39 SourceLocation Loc = Tok.getLocation();
40 L.lex(Tok);
H A DCommentParser.h56 Token Tok; member in class:clang::comments::Parser
63 L.lex(Tok);
65 Tok = MoreLATokens.back();
71 MoreLATokens.push_back(Tok);
72 Tok = OldTok;
79 MoreLATokens.push_back(Tok);
86 Tok = Toks[0];
/external/clang/lib/Lex/
H A DPPCaching.cpp97 void Preprocessor::AnnotatePreviousCachedTokens(const Token &Tok) { argument
98 assert(Tok.isAnnotation() && "Expected annotation token");
100 assert(CachedTokens[CachedLexPos-1].getLastLoc() == Tok.getAnnotationEndLoc()
107 if (AnnotBegin->getLocation() == Tok.getLocation()) {
113 *AnnotBegin = Tok;
H A DTokenConcatenation.cpp48 bool TokenConcatenation::IsIdentifierStringPrefix(const Token &Tok) const {
51 if (!Tok.needsCleaning()) {
52 if (Tok.getLength() < 1 || Tok.getLength() > 3)
55 const char *Ptr = SM.getCharacterData(SM.getSpellingLoc(Tok.getLocation()));
56 return IsStringPrefix(StringRef(Ptr, Tok.getLength()),
60 if (Tok.getLength() < 256) {
63 unsigned length = PP.getSpelling(Tok, TokPtr);
67 return IsStringPrefix(StringRef(PP.getSpelling(Tok)), LangOpts.CPlusPlus0x);
119 /// GetFirstChar - Get the first character of the token \arg Tok,
121 GetFirstChar(Preprocessor &PP, const Token &Tok) argument
[all...]
H A DMacroArgs.cpp174 Token &Tok = Result.back(); local
175 PP.Lex(Tok);
199 Token Tok; local
200 Tok.startToken();
201 Tok.setKind(Charify ? tok::char_constant : tok::string_literal);
211 const Token &Tok = *ArgToks; local
212 if (!isFirst && (Tok.hasLeadingSpace() || Tok.isAtStartOfLine()))
218 if (Tok.is(tok::string_literal) || // "foo"
219 Tok
[all...]
H A DPPExpressions.cpp731 Token Tok; local
732 LexNonComment(Tok);
739 if (EvaluateValue(ResVal, Tok, DT, true, *this)) {
741 if (Tok.isNot(tok::eod))
752 if (Tok.is(tok::eod)) {
766 Tok, true, *this)) {
768 if (Tok.isNot(tok::eod))
778 if (Tok.isNot(tok::eod)) {
779 Diag(Tok, diag::err_pp_expected_eol);
H A DPPLexerChange.cpp159 void Preprocessor::EnterMacro(Token &Tok, SourceLocation ILEnd, argument
165 CurTokenLexer.reset(new TokenLexer(Tok, ILEnd, Macro, Args, *this));
168 CurTokenLexer->Init(Tok, ILEnd, Macro, Args);
434 void Preprocessor::HandleMicrosoftCommentPaste(Token &Tok) { argument
463 if (!HandleEndOfTokenLexer(Tok)) Lex(Tok);
471 while (Tok.isNot(tok::eod) && Tok.isNot(tok::eof))
472 Lex(Tok);
475 if (Tok
[all...]
H A DTokenLexer.cpp26 void TokenLexer::Init(Token &Tok, SourceLocation ELEnd, MacroInfo *MI, argument
36 ExpandLocStart = Tok.getLocation();
38 AtStartOfLine = Tok.isAtStartOfLine();
39 HasLeadingSpace = Tok.hasLeadingSpace();
225 Token &Tok = ResultToks[i]; local
226 if (Tok.is(tok::hashhash))
227 Tok.setKind(tok::unknown);
232 if (Tok.is(tok::comma) && PP.getLangOpts().MicrosoftMode)
233 Tok.setFlag(Token::IgnoredComma);
281 Token &Tok local
366 Lex(Token &Tok) argument
459 PasteTokens(Token &Tok) argument
644 HandleMicrosoftCommentPaste(Token &Tok) argument
730 Token &Tok = *begin_tokens; local
754 Token &Tok = *begin_tokens; local
[all...]
H A DPPMacroExpansion.cpp264 Callbacks->MacroExpands(Info.Tok, Info.MI, Info.Range);
364 Token Tok; local
368 LexUnexpandedToken(Tok);
369 assert(Tok.is(tok::l_paren) && "Error computing l-paren-ness?");
377 while (Tok.isNot(tok::r_paren)) {
378 assert((Tok.is(tok::l_paren) || Tok.is(tok::comma)) &&
382 SourceLocation ArgStartLoc = Tok.getLocation();
391 LexUnexpandedToken(Tok);
393 if (Tok
804 EvaluateHasIncludeCommon(Token &Tok, IdentifierInfo *II, Preprocessor &PP, const DirectoryLookup *LookupFrom) argument
883 EvaluateHasInclude(Token &Tok, IdentifierInfo *II, Preprocessor &PP) argument
890 EvaluateHasIncludeNext(Token &Tok, IdentifierInfo *II, Preprocessor &PP) argument
911 ExpandBuiltinMacro(Token &Tok) argument
[all...]
/external/clang/lib/Rewrite/Core/
H A DTokenRewriter.cpp37 if (Tok.is(tok::raw_identifier)) {
40 PP.LookUpIdentifierInfo(Tok);
87 Token Tok; local
88 Tok.startToken();
90 Tok.setLocation(ScratchBuf->getToken(Val, Len, Spelling));
91 Tok.setLength(Len);
95 Tok.setKind(tok::unknown);
97 return AddToken(Tok, RemapIterator(I));
H A DHTMLRewrite.cpp373 Token Tok; local
374 L.LexFromRawLexer(Tok);
376 while (Tok.isNot(tok::eof)) {
379 unsigned TokOffs = SM.getFileOffset(Tok.getLocation());
380 unsigned TokLen = Tok.getLength();
381 switch (Tok.getKind()) {
388 PP.LookUpIdentifierInfo(Tok);
391 if (Tok.isNot(tok::identifier))
419 if (!Tok.isAtStartOfLine())
425 L.LexFromRawLexer(Tok);
459 Token Tok; local
511 Token Tok; local
[all...]
/external/clang/include/clang/Lex/
H A DTokenLexer.h101 TokenLexer(Token &Tok, SourceLocation ILEnd, MacroInfo *MI, argument
104 Init(Tok, ILEnd, MI, ActualArgs);
111 void Init(Token &Tok, SourceLocation ILEnd, MacroInfo *MI,
139 void Lex(Token &Tok);
154 /// PasteTokens - Tok is the LHS of a ## operator, and CurToken is the ##
157 /// Tok. If this returns true, the caller should immediately return the
159 bool PasteTokens(Token &Tok);
170 void HandleMicrosoftCommentPaste(Token &Tok);
H A DLexer.h234 /// Tok.getLength() bytes long. The length of the actual result is returned.
241 static unsigned getSpelling(const Token &Tok, const char *&Buffer,
246 /// getSpelling() - Return the 'spelling' of the Tok token. The spelling of a
251 static std::string getSpelling(const Token &Tok,
485 inline char getAndAdvanceChar(const char *&Ptr, Token &Tok) { argument
491 char C = getCharAndSizeSlow(Ptr, Size, &Tok);
500 const char *ConsumeChar(const char *Ptr, unsigned Size, Token &Tok) { argument
508 getCharAndSizeSlow(Ptr, Size, &Tok);
530 char getCharAndSizeSlow(const char *Ptr, unsigned &Size, Token *Tok = 0);
/external/clang/unittests/AST/
H A DCommentLexer.cpp47 StringRef getCommandName(const Token &Tok) { argument
48 return Traits.getCommandInfo(Tok.getCommandID())->Name;
51 StringRef getVerbatimBlockName(const Token &Tok) { argument
52 return Traits.getCommandInfo(Tok.getVerbatimBlockID())->Name;
55 StringRef getVerbatimLineName(const Token &Tok) { argument
56 return Traits.getCommandInfo(Tok.getVerbatimLineID())->Name;
69 Token Tok; local
70 L.lex(Tok);
71 if (Tok.is(tok::eof))
73 Toks.push_back(Tok);
[all...]
H A DCommentParser.cpp71 Token Tok; local
72 L.lex(Tok);
73 if (Tok.is(tok::eof))
/external/llvm/lib/TableGen/
H A DTGLexer.cpp294 tgtok::TokKind Tok = LexToken(); local
295 if (Tok == tgtok::Error) return true;
296 if (Tok != tgtok::StrVal) {
/external/llvm/tools/llvm-mc/
H A Dllvm-mc.cpp231 AsmToken Tok = Lexer.getTok(); local
233 switch (Tok.getKind()) {
298 Out->os().write_escaped(Tok.getString());
/external/clang/lib/Frontend/
H A DFrontendActions.cpp387 Token Tok; local
390 PP.Lex(Tok);
391 PP.DumpToken(Tok, true);
393 } while (Tok.isNot(tok::eof));
417 Token Tok; local
421 PP.Lex(Tok);
422 } while (Tok.isNot(tok::eof));
H A DPrintPreprocessedOutput.cpp139 bool HandleFirstTokOnLine(Token &Tok);
149 const Token &Tok) {
150 return ConcatInfo.AvoidConcat(PrevPrevTok, PrevTok, Tok);
419 bool PrintPPOutputPPCallbacks::HandleFirstTokOnLine(Token &Tok) { argument
422 if (!MoveToLine(Tok.getLocation()))
427 unsigned ColNo = SM.getExpansionColumnNumber(Tok.getLocation());
435 if (ColNo <= 1 && Tok.is(tok::hash))
496 static void PrintPreprocessedTokens(Preprocessor &PP, Token &Tok, argument
506 Callbacks->MoveToLine(Tok.getLocation());
510 if (Tok
148 AvoidConcat(const Token &PrevPrevTok, const Token &PrevTok, const Token &Tok) argument
569 Token Tok; local
623 Token Tok; local
[all...]
H A DVerifyDiagnosticConsumer.cpp494 Token Tok; local
495 Tok.setKind(tok::comment);
496 while (Tok.isNot(tok::eof)) {
497 RawLex.Lex(Tok);
498 if (!Tok.is(tok::comment)) continue;
500 std::string Comment = RawLex.getSpelling(Tok, SM, LangOpts);
504 if (ParseDirective(Comment, 0, SM, Tok.getLocation(),
/external/clang/lib/Parse/
H A DParsePragma.cpp26 assert(Tok.is(tok::annot_pragma_unused));
28 Actions.ActOnPragmaUnused(Tok, getCurScope(), UnusedLoc);
33 assert(Tok.is(tok::annot_pragma_vis));
35 static_cast<IdentifierInfo *>(Tok.getAnnotationValue());
49 assert(Tok.is(tok::annot_pragma_pack));
51 static_cast<PragmaPackInfo *>(Tok.getAnnotationValue());
65 Token Tok; local
66 PP.LexUnexpandedToken(Tok);
68 const IdentifierInfo *PushPop = Tok.getIdentifierInfo();
74 PP.LexUnexpandedToken(Tok);
124 Token Tok; local
245 Token Tok; local
275 Token Tok; local
351 Token Tok; local
432 Token Tok; local
474 Token Tok; local
507 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument
518 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument
[all...]
/external/clang/lib/Rewrite/Frontend/
H A DInclusionRewriter.cpp349 Token Tok; local
357 PP.Lex(Tok);
358 } while (Tok.isNot(tok::eof));
/external/llvm/utils/TableGen/
H A DCodeGenInstruction.cpp202 std::string Tok = CStr.substr(start, wpos - start); local
203 if (Tok == "@earlyclobber") {
/external/clang/lib/AST/
H A DCommentParser.cpp50 const Token &Tok = Toks[Pos.CurToken]; local
52 Pos.BufferStart = Tok.getText().begin();
53 Pos.BufferEnd = Tok.getText().end();
55 Pos.BufferStartLoc = Tok.getLocation();
90 if (P.Tok.is(tok::newline)) {
92 Token Newline = P.Tok;
94 if (P.Tok.isNot(tok::text)) {
100 if (P.Tok.isNot(tok::text)) {
105 Toks.push_back(P.Tok);
149 bool lexWord(Token &Tok) { argument
183 lexDelimitedSeq(Token &Tok, char OpenDelim, char CloseDelim) argument
[all...]
/external/llvm/lib/Target/MBlaze/AsmParser/
H A DMBlazeAsmParser.cpp93 } Tok; member in union:__anon8910::MBlazeOperand::__anon8911
128 Tok = o.Tok;
220 return StringRef(Tok.Data, Tok.Length);
227 Op->Tok.Data = Str.data();
228 Op->Tok.Length = Str.size();

Completed in 1889 milliseconds

12