36 writes to Position
Microsoft.CodeAnalysis.Features (36)
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (11)
66
Position
++;
147
Position
++;
160
Position
++;
171
Position
++;
205
Position
++;
239
Position
++;
280
Position
++;
323
Position
++;
344
Position
++;
387
Position
++;
438
Position
++;
EmbeddedLanguages\RegularExpressions\RegexParser.cs (25)
478
_lexer.
Position
= start;
568
_lexer.
Position
= position;
664
_lexer.
Position
= start;
772
_lexer.
Position
= afterQuestionPos - 1;
826
_lexer.
Position
= afterInnerOpenParen;
836
_lexer.
Position
= afterInnerOpenParen;
866
_lexer.
Position
--;
878
_lexer.
Position
--;
884
_lexer.
Position
= pos;
962
_lexer.
Position
= start;
1051
_lexer.
Position
--;
1508
_lexer.
Position
--;
1527
_lexer.
Position
--;
1555
_lexer.
Position
+= 2;
1567
_lexer.
Position
= beforeBracketPos;
1639
_lexer.
Position
--;
1667
_lexer.
Position
--;
1673
_lexer.
Position
--;
1677
_lexer.
Position
--;
1713
_lexer.
Position
++;
1730
_lexer.
Position
= start;
1753
_lexer.
Position
= start;
1767
_lexer.
Position
= afterBackslashPosition;
1794
_lexer.
Position
= afterBackslashPosition;
1851
_lexer.
Position
--;
74 references to Position
Microsoft.CodeAnalysis.Features (74)
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (42)
49
public readonly VirtualChar CurrentChar =>
Position
< Text.Length ? Text[
Position
] : default;
52
=> GetSubPattern(start,
Position
);
60
if (
Position
== Text.Length)
68
return CreateToken(GetKind(ch), trivia, Text.GetSubSequence(new TextSpan(
Position
- 1, 1)));
108
while (
Position
< Text.Length)
132
if (
Position
>= Text.Length)
139
if (Text[
Position
] == '#')
141
var start =
Position
;
144
while (
Position
< Text.Length &&
145
Text[
Position
] != '\n')
156
var start =
Position
;
157
while (
Position
< Text.Length &&
158
Text[
Position
] != ')')
163
if (
Position
== Text.Length)
167
GetTextSpan(start,
Position
)));
182
=> TextAt(this.
Position
, val);
202
var start =
Position
;
203
while (
Position
< Text.Length && IsBlank(Text[
Position
]))
208
if (
Position
> start)
235
var start =
Position
;
236
while (
Position
< Text.Length &&
242
if (
Position
== start)
267
if (
Position
== Text.Length)
276
var start =
Position
;
278
while (
Position
< Text.Length && this.CurrentChar is var ch && IsDecimalDigit(ch))
295
if (
Position
== start)
315
if (
Position
== Text.Length)
320
var start =
Position
;
321
while (
Position
< Text.Length && RegexCharClass.IsBoundaryWordChar(this.CurrentChar))
326
if (
Position
== start)
341
var start =
Position
;
342
while (
Position
< Text.Length && IsOptionChar(this.CurrentChar))
347
return start ==
Position
376
var start =
Position
;
385
if (
Position
< Text.Length && IsHexChar(this.CurrentChar))
394
var length =
Position
- start;
399
GetTextSpan(beforeSlash,
Position
)));
418
var start =
Position
;
431
if (
Position
< Text.Length && IsOctalDigit(this.CurrentChar))
450
Debug.Assert(
Position
- start > 0);
EmbeddedLanguages\RegularExpressions\RegexParser.cs (32)
170
Debug.Assert(_lexer.
Position
== _lexer.Text.Length);
469
var start = _lexer.
Position
;
528
var start = _lexer.
Position
;
595
var start = _lexer.
Position
;
651
var start = _lexer.
Position
;
725
var afterQuestionPos = _lexer.
Position
;
779
var afterInnerOpenParen = _lexer.
Position
;
881
var pos = _lexer.
Position
;
943
var start = _lexer.
Position
;
970
if (_lexer.
Position
== _lexer.Text.Length)
1476
if (_currentToken.Kind == RegexKind.BackslashToken && _lexer.
Position
< _lexer.Text.Length)
1548
var beforeBracketPos = _lexer.
Position
- 1;
1556
var textChars = _lexer.GetSubPattern(beforeBracketPos, _lexer.
Position
);
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] == '\\');
1699
var start = _lexer.
Position
;
1703
while (_lexer.
Position
< _lexer.Text.Length &&
1704
_lexer.Text[_lexer.
Position
] is var ch &&
1717
bestPosition = _lexer.
Position
;
1737
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1738
var start = _lexer.
Position
;
1759
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1760
Debug.Assert(_lexer.Text[_lexer.
Position
].Value is '<' or '\'');
1762
var afterBackslashPosition = _lexer.
Position
;
1778
var afterBackslashPosition = _lexer.
Position
- @"k".Length;
1812
if (_lexer.
Position
< _lexer.Text.Length &&
1842
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1966
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] is var ch && (ch == 'P' || ch == 'p'));
1969
var start = _lexer.
Position
;
1999
if (_lexer.Text.Length - _lexer.
Position
< "{x}".Length)