69 references to
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (4)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (2)
374
Assert.Equal(allChars
[
position + i], virtualChars
[
i]);
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (2)
339
Assert.Equal(allChars
[
position + i], virtualChars
[
i]);
Microsoft.CodeAnalysis.CSharp.Features (15)
ConvertToRawString\ConvertRegularStringToRawStringCodeRefactoringProvider.cs (12)
176
while (index < characters.Length && IsCSharpWhitespace(characters
[
index]))
179
return index < characters.Length && IsCSharpNewLine(characters
[
index]);
185
while (index >= 0 && IsCSharpWhitespace(characters
[
index]))
188
return index >= 0 && IsCSharpNewLine(characters
[
index]);
348
var ch = characters
[
i];
457
while (current < length && IsCSharpWhitespace(leadingWhitespace1
[
current]) && leadingWhitespace1
[
current].Rune == leadingWhitespace2
[
current].Rune)
466
while (current < line.Length && IsCSharpWhitespace(line
[
current]))
485
while (end < characters.Length && !IsCSharpNewLine(characters
[
end]))
499
while (index < line.Length && IsCSharpWhitespace(line
[
index]))
502
return index == line.Length || IsCSharpNewLine(line
[
index]);
ConvertToRawString\ConvertToRawStringHelpers.cs (3)
43
characters
[
index].Rune is { Utf16SequenceLength: 1, Value: '\r' } &&
44
characters
[
index + 1].Rune is { Utf16SequenceLength: 1, Value: '\n' };
114
while (j < n && characters
[
j] == '"')
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
EmbeddedLanguages\StackFrame\StackFrameParserTests.Utilities.cs (1)
105
if (textSeq
[
index++] != ch)
Microsoft.CodeAnalysis.ExternalAccess.AspNetCore (2)
EmbeddedLanguages\AspNetCoreVirtualCharSequence.cs (2)
33
/// <inheritdoc cref="VirtualCharSequence.
this
"/>
34
public AspNetCoreVirtualChar this[int index] => new(_virtualCharSequence
[
index]);
Microsoft.CodeAnalysis.Features (43)
EmbeddedLanguages\Json\JsonLexer.cs (4)
32
public readonly VirtualChar CurrentChar => Text
[
Position];
318
=> TextSpan.FromBounds(Text
[
startInclusive].Span.Start, Text
[
endExclusive - 1].Span.End);
327
if (position + i >= Text.Length || Text
[
position + i] != val[i])
EmbeddedLanguages\Json\JsonParser.cs (1)
537
if (chars
[
i] != val[i])
EmbeddedLanguages\Json\JsonParser.StrictSyntaxChecker.cs (6)
232
if (chars
[
i] < ' ')
233
return new EmbeddedDiagnostic(FeaturesResources.Illegal_string_character, chars
[
i].Span);
239
if (chars
[
i] == '\\')
241
if (chars
[
i + 1] == '\'')
242
return new EmbeddedDiagnostic(FeaturesResources.Invalid_escape_sequence, TextSpan.FromBounds(chars
[
i].Span.Start, chars
[
i + 1].Span.End));
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexBraceMatcher.cs (1)
83
var lastChar = trivia.Value.VirtualChars
[
trivia.Value.VirtualChars.Length - 1];
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexEmbeddedCompletionProvider.cs (2)
256
if (index >= 2 && tree.Text
[
index - 2] == '\\')
258
var escapeChar = tree.Text
[
index - 1];
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (12)
49
public readonly VirtualChar CurrentChar => Position < Text.Length ? Text
[
Position] : default;
139
if (Text
[
Position] == '#')
145
Text
[
Position] != '\n')
158
Text
[
Position] != ')')
179
=> TextSpan.FromBounds(Text
[
startInclusive].Span.Start, Text
[
endExclusive - 1].Span.End);
189
Text
[
position + i] != val[i])
203
while (Position < Text.Length && IsBlank(Text
[
Position]))
380
Debug.Assert(Text
[
beforeSlash] == '\\');
381
Debug.Assert(Text
[
beforeSlash + 1].Value is 'x' or 'u');
423
Debug.Assert(Text
[
beforeSlash] == '\\');
424
Debug.Assert(IsOctalDigit(Text
[
start]));
EmbeddedLanguages\RegularExpressions\RegexParser.cs (10)
1599
Debug.Assert(_lexer.Text
[
_lexer.Position - 1] == '\\');
1645
Debug.Assert(_lexer.Text
[
_lexer.Position - 1] == '\\');
1683
Debug.Assert(_lexer.Text
[
_lexer.Position - 1] == '\\');
1698
Debug.Assert(_lexer.Text
[
_lexer.Position - 1] == '\\');
1704
_lexer.Text
[
_lexer.Position] is var ch &&
1737
Debug.Assert(_lexer.Text
[
_lexer.Position - 1] == '\\');
1759
Debug.Assert(_lexer.Text
[
_lexer.Position - 1] == '\\');
1760
Debug.Assert(_lexer.Text
[
_lexer.Position].Value is '<' or '\'');
1842
Debug.Assert(_lexer.Text
[
_lexer.Position - 1] == '\\');
1966
Debug.Assert(_lexer.Text
[
_lexer.Position - 1] is var ch && (ch == 'P' || ch == 'p'));
EmbeddedLanguages\StackFrame\StackFrameLexer.cs (3)
60
public readonly VirtualChar CurrentChar => Position < Text.Length ? Text
[
Position] : default;
124
var ch = Text
[
Position];
440
Text
[
position + i] != val[i])
StackTraceExplorer\StackTraceAnalyzer.cs (3)
83
if (callstack
[
i].Value == '\n')
108
while (virtualChars
[
start].IsWhiteSpace && start < end)
113
while (virtualChars
[
end].IsWhiteSpace && end > start)
StackTraceExplorer\VSDebugCallstackParser.cs (1)
27
if (line
[
i].Value == '!')
Microsoft.CodeAnalysis.Workspaces (4)
AbstractVirtualCharService.cs (2)
98
var nextVC = result
[
i];
107
var nextVC = result
[
i];
VirtualCharSequence.cs (1)
134
var ch = this
[
i];
VirtualCharSequence.Enumerator.cs (1)
25
public readonly VirtualChar Current => _virtualCharSequence
[
_position];