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) 392Lexer.InterpolatedStringKind kind, 450private SyntaxToken MakeInterpolatedStringTextToken(Lexer.InterpolatedStringKind kind, string text) 454if (kind is Lexer.InterpolatedStringKind.SingleLineRaw or Lexer.InterpolatedStringKind.MultiLineRaw) 457Debug.Assert(kind is Lexer.InterpolatedStringKind.Normal or Lexer.InterpolatedStringKind.Verbatim); 461var prefix = kind is Lexer.InterpolatedStringKind.Verbatim ? "@\"" : "\"";
Parser\Lexer_StringLiteral.cs (56)
277out InterpolatedStringKind kind, 347private bool IsAtEnd(InterpolatedStringKind kind) 349return IsAtEnd(allowNewline: kind is InterpolatedStringKind.Verbatim or InterpolatedStringKind.MultiLineRaw); 367out InterpolatedStringKind kind, 402out InterpolatedStringKind kind, 417kind = InterpolatedStringKind.Verbatim; 430kind = InterpolatedStringKind.Normal; 459? InterpolatedStringKind.Verbatim 460: InterpolatedStringKind.SingleLineRaw; 486kind = InterpolatedStringKind.MultiLineRaw; 493kind = InterpolatedStringKind.SingleLineRaw; 499private void ScanInterpolatedStringLiteralEnd(InterpolatedStringKind kind, int startingQuoteCount, out Range closeQuoteRange) 505if (kind is InterpolatedStringKind.Normal or InterpolatedStringKind.Verbatim) 511Debug.Assert(kind is InterpolatedStringKind.SingleLineRaw or InterpolatedStringKind.MultiLineRaw); 520private void ScanNormalOrVerbatimInterpolatedStringLiteralEnd(InterpolatedStringKind kind) 522Debug.Assert(kind is InterpolatedStringKind.Normal or InterpolatedStringKind.Verbatim); 541private void ScanRawInterpolatedStringLiteralEnd(InterpolatedStringKind kind, int startingQuoteCount) 543Debug.Assert(kind is InterpolatedStringKind.SingleLineRaw or InterpolatedStringKind.MultiLineRaw); 545if (kind is InterpolatedStringKind.SingleLineRaw) 628InterpolatedStringKind kind, int startingDollarSignCount, int startingQuoteCount, ArrayBuilder<Interpolation>? interpolations) 669if (kind == InterpolatedStringKind.Normal) 693private bool CheckForIllegalEmptyMultiLineRawStringLiteral(InterpolatedStringKind kind, int startingQuoteCount) 695if (kind == InterpolatedStringKind.MultiLineRaw) 715private bool IsAtEndOfMultiLineRawLiteral(InterpolatedStringKind kind, int startingQuoteCount) 717if (kind == InterpolatedStringKind.MultiLineRaw) 743private bool IsEndDelimiterOtherwiseConsume(InterpolatedStringKind kind, int startingQuoteCount) 745if (kind is InterpolatedStringKind.Normal or InterpolatedStringKind.Verbatim) 756if (kind == InterpolatedStringKind.Normal) 762Debug.Assert(kind == InterpolatedStringKind.Verbatim); 774Debug.Assert(kind is InterpolatedStringKind.SingleLineRaw or InterpolatedStringKind.MultiLineRaw); 792private void HandleCloseBraceInContent(InterpolatedStringKind kind, int startingDollarSignCount) 794if (kind is InterpolatedStringKind.Normal or InterpolatedStringKind.Verbatim) 811Debug.Assert(kind is InterpolatedStringKind.MultiLineRaw or InterpolatedStringKind.SingleLineRaw); 829private void HandleOpenBraceInContent(InterpolatedStringKind kind, int startingDollarSignCount, ArrayBuilder<Interpolation>? interpolations) 831if (kind is InterpolatedStringKind.Normal or InterpolatedStringKind.Verbatim) 841private void HandleOpenBraceInNormalOrVerbatimContent(InterpolatedStringKind kind, ArrayBuilder<Interpolation>? interpolations) 843Debug.Assert(kind is InterpolatedStringKind.Normal or InterpolatedStringKind.Verbatim); 870private void HandleOpenBraceInRawContent(InterpolatedStringKind kind, int startingDollarSignCount, ArrayBuilder<Interpolation>? interpolations) 872Debug.Assert(kind is InterpolatedStringKind.SingleLineRaw or InterpolatedStringKind.MultiLineRaw); 933private void ScanFormatSpecifier(InterpolatedStringKind kind) 951if (ch == '\\' && kind is InterpolatedStringKind.Normal) 963if (kind is InterpolatedStringKind.Verbatim && _lexer.TextWindow.PeekChar(1) == '"') 996private void ScanInterpolatedStringLiteralHoleBalancedText(InterpolatedStringKind kind, char endingChar, bool isHole, out Range colonRange) 1122private void ScanInterpolatedStringLiteralHoleBracketed(InterpolatedStringKind kind, char start, char end)