1 write to Text
Microsoft.CodeAnalysis.Features (1)
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (1)
45
=>
Text
= text;
51 references to Text
Microsoft.CodeAnalysis.Features (51)
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (31)
47
public readonly VirtualChar CurrentChar => Position <
Text
.Length ?
Text
[Position] : default;
53
=>
Text
[start..end];
58
if (Position ==
Text
.Length)
66
return CreateToken(GetKind(ch), trivia,
Text
[(Position - 1)..Position]);
106
while (Position <
Text
.Length)
130
if (Position >=
Text
.Length)
137
if (
Text
[Position] == '#')
142
while (Position <
Text
.Length &&
143
Text
[Position] != '\n')
155
while (Position <
Text
.Length &&
156
Text
[Position] != ')')
161
if (Position ==
Text
.Length)
177
=> TextSpan.FromBounds(
Text
[startInclusive].Span.Start,
Text
[endExclusive - 1].Span.End);
186
if (position + i >=
Text
.Length ||
187
Text
[position + i] != val[i])
201
while (Position <
Text
.Length && IsBlank(
Text
[Position]))
234
while (Position <
Text
.Length && IsEscapeCategoryChar(this.CurrentChar))
261
if (Position ==
Text
.Length)
272
while (Position <
Text
.Length && this.CurrentChar is var ch && IsDecimalDigit(ch))
309
if (Position ==
Text
.Length)
315
while (Position <
Text
.Length && RegexCharClass.IsBoundaryWordChar(this.CurrentChar))
336
while (Position <
Text
.Length && IsOptionChar(this.CurrentChar))
374
Debug.Assert(
Text
[beforeSlash] == '\\');
375
Debug.Assert(
Text
[beforeSlash + 1].Value is 'x' or 'u');
379
if (Position <
Text
.Length && IsHexChar(this.CurrentChar))
417
Debug.Assert(
Text
[beforeSlash] == '\\');
418
Debug.Assert(IsOctalDigit(
Text
[start]));
425
if (Position <
Text
.Length && IsOctalDigit(this.CurrentChar))
EmbeddedLanguages\RegularExpressions\RegexParser.cs (20)
168
Debug.Assert(_lexer.Position == _lexer.
Text
.Length);
178
_lexer.
Text
, root, diagnostics.ToImmutable(),
299
MergeTextNodes(_lexer.
Text
, builder, sequence);
732
? new TextSpan(_lexer.
Text
[^1].Span.End, 0)
992
if (_lexer.Position == _lexer.
Text
.Length)
1280
MergeTextNodes(_lexer.
Text
, builder, contents);
1491
if (_currentToken.Kind == RegexKind.BackslashToken && _lexer.Position < _lexer.
Text
.Length)
1584
Debug.Assert(_lexer.
Text
[_lexer.Position - 1] == '\\');
1630
Debug.Assert(_lexer.
Text
[_lexer.Position - 1] == '\\');
1668
Debug.Assert(_lexer.
Text
[_lexer.Position - 1] == '\\');
1683
Debug.Assert(_lexer.
Text
[_lexer.Position - 1] == '\\');
1688
while (_lexer.Position < _lexer.
Text
.Length &&
1689
_lexer.
Text
[_lexer.Position] is var ch &&
1722
Debug.Assert(_lexer.
Text
[_lexer.Position - 1] == '\\');
1744
Debug.Assert(_lexer.
Text
[_lexer.Position - 1] == '\\');
1745
Debug.Assert(_lexer.
Text
[_lexer.Position].Value is '<' or '\'');
1797
if (_lexer.Position < _lexer.
Text
.Length &&
1827
Debug.Assert(_lexer.
Text
[_lexer.Position - 1] == '\\');
1951
Debug.Assert(_lexer.
Text
[_lexer.Position - 1] is var ch && (ch == 'P' || ch == 'p'));
1984
if (_lexer.
Text
.Length - _lexer.Position < "{x}".Length)