Home
last modified time | relevance | path

Searched refs:TokenText (Results 1 – 20 of 20) sorted by relevance

/freebsd-src/contrib/llvm-project/clang/lib/Format/
H A DFormatTokenLexer.cpp231 if (Tokens.back()->TokenText.size() == 1 && in tryMergePreviousTokens()
301 if (Tokens.back()->TokenText == "!cond") in tryMergeNSStringLiteral()
335 At->TokenText = StringRef(At->TokenText.begin(), in tryMergeCSharpStringLiteral()
336 String->TokenText.end() - At->TokenText.begin()); in tryMergeCSharpStringLiteral()
353 Hash->TokenText = in tryMergeCSharpStringLiteral()
354 StringRef(Hash->TokenText.begin(), in tryMergeCSharpStringLiteral()
355 Identifier->TokenText.end() - Hash->TokenText in tryMergeCSharpStringLiteral()
722 auto &TokenText = CSharpStringLiteral->TokenText; handleCSharpVerbatimAndInterpolatedStrings() local
1036 StringRef TokenText = FormatTok->TokenText; getStashedToken() local
[all...]
H A DMacroExpander.cpp60 Def.Name = Current->TokenText; in parse()
79 Def.ArgMap[Def.Params.back()->TokenText] = Def.Params.size() - 1; in parseParams()
170 assert(hasArity(ID->TokenText, OptionalArgs->size())); in expand()
172 assert(objectLike(ID->TokenText)); in expand()
174 ? FunctionLike.find(ID->TokenText) in expand()
177 : ObjectLike.find(ID->TokenText)->second; in expand()
194 if (Tok->isNot(tok::identifier) || ExpandedArgs.contains(Tok->TokenText)) in expand()
196 ExpandedArgs.insert(Tok->TokenText); in expand()
197 auto I = Def.ArgMap.find(Tok->TokenText); in expand()
H A DNamespaceEndCommentsFixer.cpp74 name += Tok->TokenText; in computeName()
90 FirstNSName += FirstNSTok->TokenText; in computeName()
101 auto AddToken = [&name](const FormatToken *Tok) { name += Tok->TokenText; }; in computeName()
121 name += FirstNSTok->TokenText; in computeName()
136 name += FirstNSTok->TokenText; in computeName()
147 text += NamespaceTok->TokenText; in computeEndCommentText()
182 NamespaceMacroCommentPattern.match(Comment->TokenText, &Groups)) { in validEndComment()
185 if (NamespaceTokenText != NamespaceTok->TokenText) in validEndComment()
188 !NamespaceCommentPattern.match(Comment->TokenText, &Groups)) { in validEndComment()
213 if (!CommentPattern.match(Comment->Next->TokenText, &Groups)) in validEndComment()
[all …]
H A DBreakableToken.cpp222 StringRef Content = Token.TokenText.substr(2).ltrim(); in switchesFormatting()
274 assert(Tok.TokenText.starts_with(Prefix) && Tok.TokenText.ends_with(Postfix)); in BreakableStringLiteral()
275 Line = Tok.TokenText.substr( in BreakableStringLiteral()
276 Prefix.size(), Tok.TokenText.size() - Prefix.size() - Postfix.size()); in BreakableStringLiteral()
404 Tok, /*Offset=*/Tok.TokenText.size() - 1, /*ReplaceChars=*/1, in updateAfterBroken()
439 Text.data() - tokenAt(LineIndex).TokenText.data() + Split.first; in compressWhitespace()
490 StringRef TokenText(Tok.TokenText); in BreakableBlockComment() local
491 assert(TokenText in BreakableBlockComment()
878 StringRef TokenText(CurrentTok->TokenText); BreakableLineCommentSection() local
[all...]
H A DMacroCallReconstructor.cpp77 llvm::dbgs() << "MCR: Token: " << Token->TokenText << ", Parent: " in add()
78 << (ExpandedParent ? ExpandedParent->TokenText : "<null>") in add()
141 << (Parent ? Parent->TokenText : "<null>") << "\n"); in prepareParent()
156 << MacroCallStructure.back().MacroCallLParen->TokenText in prepareParent()
158 << (OpenMacroParent ? OpenMacroParent->TokenText : "<null>") in prepareParent()
337 llvm::dbgs() << "At token: " << Token->TokenText << "\n"; in endReconstruction()
375 llvm::dbgs() << (P.first ? P.first->TokenText : "<null>"); in debugParentMap()
379 llvm::dbgs() << " -> " << (I->second ? I->second->TokenText : "<null>"); in debugParentMap()
502 LLVM_DEBUG(llvm::dbgs() << "-> " << Token->TokenText << "\n"); in appendToken()
556 llvm::dbgs() << N->Tok->TokenText << " "; in MacroCallState()
[all...]
H A DSortJavaScriptImports.cpp197 isClangFormatOn(FirstNonImportLine->First->TokenText.trim()))) { in analyze()
377 StringRef CommentText = Current->TokenText.trim(); in parseModuleReferences()
454 Current->TokenText.substr(1, Current->TokenText.size() - 2); in parseModuleReference()
466 // URL = TokenText without the quotes. in parseModuleReference()
468 Current->TokenText.substr(1, Current->TokenText.size() - 2); in parseModuleReference()
504 Reference.Prefix = Current->TokenText; in parseStarBinding()
519 Reference.DefaultImport = Current->TokenText; in parseNamedBindings()
563 Symbol.Symbol = Current->TokenText; in parseNamedBindings()
[all...]
H A DQualifierAlignmentFixer.cpp85 NewText += First->TokenText; in insertQualifierAfter()
98 NewText += First->TokenText; in insertQualifierBefore()
128 NewText += Last->TokenText; in rotateTokens()
138 NewText += Tok->TokenText; in rotateTokens()
146 NewText += First->TokenText; in rotateTokens()
634 if (Tok->TokenText.upper() == Tok->TokenText.str()) { in isPossibleMacro()
636 return Tok->TokenText.size() != 1; in isPossibleMacro()
H A DContinuationIndenter.cpp159 // Returns the delimiter of a raw string literal, or std::nullopt if TokenText
162 static std::optional<StringRef> getRawStringDelimiter(StringRef TokenText) { in getRawStringDelimiter() argument
163 if (TokenText.size() < 5 // The smallest raw string possible is 'R"()"'. in getRawStringDelimiter()
164 || !TokenText.starts_with("R\"") || !TokenText.ends_with("\"")) { in getRawStringDelimiter()
171 size_t LParenPos = TokenText.substr(0, 19).find_first_of('('); in getRawStringDelimiter()
174 StringRef Delimiter = TokenText.substr(2, LParenPos - 2); in getRawStringDelimiter()
177 size_t RParenPos = TokenText.size() - Delimiter.size() - 2; in getRawStringDelimiter()
178 if (TokenText[RParenPos] != ')') in getRawStringDelimiter()
180 if (!TokenText in getRawStringDelimiter()
[all...]
H A DUnwrappedLineParser.cpp52 << ", OC=" << I->Tok->OriginalColumn << ", \"" << I->Tok->TokenText in printLine()
724 Length -= OpeningBrace->TokenText.size() + 1; in mightFitOnOneLine()
729 Length -= FirstToken->TokenText.size() + 1; in mightFitOnOneLine()
929 if (I->Tok->TokenText != "goog")
935 if (I->Tok->TokenText != "scope") in isIIFE()
1095 if (!IfDef && (FormatTok->is(tok::kw_false) || FormatTok->TokenText == "0")) in parsePPIf()
1097 if (IfDef && !IfNDef && FormatTok->TokenText == "SWIG") in parsePPIf()
1158 IncludeGuardToken->TokenText == FormatTok->TokenText) { in parsePPDefine()
1355 !FormatTok->TokenText in parseModuleImport()
[all...]
H A DObjCPropertyAttributeOrderFixer.cpp71 const StringRef Attribute{Tok->TokenText}; in sortPropertyAttributes()
86 Value = Tok->TokenText; in sortPropertyAttributes()
H A DTokenAnnotator.cpp977 CurrentToken->TokenText.front() == '$') { in consumeToken()
1019 return std::find(Opes.begin(), Opes.end(), Tok.TokenText.str()) != in consumeToken()
1650 Previous->TokenText.starts_with("\"\"")) { in parseLine()
1828 !CurrentToken->TokenText.starts_with("//")) { in modifyContext()
2044 return Tok.TokenText == "goog" && Tok.Next && Tok.Next->is(tok::period) && in determineTokenType()
2046 (Tok.Next->Next->TokenText == "module" || in determineTokenType()
2047 Tok.Next->Next->TokenText == "provide" || in determineTokenType()
2048 Tok.Next->Next->TokenText == "require" || in determineTokenType()
2049 Tok.Next->Next->TokenText == "requireType" || in determineTokenType()
2050 Tok.Next->Next->TokenText in determineTokenType()
[all...]
H A DAffectedRangeManager.cpp79 End = End.getLocWithOffset(Last.TokenText.size()); in affectsTokenRange()
H A DUnwrappedLineFormatter.cpp200 return NamespaceToken ? NamespaceToken->TokenText : StringRef(); in getNamespaceTokenText()
208 return NamespaceToken ? NamespaceToken->TokenText : StringRef(); in getMatchingNamespaceTokenText()
372 I + J != E && NSToken->TokenText == getNamespaceTokenText(I[J]) && in tryFitMultipleLinesInOne()
398 nsToken->TokenText == in tryFitMultipleLinesInOne()
985 llvm::dbgs() << (P.Tok ? P.Tok->TokenText : "F") << "|" << P.Indent << "|"
988 llvm::dbgs() << State.NextToken->TokenText << "\n"; in LineFormatter()
H A DFormatTokenSource.h179 << "] Token: " << Tok->Tok.getName() << " / " << Tok->TokenText
H A DFormatToken.h318 StringRef TokenText;
707 if (is(TT_TemplateString) && TokenText.ends_with("${")) in isPointerOrReference()
717 if (is(TT_TemplateString) && TokenText.starts_with("}")) in isUnaryOperator()
737 assert(!TokenText.empty()); in isFunctionLikeKeyword()
738 if (!isalpha(TokenText[0])) in isFunctionLikeKeyword()
805 StringRef Content = TokenText;
1963 return FormatTok.is(tok::comment) && !FormatTok.TokenText.starts_with("/*");
296 StringRef TokenText; global() member
H A DDefinitionBlockSeparator.cpp147 Tok->is(tok::comment) && !isClangFormatOn(Tok->TokenText)) { in separateBlocks()
H A DUsingDeclarationsSorter.cpp125 Label.append(Tok->TokenText.str()); in computeUsingDeclarationLabel()
H A DFormat.cpp2357 StringRef Input = FormatTok->TokenText; in requoteJSStringLiteral()
2603 Prev->Tok.getLocation().getLocWithOffset(Prev->TokenText.size()); in analyze()
2948 if (Line->First && (Line->First->TokenText.starts_with("#") || in guessIsObjC()
2949 Line->First->TokenText == "__pragma" || in guessIsObjC()
2950 Line->First->TokenText == "_Pragma")) { in guessIsObjC()
2962 FormatTok->TokenText)) ||
2974 << " token: " << FormatTok->TokenText << " token type: " in affectsRange()
/freebsd-src/contrib/llvm-project/clang/lib/Frontend/
H A DPrintPreprocessedOutput.cpp493 const std::string TokenText = PP.getSpelling(IncludeTok); in MacroDefined()
494 assert(!TokenText.empty()); in MacroDefined()
495 *OS << "#" << TokenText << " " in MacroDefined()
410 const std::string TokenText = PP.getSpelling(IncludeTok); InclusionDirective() local
/freebsd-src/contrib/llvm-project/clang/lib/ASTMatchers/
H A DASTMatchersInternal.cpp684 StringRef TokenText = Lexer::getSpelling(SM.getSpellingLoc(Loc), Buffer, SM, in isTokenAtLoc() local
686 return !Invalid && Text == TokenText; in isTokenAtLoc()