Home
last modified time | relevance | path

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

/freebsd/contrib/llvm-project/clang/lib/Format/
H A DFormatTokenLexer.cpp112 if (!FormattingDisabled && FormatOffRegex.match(Tok.TokenText)) { in lex()
275 if (Tokens.back()->TokenText.size() == 1 && in tryMergePreviousTokens()
344 if (Tokens.back()->TokenText == "!cond") in tryMergePreviousTokens()
378 At->TokenText = StringRef(At->TokenText.begin(), in tryMergeNSStringLiteral()
379 String->TokenText.end() - At->TokenText.begin()); in tryMergeNSStringLiteral()
396 Hash->TokenText = in tryMergeJSPrivateIdentifier()
397 StringRef(Hash->TokenText.begin(), in tryMergeJSPrivateIdentifier()
398 Identifier->TokenText.end() - Hash->TokenText.begin()); in tryMergeJSPrivateIdentifier()
420 if (Prefix->isNot(tok::at) && Prefix->TokenText != "$") in tryMergeCSharpStringLiteral()
425 if ((Tok->TokenText == "$" && Prefix->is(tok::at)) || in tryMergeCSharpStringLiteral()
[all …]
H A DMacroExpander.cpp57 Def.Name = Current->TokenText; in parse()
76 Def.ArgMap[Def.Params.back()->TokenText] = Def.Params.size() - 1; in parseParams()
167 assert(hasArity(ID->TokenText, OptionalArgs->size())); in expand()
169 assert(objectLike(ID->TokenText)); in expand()
171 ? FunctionLike.find(ID->TokenText) in expand()
174 : ObjectLike.find(ID->TokenText)->second; in expand()
193 if (!ExpandedArgs.insert(Tok->TokenText).second) in expand()
195 auto I = Def.ArgMap.find(Tok->TokenText); in expand()
H A DBreakableToken.cpp209 StringRef Content = Token.TokenText.substr(2).ltrim(); in switchesFormatting()
261 assert(Tok.TokenText.starts_with(Prefix) && Tok.TokenText.ends_with(Postfix)); in BreakableStringLiteral()
262 Line = Tok.TokenText.substr( in BreakableStringLiteral()
263 Prefix.size(), Tok.TokenText.size() - Prefix.size() - Postfix.size()); in BreakableStringLiteral()
391 Tok, /*Offset=*/Tok.TokenText.size() - 1, /*ReplaceChars=*/1, in updateAfterBroken()
426 Text.data() - tokenAt(LineIndex).TokenText.data() + Split.first; in compressWhitespace()
477 StringRef TokenText(Tok.TokenText); in BreakableBlockComment() local
478 assert(TokenText.starts_with("/*") && TokenText.ends_with("*/")); in BreakableBlockComment()
479 TokenText.substr(2, TokenText.size() - 4) in BreakableBlockComment()
718 Text.data() - tokenAt(LineIndex).TokenText.data() + Split.first; in insertBreak()
[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()
555 llvm::dbgs() << N->Tok->TokenText << " "; in debug()
[all …]
H A DSortJavaScriptImports.cpp195 isClangFormatOn(FirstNonImportLine->First->TokenText.trim()))) { in analyze()
374 StringRef CommentText = Current->TokenText.trim(); in parseModuleReferences()
451 Current->TokenText.substr(1, Current->TokenText.size() - 2); in parseModuleReference()
465 Current->TokenText.substr(1, Current->TokenText.size() - 2); in parseModuleReference()
501 Reference.Prefix = Current->TokenText; in parseStarBinding()
516 Reference.DefaultImport = Current->TokenText; in parseNamedBindings()
560 Symbol.Symbol = Current->TokenText; in parseNamedBindings()
567 Symbol.Alias = Current->TokenText; in parseNamedBindings()
H A DQualifierAlignmentFixer.cpp82 NewText += First->TokenText; in insertQualifierAfter()
95 NewText += First->TokenText; in insertQualifierBefore()
125 NewText += Last->TokenText; in rotateTokens()
137 NewText += Tok->TokenText; in rotateTokens()
145 NewText += First->TokenText; in rotateTokens()
651 const auto Text = Tok->TokenText; in isPossibleMacro()
H A DContinuationIndenter.cpp170 static std::optional<StringRef> getRawStringDelimiter(StringRef TokenText) { in getRawStringDelimiter() argument
171 if (TokenText.size() < 5 // The smallest raw string possible is 'R"()"'. in getRawStringDelimiter()
172 || !TokenText.starts_with("R\"") || !TokenText.ends_with("\"")) { in getRawStringDelimiter()
179 size_t LParenPos = TokenText.substr(0, 19).find_first_of('('); in getRawStringDelimiter()
182 StringRef Delimiter = TokenText.substr(2, LParenPos - 2); in getRawStringDelimiter()
185 size_t RParenPos = TokenText.size() - Delimiter.size() - 2; in getRawStringDelimiter()
186 if (TokenText[RParenPos] != ')') in getRawStringDelimiter()
188 if (!TokenText.substr(RParenPos + 1).starts_with(Delimiter)) in getRawStringDelimiter()
618 if (BreakBeforeDecoratedTokens.contains(Current.TokenText)) in mustBreak()
655 ((Previous.is(tok::identifier) && Previous.TokenText == "endl") || in mustBreak()
[all …]
H A DUnwrappedLineParser.cpp50 << ", OC=" << I->Tok->OriginalColumn << ", \"" << I->Tok->TokenText in printLine()
719 Length -= OpeningBrace->TokenText.size() + 1; in mightFitOnOneLine()
724 Length -= FirstToken->TokenText.size() + 1; in mightFitOnOneLine()
924 if (I->Tok->TokenText != "goog") in isGoogScope()
930 if (I->Tok->TokenText != "scope") in isGoogScope()
1096 if (!IfDef && (FormatTok->is(tok::kw_false) || FormatTok->TokenText == "0")) in parsePPIf()
1098 if (IfDef && !IfNDef && FormatTok->TokenText == "SWIG") in parsePPIf()
1160 IncludeGuardToken->TokenText == FormatTok->TokenText) { in parsePPDefine()
1362 !FormatTok->TokenText.starts_with("//")) { in parseModuleImport()
1400 Previous->is(TT_TemplateString) && Previous->TokenText.ends_with("${"); in readTokenWithJavaScriptASI()
[all …]
H A DObjCPropertyAttributeOrderFixer.cpp69 const StringRef Attribute{Tok->TokenText}; in sortPropertyAttributes()
84 Value = Tok->TokenText; in sortPropertyAttributes()
H A DTokenAnnotator.cpp970 CurrentToken->TokenText.front() == '$') { in tryToParseTableGenTokVar()
1012 return llvm::is_contained(Opes, Tok.TokenText.str()); in isTableGenDAGArgBreakingOperator()
1672 Previous->TokenText.starts_with("\"\"")) { in consumeToken()
1842 !CurrentToken->TokenText.starts_with("//")) { in parseIncludeDirective()
2060 return Tok.TokenText == "goog" && Tok.Next && Tok.Next->is(tok::period) && in isClosureImportStatement()
2062 (Tok.Next->Next->TokenText == "module" || in isClosureImportStatement()
2063 Tok.Next->Next->TokenText == "provide" || in isClosureImportStatement()
2064 Tok.Next->Next->TokenText == "require" || in isClosureImportStatement()
2065 Tok.Next->Next->TokenText == "requireType" || in isClosureImportStatement()
2066 Tok.Next->Next->TokenText == "forwardDeclare") && in isClosureImportStatement()
[all …]
H A DFormatToken.h326 StringRef TokenText; member
717 !TokenText.starts_with("__")) { in isObjCLifetimeQualifier()
720 const auto Qualifier = TokenText.substr(2); in isObjCLifetimeQualifier()
728 if (is(TT_TemplateString) && TokenText.ends_with("${")) in opensScope()
738 if (is(TT_TemplateString) && TokenText.starts_with("}")) in closesScope()
807 StringRef Content = TokenText; in isLabelString()
1946 return FormatTok.is(tok::comment) && !FormatTok.TokenText.starts_with("/*"); in isLineComment()
H A DAffectedRangeManager.cpp79 End = End.getLocWithOffset(Last.TokenText.size()); in affectsTokenRange()
H A DUnwrappedLineFormatter.cpp180 return NamespaceToken ? NamespaceToken->TokenText : StringRef(); in getNamespaceTokenText()
188 return NamespaceToken ? NamespaceToken->TokenText : StringRef(); in getMatchingNamespaceTokenText()
364 I + J != E && NSToken->TokenText == getNamespaceTokenText(I[J]) && in tryFitMultipleLinesInOne()
390 nsToken->TokenText == in tryFitMultipleLinesInOne()
1043 llvm::dbgs() << (P.Tok ? P.Tok->TokenText : "F") << "|" << P.Indent << "|" in printLineState()
1046 llvm::dbgs() << State.NextToken->TokenText << "\n"; in printLineState()
H A DFormatTokenSource.h179 << "] Token: " << Tok->Tok.getName() << " / " << Tok->TokenText
H A DUsingDeclarationsSorter.cpp125 Label.append(Tok->TokenText.str()); in computeUsingDeclarationLabel()
H A DDefinitionBlockSeparator.cpp150 Tok->is(tok::comment) && !isClangFormatOn(Tok->TokenText)) { in separateBlocks()
H A DFormatToken.cpp47 llvm::binary_search(CppNonKeywordTypes, TokenText); in isTypeName()
H A DFormat.cpp2526 StringRef Input = FormatTok->TokenText; in requoteJSStringLiteral()
2772 Prev->Tok.getLocation().getLocWithOffset(Prev->TokenText.size()); in insertTrailingCommas()
3117 if (Line->First && (Line->First->TokenText.starts_with("#") || in guessIsObjC()
3118 Line->First->TokenText == "__pragma" || in guessIsObjC()
3119 Line->First->TokenText == "_Pragma")) { in guessIsObjC()
3130 FormatTok->TokenText)) || in guessIsObjC()
3142 << " token: " << FormatTok->TokenText << " token type: " in guessIsObjC()
/freebsd/contrib/llvm-project/clang/lib/Frontend/
H A DPrintPreprocessedOutput.cpp492 const std::string TokenText = PP.getSpelling(IncludeTok); in InclusionDirective() local
493 assert(!TokenText.empty()); in InclusionDirective()
494 *OS << "#" << TokenText << " " in InclusionDirective()
/freebsd/contrib/llvm-project/clang/lib/ASTMatchers/
H A DASTMatchersInternal.cpp694 StringRef TokenText = Lexer::getSpelling(SM.getSpellingLoc(Loc), Buffer, SM, in isTokenAtLoc() local
696 return !Invalid && Text == TokenText; in isTokenAtLoc()