187 references to 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)
392if (this.CurrentToken.Kind == SyntaxKind.StringLiteralToken && 436var file = EatToken(SyntaxKind.StringLiteralToken, ErrorCode.ERR_MissingPPFile, reportError: reportError); 507SyntaxToken file = this.EatToken(SyntaxKind.StringLiteralToken, ErrorCode.ERR_ExpectedPPFile, reportError: isActive); 527SyntaxToken file = this.EatToken(SyntaxKind.StringLiteralToken, ErrorCode.ERR_ExpectedPPFile, reportError: isActive); 637var file = this.EatToken(SyntaxKind.StringLiteralToken, ErrorCode.WRN_IllegalPPChecksum, reportError: isActive); 638var guid = this.EatToken(SyntaxKind.StringLiteralToken, ErrorCode.WRN_IllegalPPChecksum, reportError: isActive && !file.IsMissing); 648var bytes = this.EatToken(SyntaxKind.StringLiteralToken, ErrorCode.WRN_IllegalPPChecksum, reportError: isActive && !guid.IsMissing);
Parser\LanguageParser.cs (3)
9954case SyntaxKind.StringLiteralToken: 10250case SyntaxKind.StringLiteralToken: 10712case SyntaxKind.StringLiteralToken:
Parser\LanguageParser_InterpolatedString.cs (1)
466Debug.Assert(token.Kind == SyntaxKind.StringLiteralToken);
Parser\Lexer.cs (1)
388case SyntaxKind.StringLiteralToken:
Parser\Lexer_StringLiteral.cs (3)
28info.Kind = SyntaxKind.StringLiteralToken; 102info.Kind = SyntaxKind.StringLiteralToken; 240info.Kind = SyntaxKind.StringLiteralToken;
Syntax\CSharpLineDirectiveMap.cs (2)
77if (directive.File.Kind() == SyntaxKind.StringLiteralToken) 124if (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)
84case SyntaxKind.StringLiteralToken:
Syntax\SyntaxKindFacts.cs (2)
183case SyntaxKind.StringLiteralToken: 545SyntaxKind.StringLiteralToken => SyntaxKind.StringLiteralExpression,
Microsoft.CodeAnalysis.CSharp.CodeStyle (9)
CSharpSyntaxFacts.cs (2)
485case SyntaxKind.StringLiteralToken: 508=> token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.InterpolatedStringTextToken;
CSharpSyntaxKinds.cs (1)
51public int StringLiteralToken => (int)SyntaxKind.StringLiteralToken;
CSharpVirtualCharService.cs (1)
65case SyntaxKind.StringLiteralToken:
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (2)
364SyntaxKind.StringLiteralToken or 428SyntaxKind.StringLiteralToken or
SyntaxNodeExtensions.SingleLineRewriter.cs (1)
60if (token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.InterpolatedStringTextToken)
SyntaxTokenExtensions.cs (2)
84case SyntaxKind.StringLiteralToken: 148=> token.Kind() == SyntaxKind.StringLiteralToken && !token.IsVerbatimStringLiteral();
Microsoft.CodeAnalysis.CSharp.EditorFeatures (6)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (1)
233if (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)
269Token.RawKind: (int)SyntaxKind.StringLiteralToken or
TextStructureNavigation\CSharpTextStructureNavigatorProvider.cs (3)
39case SyntaxKind.StringLiteralToken: 92SyntaxKind.StringLiteralToken => position == token.Span.End - 1 && token.Text[^1] == '"', 99if (token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.Utf8StringLiteralToken &&
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (1)
2020await 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)
36Assert.True(token.Kind() == SyntaxKind.StringLiteralToken);
Microsoft.CodeAnalysis.CSharp.Features (13)
BraceCompletion\InterpolatedStringBraceCompletionService.cs (1)
79not SyntaxKind.StringLiteralToken and
BraceCompletion\StringLiteralBraceCompletionService.cs (3)
45protected override bool IsValidOpeningBraceToken(SyntaxToken token) => token.IsKind(SyntaxKind.StringLiteralToken); 47protected override bool IsValidClosingBraceToken(SyntaxToken token) => token.IsKind(SyntaxKind.StringLiteralToken); 67if (token.IsKind(SyntaxKind.StringLiteralToken) &&
BraceMatching\StringLiteralBraceMatcher.cs (1)
35if (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 (4)
67if (token.Kind() != SyntaxKind.StringLiteralToken) 115Debug.Assert(token.Kind() == SyntaxKind.StringLiteralToken); 199Contract.ThrowIfFalse(token.Kind() == SyntaxKind.StringLiteralToken); 224foreach (var stringLiteral in node.DescendantTokens().Where(token => token.Kind() == SyntaxKind.StringLiteralToken))
EmbeddedLanguages\EmbeddedLanguageUtilities.cs (1)
32return token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.Utf8StringLiteralToken && !token.IsVerbatimStringLiteral()
SplitStringLiteral\StringSplitter.cs (1)
52if (token.IsKind(SyntaxKind.StringLiteralToken) ||
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 (118)
Generated\Syntax.Test.xml.Generated.cs (12)
3698Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind); 3729Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind); 3730Assert.Equal(SyntaxKind.StringLiteralToken, node.Guid.Kind); 3731Assert.Equal(SyntaxKind.StringLiteralToken, node.Bytes.Kind); 3745Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind); 3759Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind); 13674Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind()); 13705Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind()); 13706Assert.Equal(SyntaxKind.StringLiteralToken, node.Guid.Kind()); 13707Assert.Equal(SyntaxKind.StringLiteralToken, node.Bytes.Kind()); 13721Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind()); 13735Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind());
LexicalAndXml\LexicalTests.cs (11)
652Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 667Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 682Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 697Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 712Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 728Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 744Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 761Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 777Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 793Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 809Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind());
Parsing\AwaitParsingTests.cs (1)
1533N(SyntaxKind.StringLiteralToken);
Parsing\ExpressionParsingTests.cs (2)
516Assert.Equal(SyntaxKind.StringLiteralToken, us.Token.Kind()); 531Assert.Equal(SyntaxKind.StringLiteralToken, us.Token.Kind());
Parsing\LambdaParameterParsingTests.cs (1)
826N(SyntaxKind.StringLiteralToken);
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\ParsingTests.cs (1)
298case SyntaxKind.StringLiteralToken:
Parsing\RecordParsing.cs (2)
1912N(SyntaxKind.StringLiteralToken); 1984N(SyntaxKind.StringLiteralToken);
Parsing\StatementParsingTests.cs (3)
4359N(SyntaxKind.StringLiteralToken, "\"answer\""); 4523N(SyntaxKind.StringLiteralToken, "\"answer\""); 4714N(SyntaxKind.StringLiteralToken, "\"answer\"");
Parsing\UsingDirectiveParsingTests.cs (2)
3746N(SyntaxKind.StringLiteralToken, "\"\""); 3908N(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)
201[InlineData(SyntaxKind.StringLiteralToken)] 215[InlineData(SyntaxKind.StringLiteralToken)] 229[InlineData(SyntaxKind.StringLiteralToken, SyntaxKind.StringLiteralExpression)]
Syntax\SyntaxTokenListTests.cs (2)
249Assert.Equal(1, list.IndexOf(SyntaxKind.StringLiteralToken)); 250Assert.True(list.Any(SyntaxKind.StringLiteralToken));
Microsoft.CodeAnalysis.CSharp.Workspaces (11)
Classification\ClassificationHelpers.cs (1)
143return token.IsKind(SyntaxKind.StringLiteralToken)
CSharpSyntaxFacts.cs (2)
485case SyntaxKind.StringLiteralToken: 508=> token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.InterpolatedStringTextToken;
CSharpSyntaxKinds.cs (1)
51public int StringLiteralToken => (int)SyntaxKind.StringLiteralToken;
CSharpVirtualCharService.cs (1)
65case SyntaxKind.StringLiteralToken:
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (2)
84case SyntaxKind.StringLiteralToken: 148=> token.Kind() == SyntaxKind.StringLiteralToken && !token.IsVerbatimStringLiteral();
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (2)
364SyntaxKind.StringLiteralToken or 428SyntaxKind.StringLiteralToken or
Rename\CSharpRenameRewriterLanguageService.cs (1)
698if (newToken.IsKind(SyntaxKind.StringLiteralToken))
SyntaxNodeExtensions.SingleLineRewriter.cs (1)
60if (token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.InterpolatedStringTextToken)
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (1)
Snippets\CSharpSnippets\SnippetCommandHandler.cs (1)
114return !(trivia.IsKind(SyntaxKind.MultiLineCommentTrivia) || trivia.IsKind(SyntaxKind.SingleLineCommentTrivia) || token.IsKind(SyntaxKind.StringLiteralToken));