/external/clang/include/clang/AST/ |
CommentBriefParser.h | 36 Token Tok; 39 SourceLocation Loc = Tok.getLocation(); 40 L.lex(Tok);
|
CommentParser.h | 56 Token Tok; 63 L.lex(Tok); 65 Tok = MoreLATokens.pop_back_val(); 69 MoreLATokens.push_back(Tok); 70 Tok = OldTok; 77 MoreLATokens.push_back(Tok); 80 Tok = Toks[0]; 84 return (Tok.is(tok::backslash_command) || Tok.is(tok::at_command)) & [all...] |
/external/clang/lib/Parse/ |
ParsePragma.cpp | 323 assert(Tok.is(tok::annot_pragma_unused)); 325 Actions.ActOnPragmaUnused(Tok, getCurScope(), UnusedLoc); 330 assert(Tok.is(tok::annot_pragma_vis)); 332 static_cast<IdentifierInfo *>(Tok.getAnnotationValue()); 348 assert(Tok.is(tok::annot_pragma_pack)); 350 static_cast<PragmaPackInfo *>(Tok.getAnnotationValue()); 353 if (Info->Alignment.is(tok::numeric_constant)) [all...] |
ParseInit.cpp | 28 switch (Tok.getKind()) { 32 case tok::period: // designator: '.' identifier 35 case tok::l_square: { // designator: array-designator 43 case tok::equal: 44 case tok::r_square: 48 case tok::amp: 49 case tok::kw_this: 50 case tok::identifier: 64 case tok::identifier: // designation: identifier ':' 65 return PP.LookAhead(0).is(tok::colon) [all...] |
ParseCXXInlineMethods.cpp | 32 assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try, tok::equal) && 59 if (TryConsumeToken(tok::equal)) { 61 SkipUntil(tok::semi); 67 SourceLocation KWEndLoc = Tok.getEndLoc().getLocWithOffset(-1); 68 if (TryConsumeToken(tok::kw_delete, KWLoc)) { 78 } else if (TryConsumeToken(tok::kw_default, KWLoc)) [all...] |
ParseTemplate.cpp | 34 if (Tok.is(tok::kw_template) && NextToken().isNot(tok::less)) { 65 assert(Tok.isOneOf(tok::kw_export, tok::kw_template) && 105 TryConsumeToken(tok::kw_export, ExportLoc); 109 if (!TryConsumeToken(tok::kw_template, TemplateLoc)) { 110 Diag(Tok.getLocation(), diag::err_expected_template); 120 SkipUntil(tok::r_brace, StopAtSemi | StopBeforeMatch) [all...] |
Parser.cpp | 77 Tok.startToken(); 78 Tok.setKind(tok::eof); 98 DiagnosticBuilder Parser::Diag(const Token &Tok, unsigned DiagID) { 99 return Diag(Tok.getLocation(), DiagID); 123 static bool IsCommonTypo(tok::TokenKind ExpectedTok, const Token &Tok) { 125 case tok::semi: 126 return Tok.is(tok::colon) || Tok.is(tok::comma); // : or , for [all...] |
ParseOpenMP.cpp | 42 auto Tok = P.getCurToken(); 44 Tok.isAnnotation() 46 : getOpenMPDirectiveKind(P.getPreprocessor().getSpelling(Tok)); 50 if (!Tok.isAnnotation() && DKind == OMPD_unknown) { 53 !P.getPreprocessor().getSpelling(Tok).compare("cancellation"); 59 Tok = P.getPreprocessor().LookAhead(0); 60 auto TokenIsAnnotation = Tok.isAnnotation(); 64 : getOpenMPDirectiveKind(P.getPreprocessor().getSpelling(Tok)); 69 !P.getPreprocessor().getSpelling(Tok).compare("point")) || 70 ((i == 1) && !P.getPreprocessor().getSpelling(Tok).compare("data")) [all...] |
ParseTentative.cpp | 51 switch (Tok.getKind()) { 53 case tok::kw_asm: 55 case tok::kw_namespace: 58 case tok::kw_using: 60 case tok::kw_static_assert: 61 case tok::kw__Static_assert: 148 switch (Tok.getKind()) { 149 case tok::kw__Atomic: 150 if (NextToken().isNot(tok::l_paren)) { 155 case tok::kw_typeof [all...] |
ParseObjc.cpp | 27 void Parser::MaybeSkipAttributes(tok::ObjCKeywordKind Kind) { 29 if (Tok.is(tok::kw___attribute)) { 30 if (Kind == tok::objc_interface || Kind == tok::objc_protocol) 31 Diag(Tok, diag::err_objc_postfix_attribute_hint) 32 << (Kind == tok::objc_protocol); 34 Diag(Tok, diag::err_objc_postfix_attribute); 50 if (Tok.is(tok::code_completion)) [all...] |
ParseStmt.cpp | 122 WantTypeSpecifiers = nextTok.isOneOf(tok::l_paren, tok::less, tok::l_square, 123 tok::identifier, tok::star, tok::amp); 125 nextTok.isOneOf(tok::l_paren, tok::identifier, tok::arrow, tok::period) [all...] |
ParseDeclCXX.cpp | 61 assert(Tok.is(tok::kw_namespace) && "Not a namespace!"); 65 if (Tok.is(tok::code_completion)) { 81 Diag(Tok.getLocation(), diag::warn_cxx14_compat_attribute) 83 attrLoc = Tok.getLocation(); 87 if (Tok.is(tok::identifier)) { 88 Ident = Tok.getIdentifierInfo(); 90 while (Tok.is(tok::coloncolon) && NextToken().is(tok::identifier)) [all...] |
/external/clang/lib/Lex/ |
Pragma.cpp | 80 Token &Tok) { 83 PP.LexUnexpandedToken(Tok); 87 = FindHandler(Tok.getIdentifierInfo() ? Tok.getIdentifierInfo()->getName() 91 PP.Diag(Tok, diag::warn_pragma_ignored); 96 Handler->HandlePragma(PP, Introducer, Tok); 116 Token Tok; 117 PragmaHandlers->HandlePragma(*this, Introducer, Tok); 136 Token &Tok) 138 Failed(false), OutTok(Tok) { [all...] |
TokenConcatenation.cpp | 48 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.CPlusPlus11); 74 TokenInfo[tok::identifier ] |= aci_custom [all...] |
TokenLexer.cpp | 26 void TokenLexer::Init(Token &Tok, SourceLocation ELEnd, MacroInfo *MI, 36 ExpandLocStart = Tok.getLocation(); 38 AtStartOfLine = Tok.isAtStartOfLine(); 39 HasLeadingSpace = Tok.hasLeadingSpace(); 52 assert((Tokens[0].getLocation().isFileID() || Tokens[0].is(tok::comment)) && 147 if (ResultToks.empty() || !ResultToks.back().is(tok::comma)) 161 if (!ResultToks.empty() && ResultToks.back().is(tok::hashhash)) 185 if (i != 0 && !Tokens[i-1].is(tok::hashhash) && CurTok.hasLeadingSpace()) 188 if (CurTok.isOneOf(tok::hash, tok::hashat)) [all...] |
PPMacroExpansion.cpp | 486 Callbacks->MacroExpands(Info.Tok, Info.MD, Info.Range, 586 if (I->is(tok::l_paren)) { 588 } else if (I->is(tok::r_paren)) { 592 } else if (I->is(tok::l_brace)) { 594 } else if (I->is(tok::r_brace)) { 640 if (I->is(tok::l_brace)) { 642 } else if (I->is(tok::r_brace)) { 646 } else if (I->is(tok::eof)) { 652 I->setKind(tok::comma); 660 if (FoundSeparatorToken && ArgStartIterator->is(tok::l_brace)) [all...] |
MacroArgs.cpp | 105 for (; ArgPtr->isNot(tok::eof); ++ArgPtr) 121 if (Result->is(tok::eof)) 135 for (; ArgTok->isNot(tok::eof); ++ArgTok) 173 Token &Tok = Result.back(); 174 PP.Lex(Tok); 175 } while (Result.back().isNot(tok::eof)); 198 Token Tok; 199 Tok.startToken(); 200 Tok.setKind(Charify ? tok::char_constant : tok::string_literal) [all...] |
/external/clang/include/clang/Lex/ |
TokenConcatenation.h | 57 char TokenInfo[tok::NUM_TOKENS]; 63 const Token &Tok) const; 68 bool IsIdentifierStringPrefix(const Token &Tok) const;
|
TokenLexer.h | 109 TokenLexer(Token &Tok, SourceLocation ILEnd, MacroInfo *MI, 112 Init(Tok, ILEnd, MI, ActualArgs); 119 void Init(Token &Tok, SourceLocation ILEnd, MacroInfo *MI, 147 bool Lex(Token &Tok); 162 /// PasteTokens - Tok is the LHS of a ## operator, and CurToken is the ## 165 /// Tok. If this returns true, the caller should immediately return the 167 bool PasteTokens(Token &Tok); 178 void HandleMicrosoftCommentPaste(Token &Tok);
|
/external/clang/lib/AST/ |
CommentParser.cpp | 30 /// Re-lexes a sequence of tok::text tokens. 60 const Token &Tok = Toks[Pos.CurToken]; 62 Pos.BufferStart = Tok.getText().begin(); 63 Pos.BufferEnd = Tok.getText().end(); 65 Pos.BufferStartLoc = Tok.getLocation(); 100 if (P.Tok.is(tok::newline)) { 102 Token Newline = P.Tok; 104 if (P.Tok.isNot(tok::text)) [all...] |
CommentBriefParser.cpp | 71 while (Tok.isNot(tok::eof)) { 72 if (Tok.is(tok::text)) { 74 FirstParagraphOrBrief += Tok.getText(); 76 ReturnsParagraph += Tok.getText(); 81 if (Tok.is(tok::backslash_command) || Tok.is(tok::at_command)) [all...] |
/external/clang/lib/Rewrite/ |
TokenRewriter.cpp | 35 while (RawTok.isNot(tok::eof)) { 37 if (Tok.is(tok::raw_identifier)) { 40 PP.LookUpIdentifierInfo(Tok); 87 Token Tok; 88 Tok.startToken(); 90 Tok.setLocation(ScratchBuf->getToken(Val, Len, Spelling)); 91 Tok.setLength(Len); 94 // set kind to tok::unknown. 95 Tok.setKind(tok::unknown) [all...] |
HTMLRewrite.cpp | 371 Token Tok; 372 L.LexFromRawLexer(Tok); 374 while (Tok.isNot(tok::eof)) { 377 unsigned TokOffs = SM.getFileOffset(Tok.getLocation()); 378 unsigned TokLen = Tok.getLength(); 379 switch (Tok.getKind()) { 381 case tok::identifier: 382 llvm_unreachable("tok::identifier in raw lexing mode!"); 383 case tok::raw_identifier: [all...] |
/external/clang/lib/Format/ |
TokenAnnotator.h | 42 : First(Line.Tokens.front().Tok), Level(Line.Level), 58 Current->Next = I->Tok; 59 I->Tok->Previous = Current; 93 // FIXME: Line.Last points to other characters than tok::semi 94 // and tok::lbrace. 95 return !Last->isOneOf(tok::semi, tok::comment); 127 bool startsWith(FormatToken *Tok, A K1) const { 128 while (Tok && Tok->is(tok::comment) [all...] |
UnwrappedLineParser.cpp | 101 FormatTok.Tok.startToken(); 102 FormatTok.Tok.setKind(tok::eof); 270 tok::TokenKind kind = FormatTok->Tok.getKind(); 272 kind = tok::l_brace; 274 kind = tok::r_brace; 278 case tok::comment: 282 case tok::l_brace: 290 case tok::r_brace [all...] |