222 references to StringLiteralToken
Microsoft.AspNetCore.App.Analyzers (7)
Infrastructure\VirtualChars\AbstractVirtualCharService.cs (3)
70if (token.RawKind == (int)SyntaxKind.StringLiteralToken || 83if (token.RawKind == (int)SyntaxKind.StringLiteralToken || 111if (token.RawKind == (int)SyntaxKind.StringLiteralToken ||
Infrastructure\VirtualChars\CSharpVirtualCharService.cs (1)
65case SyntaxKind.StringLiteralToken:
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
549Debug.Assert(token.IsKind(SyntaxKind.StringLiteralToken));
RouteEmbeddedLanguage\Infrastructure\RouteStringSyntaxDetector.cs (1)
48return rawKind == (int)SyntaxKind.StringLiteralToken ||
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (1)
401Debug.Assert(token.IsKind(SyntaxKind.StringLiteralToken));
Microsoft.AspNetCore.App.Analyzers.Test (2)
Infrastructure\AmbiguousRoutePatternComparerTests.cs (1)
83Assert.True(token.IsKind(SyntaxKind.StringLiteralToken));
RouteEmbeddedLanguage\RoutePatternParserTests.cs (1)
37Assert.True(token.IsKind(SyntaxKind.StringLiteralToken));
Microsoft.CodeAnalysis.CSharp (25)
CSharpExtensions.cs (1)
239return token.Kind() is (SyntaxKind.StringLiteralToken or SyntaxKind.Utf8StringLiteralToken) && token.Text.Length > 0 && token.Text[0] == '@';
Parser\DirectiveParser.cs (7)
395if (this.CurrentToken.Kind == SyntaxKind.StringLiteralToken && 439var file = EatToken(SyntaxKind.StringLiteralToken, ErrorCode.ERR_MissingPPFile, reportError: reportError); 510SyntaxToken file = this.EatToken(SyntaxKind.StringLiteralToken, ErrorCode.ERR_ExpectedPPFile, reportError: isActive); 530SyntaxToken file = this.EatToken(SyntaxKind.StringLiteralToken, ErrorCode.ERR_ExpectedPPFile, reportError: isActive); 640var file = this.EatToken(SyntaxKind.StringLiteralToken, ErrorCode.WRN_IllegalPPChecksum, reportError: isActive); 641var guid = this.EatToken(SyntaxKind.StringLiteralToken, ErrorCode.WRN_IllegalPPChecksum, reportError: isActive && !file.IsMissing); 651var bytes = this.EatToken(SyntaxKind.StringLiteralToken, ErrorCode.WRN_IllegalPPChecksum, reportError: isActive && !guid.IsMissing);
Parser\LanguageParser.cs (3)
10570case SyntaxKind.StringLiteralToken: 10868case SyntaxKind.StringLiteralToken: 11480case SyntaxKind.StringLiteralToken:
Parser\LanguageParser_InterpolatedString.cs (1)
468Debug.Assert(token.Kind == SyntaxKind.StringLiteralToken);
Parser\Lexer.cs (1)
390case SyntaxKind.StringLiteralToken:
Parser\Lexer_StringLiteral.cs (3)
28info.Kind = SyntaxKind.StringLiteralToken; 102info.Kind = SyntaxKind.StringLiteralToken; 247info.Kind = SyntaxKind.StringLiteralToken;
Syntax\CSharpLineDirectiveMap.cs (2)
77if (directive.File.Kind() == SyntaxKind.StringLiteralToken) 130if (token.Kind() == SyntaxKind.StringLiteralToken)
Syntax\InternalSyntax\SyntaxFactory.cs (1)
209return SyntaxToken.WithValue(SyntaxKind.StringLiteralToken, leading, text, value, trailing);
Syntax\InternalSyntax\SyntaxToken.cs (2)
243return new SyntaxTokenWithValue<string>(SyntaxKind.StringLiteralToken, text, text); 248return new SyntaxTokenWithValueAndTrivia<string>(SyntaxKind.StringLiteralToken, text, text, leading, trailing);
Syntax\LiteralExpressionSyntax.cs (1)
21SyntaxKind.StringLiteralExpression => SyntaxKind.StringLiteralToken,
Syntax\SyntaxEquivalence.cs (1)
88case SyntaxKind.StringLiteralToken:
Syntax\SyntaxKindFacts.cs (2)
211case SyntaxKind.StringLiteralToken: 573SyntaxKind.StringLiteralToken => SyntaxKind.StringLiteralExpression,
Microsoft.CodeAnalysis.CSharp.CodeStyle (9)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
67case SyntaxKind.StringLiteralToken:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (1)
60if (token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.InterpolatedStringTextToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (2)
132case SyntaxKind.StringLiteralToken: 196=> token.Kind() == SyntaxKind.StringLiteralToken && !token.IsVerbatimStringLiteral();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (2)
322SyntaxKind.StringLiteralToken or 400SyntaxKind.StringLiteralToken or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
481case SyntaxKind.StringLiteralToken: 504=> token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.InterpolatedStringTextToken;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
58public int StringLiteralToken => (int)SyntaxKind.StringLiteralToken;
Microsoft.CodeAnalysis.CSharp.EditorFeatures (6)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (1)
227if (previousToken.Kind() == SyntaxKind.StringLiteralToken && previousToken.ToString().Last() != '"')
RawStringLiteral\RawStringLiteralCommandHandler_TypeChar.cs (1)
118if (token.Kind() is not (SyntaxKind.StringLiteralToken or SyntaxKind.InterpolatedStringStartToken or SyntaxKind.InterpolatedSingleLineRawStringStartToken))
StringCopyPaste\StringCopyPasteHelpers.cs (1)
266Token.RawKind: (int)SyntaxKind.StringLiteralToken or
TextStructureNavigation\CSharpTextStructureNavigatorProvider.cs (3)
34case SyntaxKind.StringLiteralToken: 87SyntaxKind.StringLiteralToken => position == token.Span.End - 1 && token.Text[^1] == '"', 94if (token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.Utf8StringLiteralToken &&
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (1)
2016await AutoFormatOnMarkerAsync(code, expected, SyntaxKind.StringLiteralToken, SyntaxKind.None);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (2)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (1)
37Assert.True(token.Kind() == SyntaxKind.StringLiteralToken);
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
35Assert.True(token.Kind() == SyntaxKind.StringLiteralToken);
Microsoft.CodeAnalysis.CSharp.Features (10)
BraceCompletion\StringLiteralBraceCompletionService.cs (3)
50protected override bool IsValidOpeningBraceToken(SyntaxToken token) => token.IsKind(SyntaxKind.StringLiteralToken); 52protected override bool IsValidClosingBraceToken(SyntaxToken token) => token.IsKind(SyntaxKind.StringLiteralToken); 72if (token.IsKind(SyntaxKind.StringLiteralToken) &&
BraceMatching\StringLiteralBraceMatcher.cs (1)
33if (token.IsKind(SyntaxKind.StringLiteralToken))
Completion\CompletionProviders\Scripting\DirectiveCompletionProviderUtilities.cs (1)
22if (token.Kind() == SyntaxKind.StringLiteralToken && token.Parent!.Kind() == directiveKind)
ConvertBetweenRegularAndVerbatimString\ConvertBetweenRegularAndVerbatimStringCodeRefactoringProvider.cs (1)
60SyntaxKind.StringLiteralToken,
ConvertToRawString\ConvertRegularStringToRawStringCodeRefactoringProvider.cs (1)
48if (token.Kind() != SyntaxKind.StringLiteralToken)
EmbeddedLanguages\CSharpTestEmbeddedLanguageClassifier.cs (1)
42if (token.Kind() is not (SyntaxKind.StringLiteralToken or SyntaxKind.SingleLineRawStringLiteralToken or SyntaxKind.MultiLineRawStringLiteralToken))
EmbeddedLanguages\EmbeddedLanguageUtilities.cs (1)
32return token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.Utf8StringLiteralToken && !token.IsVerbatimStringLiteral()
SplitStringLiteral\StringSplitter.cs (1)
42if (token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.Utf8StringLiteralToken)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
2758var expr = tree.FindNodeOrTokenByKind(SyntaxKind.StringLiteralToken).Parent.FirstAncestorOrSelf<ExpressionStatementSyntax>().Expression;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (148)
Generated\Syntax.Test.xml.Generated.cs (12)
3782Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind); 3813Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind); 3814Assert.Equal(SyntaxKind.StringLiteralToken, node.Guid.Kind); 3815Assert.Equal(SyntaxKind.StringLiteralToken, node.Bytes.Kind); 3829Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind); 3843Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind); 13998Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind()); 14029Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind()); 14030Assert.Equal(SyntaxKind.StringLiteralToken, node.Guid.Kind()); 14031Assert.Equal(SyntaxKind.StringLiteralToken, node.Bytes.Kind()); 14045Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind()); 14059Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind());
LexicalAndXml\LexicalTests.cs (14)
979Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 994Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1009Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1024Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1039Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1055Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1071Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1088Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1104Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1120Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1136Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1155Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1174Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1192Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind());
Parsing\AwaitParsingTests.cs (1)
2226N(SyntaxKind.StringLiteralToken);
Parsing\CollectionExpressionParsingTests.cs (26)
1024N(SyntaxKind.StringLiteralToken, "\"A\""); 1032N(SyntaxKind.StringLiteralToken, "\"B\""); 17207N(SyntaxKind.StringLiteralToken, "\"B\""); 17215N(SyntaxKind.StringLiteralToken, "\"C\""); 17235N(SyntaxKind.StringLiteralToken, "\"Goo"); 17284N(SyntaxKind.StringLiteralToken, "\"B\""); 17292N(SyntaxKind.StringLiteralToken, "\"C\""); 17312N(SyntaxKind.StringLiteralToken, "\"Goo"); 17440N(SyntaxKind.StringLiteralToken, "\"B\""); 17448N(SyntaxKind.StringLiteralToken, "\"C\""); 17468N(SyntaxKind.StringLiteralToken, "\"X\""); 17476N(SyntaxKind.StringLiteralToken, "\"Goo"); 17525N(SyntaxKind.StringLiteralToken, "\"B\""); 17533N(SyntaxKind.StringLiteralToken, "\"C\""); 17553N(SyntaxKind.StringLiteralToken, "\"X\""); 17561N(SyntaxKind.StringLiteralToken, "\"Goo"); 17689N(SyntaxKind.StringLiteralToken, "\"B\""); 17697N(SyntaxKind.StringLiteralToken, "\"C\""); 17771N(SyntaxKind.StringLiteralToken, "\"B\""); 17779N(SyntaxKind.StringLiteralToken, "\"C\""); 17932N(SyntaxKind.StringLiteralToken, "\"B\""); 17940N(SyntaxKind.StringLiteralToken, "\"C\""); 17960N(SyntaxKind.StringLiteralToken, "\"X\""); 18022N(SyntaxKind.StringLiteralToken, "\"B\""); 18030N(SyntaxKind.StringLiteralToken, "\"C\""); 18050N(SyntaxKind.StringLiteralToken, "\"X\"");
Parsing\ExpressionParsingTests.cs (2)
516Assert.Equal(SyntaxKind.StringLiteralToken, us.Token.Kind()); 531Assert.Equal(SyntaxKind.StringLiteralToken, us.Token.Kind());
Parsing\LineSpanDirectiveParsingTests.cs (63)
72N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 113N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 155N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 190N(SyntaxKind.StringLiteralToken, "\"\""); 225N(SyntaxKind.StringLiteralToken, "\" \""); 265N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 299N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 344N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 379N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 416M(SyntaxKind.StringLiteralToken); 453M(SyntaxKind.StringLiteralToken); 490M(SyntaxKind.StringLiteralToken); 527M(SyntaxKind.StringLiteralToken); 564M(SyntaxKind.StringLiteralToken); 601M(SyntaxKind.StringLiteralToken); 638M(SyntaxKind.StringLiteralToken); 675M(SyntaxKind.StringLiteralToken); 712M(SyntaxKind.StringLiteralToken); 749M(SyntaxKind.StringLiteralToken); 786M(SyntaxKind.StringLiteralToken); 824M(SyntaxKind.StringLiteralToken); 887N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 924N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 961N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 998N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 1035N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 1072N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 1109N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 1146N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 1183N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 1220N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 1257M(SyntaxKind.StringLiteralToken); 1294N(SyntaxKind.StringLiteralToken, "\"2\""); 1331M(SyntaxKind.StringLiteralToken); 1368M(SyntaxKind.StringLiteralToken); 1405M(SyntaxKind.StringLiteralToken); 1442M(SyntaxKind.StringLiteralToken); 1479M(SyntaxKind.StringLiteralToken); 1516M(SyntaxKind.StringLiteralToken); 1553M(SyntaxKind.StringLiteralToken); 1590M(SyntaxKind.StringLiteralToken); 1627M(SyntaxKind.StringLiteralToken); 1677N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 1712N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 1762N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 1796N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 1833N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 1870N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 1904N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 1926N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 1969N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 2015N(SyntaxKind.StringLiteralToken, "\"\"\"file.cs\"\"\""); 2061N(SyntaxKind.StringLiteralToken, "\"\"\"file.cs\"\"\""); 2109N(SyntaxKind.StringLiteralToken, "\"\"\"" + @" 2161N(SyntaxKind.StringLiteralToken, "\"\"\"" + @" 2224N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 2262M(SyntaxKind.StringLiteralToken); 2303N(SyntaxKind.StringLiteralToken, "\"\"\"file.cs\"\"\""); 2341M(SyntaxKind.StringLiteralToken); 2379N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 2418N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 2457N(SyntaxKind.StringLiteralToken, "\"file.cs\""); 2495N(SyntaxKind.StringLiteralToken, "\"file.cs\"");
Parsing\MemberDeclarationParsingTests.cs (1)
12521N(SyntaxKind.StringLiteralToken, "\"no good\"");
Parsing\ParsingTests.cs (1)
302case SyntaxKind.StringLiteralToken:
Parsing\PatternParsingTests_ListPatterns.cs (1)
1331N(SyntaxKind.StringLiteralToken, "\")\"");
Parsing\RecordParsing.cs (2)
1912N(SyntaxKind.StringLiteralToken); 1984N(SyntaxKind.StringLiteralToken);
Parsing\StatementParsingTests.cs (3)
4387N(SyntaxKind.StringLiteralToken, "\"answer\""); 4551N(SyntaxKind.StringLiteralToken, "\"answer\""); 4742N(SyntaxKind.StringLiteralToken, "\"answer\"");
Parsing\UsingDirectiveParsingTests.cs (2)
3696N(SyntaxKind.StringLiteralToken, "\"\""); 3858N(SyntaxKind.StringLiteralToken, "\"\"");
Parsing\Utf8StringLiteralsParsingTests.cs (14)
26N(SyntaxKind.StringLiteralToken, "\"hello\""); 38N(SyntaxKind.StringLiteralToken, "@\"hello\""); 78N(SyntaxKind.StringLiteralToken, "@\"\"\"hello\"\"\""); 92N(SyntaxKind.StringLiteralToken, "@\"\"\"" + @" 255N(SyntaxKind.StringLiteralToken, "@\"hello\""); 271N(SyntaxKind.StringLiteralToken, "@\"hello\""); 287N(SyntaxKind.StringLiteralToken, "@\"hello\""); 353N(SyntaxKind.StringLiteralToken, "\"hello\""); 369N(SyntaxKind.StringLiteralToken, "\"hello\""); 385N(SyntaxKind.StringLiteralToken, "\"hello\""); 419N(SyntaxKind.StringLiteralToken, "@\"hello\""); 435N(SyntaxKind.StringLiteralToken, "@\"hello\""); 469N(SyntaxKind.StringLiteralToken, "\"hello\""); 485N(SyntaxKind.StringLiteralToken, "\"hello\"");
Parsing\ValueTupleTests.cs (1)
92N(SyntaxKind.StringLiteralToken);
Syntax\SyntaxTests.cs (3)
205[InlineData(SyntaxKind.StringLiteralToken)] 219[InlineData(SyntaxKind.StringLiteralToken)] 233[InlineData(SyntaxKind.StringLiteralToken, SyntaxKind.StringLiteralExpression)]
Syntax\SyntaxTokenListTests.cs (2)
252Assert.Equal(1, list.IndexOf(SyntaxKind.StringLiteralToken)); 253Assert.True(list.Any(SyntaxKind.StringLiteralToken));
Microsoft.CodeAnalysis.CSharp.Workspaces (11)
Classification\ClassificationHelpers.cs (1)
144is SyntaxKind.StringLiteralToken
Rename\CSharpRenameRewriterLanguageService.cs (1)
695if (newToken.IsKind(SyntaxKind.StringLiteralToken))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
67case SyntaxKind.StringLiteralToken:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (1)
60if (token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.InterpolatedStringTextToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (2)
132case SyntaxKind.StringLiteralToken: 196=> token.Kind() == SyntaxKind.StringLiteralToken && !token.IsVerbatimStringLiteral();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (2)
322SyntaxKind.StringLiteralToken or 400SyntaxKind.StringLiteralToken or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
481case SyntaxKind.StringLiteralToken: 504=> token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.InterpolatedStringTextToken;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
58public int StringLiteralToken => (int)SyntaxKind.StringLiteralToken;