75 references to InterpolatedStringKind
Microsoft.CodeAnalysis.CSharp (75)
Parser\LanguageParser_InterpolatedString.cs (19)
51rescanInterpolation(out var kind, out var error, out var openQuoteRange, interpolations, out var closeQuoteRange); 55var needsDedentation = kind == Lexer.InterpolatedStringKind.MultiLineRaw && error == null; 71void rescanInterpolation(out Lexer.InterpolatedStringKind kind, out SyntaxDiagnosticInfo? error, out Range openQuoteRange, ArrayBuilder<Lexer.Interpolation> interpolations, out Range closeQuoteRange) 84Lexer.InterpolatedStringKind.Normal => SyntaxKind.InterpolatedStringStartToken, 85Lexer.InterpolatedStringKind.Verbatim => SyntaxKind.InterpolatedVerbatimStringStartToken, 86Lexer.InterpolatedStringKind.SingleLineRaw => SyntaxKind.InterpolatedSingleLineRawStringStartToken, 87Lexer.InterpolatedStringKind.MultiLineRaw => SyntaxKind.InterpolatedMultiLineRawStringStartToken, 245Lexer.InterpolatedStringKind.Normal => SyntaxKind.InterpolatedStringEndToken, 246Lexer.InterpolatedStringKind.Verbatim => SyntaxKind.InterpolatedStringEndToken, 247Lexer.InterpolatedStringKind.SingleLineRaw => SyntaxKind.InterpolatedRawStringEndToken, 248Lexer.InterpolatedStringKind.MultiLineRaw => SyntaxKind.InterpolatedRawStringEndToken, 364Lexer.InterpolatedStringKind kind, 394Lexer.InterpolatedStringKind kind, 452private SyntaxToken MakeInterpolatedStringTextToken(Lexer.InterpolatedStringKind kind, string text) 456if (kind is Lexer.InterpolatedStringKind.SingleLineRaw or Lexer.InterpolatedStringKind.MultiLineRaw) 459Debug.Assert(kind is Lexer.InterpolatedStringKind.Normal or Lexer.InterpolatedStringKind.Verbatim); 463var prefix = kind is Lexer.InterpolatedStringKind.Verbatim ? "@\"" : "\"";
Parser\Lexer_StringLiteral.cs (56)
284out InterpolatedStringKind kind, 354private bool IsAtEnd(InterpolatedStringKind kind) 356return IsAtEnd(allowNewline: kind is InterpolatedStringKind.Verbatim or InterpolatedStringKind.MultiLineRaw); 374out InterpolatedStringKind kind, 409out InterpolatedStringKind kind, 424kind = InterpolatedStringKind.Verbatim; 437kind = InterpolatedStringKind.Normal; 466? InterpolatedStringKind.Verbatim 467: InterpolatedStringKind.SingleLineRaw; 493kind = InterpolatedStringKind.MultiLineRaw; 500kind = InterpolatedStringKind.SingleLineRaw; 506private void ScanInterpolatedStringLiteralEnd(InterpolatedStringKind kind, int startingQuoteCount, out Range closeQuoteRange) 512if (kind is InterpolatedStringKind.Normal or InterpolatedStringKind.Verbatim) 518Debug.Assert(kind is InterpolatedStringKind.SingleLineRaw or InterpolatedStringKind.MultiLineRaw); 527private void ScanNormalOrVerbatimInterpolatedStringLiteralEnd(InterpolatedStringKind kind) 529Debug.Assert(kind is InterpolatedStringKind.Normal or InterpolatedStringKind.Verbatim); 548private void ScanRawInterpolatedStringLiteralEnd(InterpolatedStringKind kind, int startingQuoteCount) 550Debug.Assert(kind is InterpolatedStringKind.SingleLineRaw or InterpolatedStringKind.MultiLineRaw); 552if (kind is InterpolatedStringKind.SingleLineRaw) 635InterpolatedStringKind kind, int startingDollarSignCount, int startingQuoteCount, ArrayBuilder<Interpolation>? interpolations) 676if (kind == InterpolatedStringKind.Normal) 700private bool CheckForIllegalEmptyMultiLineRawStringLiteral(InterpolatedStringKind kind, int startingQuoteCount) 702if (kind == InterpolatedStringKind.MultiLineRaw) 722private bool IsAtEndOfMultiLineRawLiteral(InterpolatedStringKind kind, int startingQuoteCount) 724if (kind == InterpolatedStringKind.MultiLineRaw) 750private bool IsEndDelimiterOtherwiseConsume(InterpolatedStringKind kind, int startingQuoteCount) 752if (kind is InterpolatedStringKind.Normal or InterpolatedStringKind.Verbatim) 763if (kind == InterpolatedStringKind.Normal) 769Debug.Assert(kind == InterpolatedStringKind.Verbatim); 781Debug.Assert(kind is InterpolatedStringKind.SingleLineRaw or InterpolatedStringKind.MultiLineRaw); 799private void HandleCloseBraceInContent(InterpolatedStringKind kind, int startingDollarSignCount) 801if (kind is InterpolatedStringKind.Normal or InterpolatedStringKind.Verbatim) 818Debug.Assert(kind is InterpolatedStringKind.MultiLineRaw or InterpolatedStringKind.SingleLineRaw); 836private void HandleOpenBraceInContent(InterpolatedStringKind kind, int startingDollarSignCount, ArrayBuilder<Interpolation>? interpolations) 838if (kind is InterpolatedStringKind.Normal or InterpolatedStringKind.Verbatim) 848private void HandleOpenBraceInNormalOrVerbatimContent(InterpolatedStringKind kind, ArrayBuilder<Interpolation>? interpolations) 850Debug.Assert(kind is InterpolatedStringKind.Normal or InterpolatedStringKind.Verbatim); 877private void HandleOpenBraceInRawContent(InterpolatedStringKind kind, int startingDollarSignCount, ArrayBuilder<Interpolation>? interpolations) 879Debug.Assert(kind is InterpolatedStringKind.SingleLineRaw or InterpolatedStringKind.MultiLineRaw); 940private void ScanFormatSpecifier(InterpolatedStringKind kind) 958if (ch == '\\' && kind is InterpolatedStringKind.Normal) 970if (kind is InterpolatedStringKind.Verbatim && _lexer.TextWindow.PeekChar(1) == '"') 1003private void ScanInterpolatedStringLiteralHoleBalancedText(InterpolatedStringKind kind, char endingChar, bool isHole, out Range colonRange) 1137private void ScanInterpolatedStringLiteralHoleBracketed(InterpolatedStringKind kind, char start, char end)