Lines Matching refs:TokenText
231 if (Tokens.back()->TokenText.size() == 1 && in tryMergePreviousTokens()
301 if (Tokens.back()->TokenText == "!cond") in tryMergePreviousTokens()
335 At->TokenText = StringRef(At->TokenText.begin(), in tryMergeNSStringLiteral()
336 String->TokenText.end() - At->TokenText.begin()); in tryMergeNSStringLiteral()
353 Hash->TokenText = in tryMergeJSPrivateIdentifier()
354 StringRef(Hash->TokenText.begin(), in tryMergeJSPrivateIdentifier()
355 Identifier->TokenText.end() - Hash->TokenText.begin()); in tryMergeJSPrivateIdentifier()
377 if (Prefix->isNot(tok::at) && Prefix->TokenText != "$") in tryMergeCSharpStringLiteral()
382 if ((Tok->TokenText == "$" && Prefix->is(tok::at)) || in tryMergeCSharpStringLiteral()
383 (Tok->is(tok::at) && Prefix->TokenText == "$")) { in tryMergeCSharpStringLiteral()
393 Prefix->TokenText = in tryMergeCSharpStringLiteral()
394 StringRef(Prefix->TokenText.begin(), in tryMergeCSharpStringLiteral()
395 String->TokenText.end() - Prefix->TokenText.begin()); in tryMergeCSharpStringLiteral()
419 NullishCoalescing->TokenText = in tryMergeNullishCoalescingEqual()
420 StringRef(NullishCoalescing->TokenText.begin(), in tryMergeNullishCoalescingEqual()
421 Equal->TokenText.end() - NullishCoalescing->TokenText.begin()); in tryMergeNullishCoalescingEqual()
435 if (Keyword->TokenText == "$") in tryMergeCSharpKeywordVariables()
441 At->TokenText = StringRef(At->TokenText.begin(), in tryMergeCSharpKeywordVariables()
442 Keyword->TokenText.end() - At->TokenText.begin()); in tryMergeCSharpKeywordVariables()
456 if (Identifier->TokenText != "foreach") in tryTransformCSharpForEach()
473 if (Each->TokenText != "each") in tryMergeForEach()
479 For->TokenText = StringRef(For->TokenText.begin(), in tryMergeForEach()
480 Each->TokenText.end() - For->TokenText.begin()); in tryMergeForEach()
528 First[0]->TokenText = "<<"; in tryMergeLessLess()
552 First[0]->TokenText = ">>"; in tryMergeGreaterGreater()
583 AddLength += First[i]->TokenText.size(); in tryMergeTokens()
587 First[0]->TokenText = StringRef(First[0]->TokenText.data(), in tryMergeTokens()
588 First[0]->TokenText.size() + AddLength); in tryMergeTokens()
660 const char *RegexBegin = Offset - RegexToken->TokenText.size(); in tryParseJSRegexLiteral()
689 RegexToken->TokenText = StringRef(RegexBegin, Offset - RegexBegin); in tryParseJSRegexLiteral()
690 RegexToken->ColumnWidth = RegexToken->TokenText.size(); in tryParseJSRegexLiteral()
760 auto &TokenText = CSharpStringLiteral->TokenText; in handleCSharpVerbatimAndInterpolatedStrings() local
764 if (TokenText.starts_with(R"($@")") || TokenText.starts_with(R"(@$")")) { in handleCSharpVerbatimAndInterpolatedStrings()
767 } else if (TokenText.starts_with(R"(@")")) { in handleCSharpVerbatimAndInterpolatedStrings()
777 const char *StrBegin = Lex->getBufferLocation() - TokenText.size(); in handleCSharpVerbatimAndInterpolatedStrings()
793 TokenText = LiteralText; in handleCSharpVerbatimAndInterpolatedStrings()
827 MultiLineString->TokenText = Text; in handleTableGenMultilineString()
853 StringRef Text = Tok->TokenText; in handleTableGenNumericLikeIdentifier()
900 BacktickToken->TokenText == "`") { in handleTemplateStrings()
908 const char *TmplBegin = Offset - BacktickToken->TokenText.size(); // at "`" in handleTemplateStrings()
929 BacktickToken->TokenText = LiteralText; in handleTemplateStrings()
957 Lex->getBufferLocation() - HashToken->TokenText.size(); // at "#" in tryParsePythonComment()
965 HashToken->TokenText = Lex->getBuffer().substr(From, Len); in tryParsePythonComment()
987 if (Macro->TokenText != "_T") in tryMerge_TMacro()
990 const char *Start = Macro->TokenText.data(); in tryMerge_TMacro()
991 const char *End = Last->TokenText.data() + Last->TokenText.size(); in tryMerge_TMacro()
992 String->TokenText = StringRef(Start, End - Start); in tryMerge_TMacro()
998 String->TokenText, String->OriginalColumn, Style.TabWidth, Encoding); in tryMerge_TMacro()
1074 StringRef TokenText = FormatTok->TokenText; in getStashedToken() local
1083 FormatTok->TokenText = TokenText; in getStashedToken()
1097 assert(NewLen <= FormatTok->TokenText.size()); in truncateToken()
1099 Lex->getBufferLocation() - FormatTok->TokenText.size() + NewLen))); in truncateToken()
1100 FormatTok->TokenText = FormatTok->TokenText.substr(0, NewLen); in truncateToken()
1102 FormatTok->TokenText, FormatTok->OriginalColumn, Style.TabWidth, in truncateToken()
1161 auto LeadingWhitespace = countLeadingWhitespace(FormatTok->TokenText); in getNextToken()
1164 if (LeadingWhitespace < FormatTok->TokenText.size()) in getNextToken()
1166 StringRef Text = FormatTok->TokenText; in getNextToken()
1232 FormatTok->is(tok::comment) && FormatTok->TokenText.starts_with("//")) { in getNextToken()
1233 size_t BackslashPos = FormatTok->TokenText.find('\\'); in getNextToken()
1235 if (BackslashPos + 1 < FormatTok->TokenText.size() && in getNextToken()
1236 FormatTok->TokenText[BackslashPos + 1] == '\n') { in getNextToken()
1240 BackslashPos = FormatTok->TokenText.find('\\', BackslashPos + 1); in getNextToken()
1254 auto Quote = FormatTok->TokenText.find('\''); in getNextToken()
1260 if (FormatTok->TokenText == "`") { in getNextToken()
1263 } else if (FormatTok->TokenText == "``") { in getNextToken()
1268 NumberBase.match(FormatTok->TokenText, &Matches)) { in getNextToken()
1287 StringRef UntrimmedText = FormatTok->TokenText; in getNextToken()
1288 FormatTok->TokenText = FormatTok->TokenText.rtrim(" \t\v\f"); in getNextToken()
1289 TrailingWhitespace = UntrimmedText.size() - FormatTok->TokenText.size(); in getNextToken()
1291 IdentifierInfo &Info = IdentTable.get(FormatTok->TokenText); in getNextToken()
1310 FormatTok->TokenText = FormatTok->TokenText.substr(0, 1); in getNextToken()
1315 FormatTok->TokenText = FormatTok->TokenText.substr(0, 1); in getNextToken()
1329 StringRef Text = FormatTok->TokenText; in getNextToken()
1425 Tok.TokenText = StringRef(SourceMgr.getCharacterData(Tok.Tok.getLocation()), in readRawToken()
1430 if (Tok.TokenText.starts_with("\"")) { in readRawToken()
1433 } else if (Style.isJavaScript() && Tok.TokenText == "''") { in readRawToken()
1441 if (Tok.is(tok::comment) && isClangFormatOn(Tok.TokenText)) in readRawToken()
1446 if (Tok.is(tok::comment) && isClangFormatOff(Tok.TokenText)) in readRawToken()