Home
last modified time | relevance | path

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

/freebsd-13.1/contrib/llvm-project/clang/lib/Format/
H A DFormatTokenLexer.cpp193 At->TokenText = StringRef(At->TokenText.begin(), in tryMergeNSStringLiteral()
211 Hash->TokenText = in tryMergeJSPrivateIdentifier()
305 At->TokenText = StringRef(At->TokenText.begin(), in tryMergeCSharpStringLiteral()
349 At->TokenText = StringRef(At->TokenText.begin(), in tryMergeCSharpKeywordVariables()
387 For->TokenText = StringRef(For->TokenText.begin(), in tryMergeForEach()
457 First[0]->TokenText = StringRef(First[0]->TokenText.data(), in tryMergeTokens()
810 StringRef TokenText = FormatTok->TokenText; in getStashedToken() local
819 FormatTok->TokenText = TokenText; in getStashedToken()
978 FormatTok->TokenText = FormatTok->TokenText.substr(0, 1); in getNextToken()
983 FormatTok->TokenText = FormatTok->TokenText.substr(0, 1); in getNextToken()
[all …]
H A DBreakableToken.cpp222 StringRef Content = Token.TokenText.substr(2).ltrim(); in switchesFormatting()
274 assert(Tok.TokenText.startswith(Prefix) && Tok.TokenText.endswith(Postfix)); in BreakableStringLiteral()
275 Line = Tok.TokenText.substr( in BreakableStringLiteral()
376 StringRef TokenText(Tok.TokenText); in BreakableBlockComment() local
377 assert(TokenText.startswith("/*") && TokenText.endswith("*/")); in BreakableBlockComment()
378 TokenText.substr(2, TokenText.size() - 4) in BreakableBlockComment()
668 tokenAt(LineIndex).TokenText.data() - in reflow()
767 StringRef TokenText(CurrentTok->TokenText); in BreakableLineCommentSection() local
768 assert((TokenText.startswith("//") || TokenText.startswith("#")) && in BreakableLineCommentSection()
771 TokenText.split(Lines, "\n"); in BreakableLineCommentSection()
[all …]
H A DMacroExpander.cpp61 Def.Name = Current->TokenText; in parse()
80 Def.ArgMap[Def.Params.back()->TokenText] = Def.Params.size() - 1; in parseParams()
160 assert(defined(ID->TokenText)); in expand()
162 const Definition &Def = Definitions.find(ID->TokenText)->second; in expand()
178 if (!Tok->is(tok::identifier) || ExpandedArgs.contains(Tok->TokenText)) in expand()
180 ExpandedArgs.insert(Tok->TokenText); in expand()
181 auto I = Def.ArgMap.find(Tok->TokenText); in expand()
H A DNamespaceEndCommentsFixer.cpp39 name += Tok->TokenText; in computeName()
55 name += Tok->TokenText; in computeName()
69 text += NamespaceTok->TokenText; in computeEndCommentText()
104 NamespaceMacroCommentPattern.match(Comment->TokenText, &Groups)) { in validEndComment()
107 if (NamespaceTokenText != NamespaceTok->TokenText) in validEndComment()
110 !NamespaceCommentPattern.match(Comment->TokenText, &Groups)) { in validEndComment()
135 if (!CommentPattern.match(Comment->Next->TokenText, &Groups)) { in validEndComment()
193 return NamespaceTok ? NamespaceTok->TokenText : StringRef(); in getNamespaceTokenText()
248 NamespaceTokenText = NamespaceTok->TokenText; in analyze()
H A DSortJavaScriptImports.cpp191 FirstNonImportLine->First->TokenText.trim() == "// clang-format on")) in analyze()
367 StringRef CommentText = Current->TokenText.trim(); in parseModuleReferences()
442 Current->TokenText.substr(1, Current->TokenText.size() - 2); in parseModuleReference()
456 Current->TokenText.substr(1, Current->TokenText.size() - 2); in parseModuleReference()
489 Reference.Prefix = Current->TokenText; in parseStarBinding()
498 Reference.DefaultImport = Current->TokenText; in parseNamedBindings()
519 Symbol.Symbol = Current->TokenText; in parseNamedBindings()
529 Symbol.Alias = Current->TokenText; in parseNamedBindings()
H A DContinuationIndenter.cpp151 || !TokenText.startswith("R\"") || !TokenText.endswith("\"")) in getRawStringDelimiter()
157 size_t LParenPos = TokenText.substr(0, 19).find_first_of('('); in getRawStringDelimiter()
160 StringRef Delimiter = TokenText.substr(2, LParenPos - 2); in getRawStringDelimiter()
163 size_t RParenPos = TokenText.size() - Delimiter.size() - 2; in getRawStringDelimiter()
164 if (TokenText[RParenPos] != ')') in getRawStringDelimiter()
166 if (!TokenText.substr(RParenPos + 1).startswith(Delimiter)) in getRawStringDelimiter()
1883 return Tok->TokenText; in getEnclosingFunctionName()
1891 auto Delimiter = getRawStringDelimiter(Current.TokenText); in getRawStringStyle()
1934 StringRef Text = Current.TokenText; in createBreakableToken()
1973 CommentPragmasRegex.match(Current.TokenText.substr(2)) || in createBreakableToken()
[all …]
H A DUnwrappedLineParser.cpp669 if (I->Tok->TokenText != "goog") in isGoogScope()
675 if (I->Tok->TokenText != "scope") in isGoogScope()
825 if (IfDef && !IfNDef && FormatTok->TokenText == "SWIG") in parsePPIf()
886 IncludeGuardToken->TokenText == FormatTok->TokenText) { in parsePPDefine()
1078 Next->is(TT_TemplateString) && Next->TokenText.startswith("}"); in readTokenWithJavaScriptASI()
1504 StringRef Text = FormatTok->TokenText; in parseStructuralElement()
2754 FormatTok->TokenText != FormatTok->TokenText.upper(); in parseRecord()
3094 StringRef IndentContent = FormatTok.TokenText; in continuesLineCommentSection()
3095 if (FormatTok.TokenText.startswith("//") || in continuesLineCommentSection()
3096 FormatTok.TokenText.startswith("/*")) in continuesLineCommentSection()
[all …]
H A DTokenAnnotator.cpp1196 !CurrentToken->TokenText.startswith("//")) in parseIncludeDirective()
1397 (Tok.Next->Next->TokenText == "module" || in isClosureImportStatement()
1398 Tok.Next->Next->TokenText == "provide" || in isClosureImportStatement()
1399 Tok.Next->Next->TokenText == "require" || in isClosureImportStatement()
1400 Tok.Next->Next->TokenText == "requireType" || in isClosureImportStatement()
1611 LeadingIdentifier->TokenText == Current.Next->TokenText); in isDeductionGuide()
1708 if (Current.TokenText.startswith("/*")) { in determineTokenType()
1709 if (Current.TokenText.endswith("*/")) in determineTokenType()
1732 BeforeParen->TokenText == BeforeParen->TokenText.upper() && in determineTokenType()
3131 !Left.TokenText.endswith("=*/"); in spaceRequiredBetween()
[all …]
H A DUnwrappedLineFormatter.cpp160 return NamespaceToken ? NamespaceToken->TokenText : StringRef(); in getNamespaceTokenText()
168 return NamespaceToken ? NamespaceToken->TokenText : StringRef(); in getMatchingNamespaceTokenText()
279 nsToken->TokenText == getNamespaceTokenText(I[i + 1]) && in tryFitMultipleLinesInOne()
295 nsToken->TokenText == in tryFitMultipleLinesInOne()
771 llvm::dbgs() << (P.Tok ? P.Tok->TokenText : "F") << "|" << P.Indent << "|" in printLineState()
774 llvm::dbgs() << State.NextToken->TokenText << "\n"; in printLineState()
H A DFormatToken.h227 StringRef TokenText; member
536 if (is(TT_TemplateString) && TokenText.endswith("${")) in opensScope()
546 if (is(TT_TemplateString) && TokenText.startswith("}")) in closesScope()
615 StringRef Content = TokenText; in isLabelString()
H A DAffectedRangeManager.cpp79 End = End.getLocWithOffset(Last.TokenText.size()); in affectsTokenRange()
H A DUsingDeclarationsSorter.cpp102 Label.append(Tok->TokenText.str()); in computeUsingDeclarationLabel()
H A DFormat.cpp1607 StringRef Input = FormatTok->TokenText; in requoteJSStringLiteral()
1844 Prev->Tok.getLocation().getLocWithOffset(Prev->TokenText.size()); in insertTrailingCommas()
2186 if (Line->First && (Line->First->TokenText.startswith("#") || in guessIsObjC()
2187 Line->First->TokenText == "__pragma" || in guessIsObjC()
2188 Line->First->TokenText == "_Pragma")) in guessIsObjC()
2199 FormatTok->TokenText)) || in guessIsObjC()
2210 << " token: " << FormatTok->TokenText << " token type: " in guessIsObjC()
/freebsd-13.1/contrib/llvm-project/clang/lib/Frontend/
H A DPrintPreprocessedOutput.cpp341 const std::string TokenText = PP.getSpelling(IncludeTok); in InclusionDirective() local
342 assert(!TokenText.empty()); in InclusionDirective()
343 OS << "#" << TokenText << " " in InclusionDirective()
/freebsd-13.1/contrib/llvm-project/clang/lib/ASTMatchers/
H A DASTMatchersInternal.cpp683 StringRef TokenText = Lexer::getSpelling(SM.getSpellingLoc(Loc), Buffer, SM, in isTokenAtLoc() local
685 return !Invalid && Text == TokenText; in isTokenAtLoc()