34 writes to Position
Microsoft.CodeAnalysis.Features (34)
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (11)
64
Position
++;
145
Position
++;
158
Position
++;
169
Position
++;
203
Position
++;
235
Position
++;
274
Position
++;
317
Position
++;
338
Position
++;
381
Position
++;
432
Position
++;
EmbeddedLanguages\RegularExpressions\RegexParser.cs (23)
476
_lexer.
Position
= start;
566
_lexer.
Position
= position;
662
_lexer.
Position
= start;
773
_lexer.
Position
= afterQuestionPos - 1;
827
_lexer.
Position
= afterInnerOpenParen;
837
_lexer.
Position
= afterInnerOpenParen;
867
_lexer.
Position
--;
879
_lexer.
Position
--;
885
_lexer.
Position
= pos;
963
_lexer.
Position
= start;
1052
_lexer.
Position
--;
1502
_lexer.
Position
--;
1521
_lexer.
Position
--;
1603
_lexer.
Position
--;
1631
_lexer.
Position
--;
1637
_lexer.
Position
--;
1641
_lexer.
Position
--;
1677
_lexer.
Position
++;
1694
_lexer.
Position
= start;
1717
_lexer.
Position
= start;
1731
_lexer.
Position
= afterBackslashPosition;
1758
_lexer.
Position
= afterBackslashPosition;
1815
_lexer.
Position
--;
72 references to Position
Microsoft.CodeAnalysis.Features (72)
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (42)
47
public readonly VirtualChar CurrentChar =>
Position
< Text.Length ? Text[
Position
] : default;
50
=> GetSubPattern(start,
Position
);
58
if (
Position
== Text.Length)
66
return CreateToken(GetKind(ch), trivia, Text.GetSubSequence(new TextSpan(
Position
- 1, 1)));
106
while (
Position
< Text.Length)
130
if (
Position
>= Text.Length)
137
if (Text[
Position
] == '#')
139
var start =
Position
;
142
while (
Position
< Text.Length &&
143
Text[
Position
] != '\n')
154
var start =
Position
;
155
while (
Position
< Text.Length &&
156
Text[
Position
] != ')')
161
if (
Position
== Text.Length)
165
GetTextSpan(start,
Position
)));
180
=> TextAt(this.
Position
, val);
200
var start =
Position
;
201
while (
Position
< Text.Length && IsBlank(Text[
Position
]))
206
if (
Position
> start)
233
var start =
Position
;
234
while (
Position
< Text.Length && IsEscapeCategoryChar(this.CurrentChar))
237
if (
Position
== start)
261
if (
Position
== Text.Length)
270
var start =
Position
;
272
while (
Position
< Text.Length && this.CurrentChar is var ch && IsDecimalDigit(ch))
289
if (
Position
== start)
309
if (
Position
== Text.Length)
314
var start =
Position
;
315
while (
Position
< Text.Length && RegexCharClass.IsBoundaryWordChar(this.CurrentChar))
320
if (
Position
== start)
335
var start =
Position
;
336
while (
Position
< Text.Length && IsOptionChar(this.CurrentChar))
341
return start ==
Position
370
var start =
Position
;
379
if (
Position
< Text.Length && IsHexChar(this.CurrentChar))
388
var length =
Position
- start;
393
GetTextSpan(beforeSlash,
Position
)));
412
var start =
Position
;
425
if (
Position
< Text.Length && IsOctalDigit(this.CurrentChar))
444
Debug.Assert(
Position
- start > 0);
EmbeddedLanguages\RegularExpressions\RegexParser.cs (30)
168
Debug.Assert(_lexer.
Position
== _lexer.Text.Length);
467
var start = _lexer.
Position
;
526
var start = _lexer.
Position
;
593
var start = _lexer.
Position
;
649
var start = _lexer.
Position
;
726
var afterQuestionPos = _lexer.
Position
;
780
var afterInnerOpenParen = _lexer.
Position
;
882
var pos = _lexer.
Position
;
944
var start = _lexer.
Position
;
971
if (_lexer.
Position
== _lexer.Text.Length)
1470
if (_currentToken.Kind == RegexKind.BackslashToken && _lexer.
Position
< _lexer.Text.Length)
1563
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1609
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1647
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1662
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1663
var start = _lexer.
Position
;
1667
while (_lexer.
Position
< _lexer.Text.Length &&
1668
_lexer.Text[_lexer.
Position
] is var ch &&
1681
bestPosition = _lexer.
Position
;
1701
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1702
var start = _lexer.
Position
;
1723
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1724
Debug.Assert(_lexer.Text[_lexer.
Position
].Value is '<' or '\'');
1726
var afterBackslashPosition = _lexer.
Position
;
1742
var afterBackslashPosition = _lexer.
Position
- @"k".Length;
1776
if (_lexer.
Position
< _lexer.Text.Length &&
1806
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1930
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] is var ch && (ch == 'P' || ch == 'p'));
1933
var start = _lexer.
Position
;
1963
if (_lexer.Text.Length - _lexer.
Position
< "{x}".Length)