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)
497
_lexer.
Position
= start;
587
_lexer.
Position
= position;
683
_lexer.
Position
= start;
794
_lexer.
Position
= afterQuestionPos - 1;
848
_lexer.
Position
= afterInnerOpenParen;
858
_lexer.
Position
= afterInnerOpenParen;
888
_lexer.
Position
--;
900
_lexer.
Position
--;
906
_lexer.
Position
= pos;
984
_lexer.
Position
= start;
1073
_lexer.
Position
--;
1523
_lexer.
Position
--;
1542
_lexer.
Position
--;
1624
_lexer.
Position
--;
1652
_lexer.
Position
--;
1658
_lexer.
Position
--;
1662
_lexer.
Position
--;
1698
_lexer.
Position
++;
1715
_lexer.
Position
= start;
1738
_lexer.
Position
= start;
1752
_lexer.
Position
= afterBackslashPosition;
1779
_lexer.
Position
= afterBackslashPosition;
1836
_lexer.
Position
--;
73 references to Position
Microsoft.CodeAnalysis.Features (73)
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (43)
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[(
Position
- 1)..
Position
]);
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);
488
var start = _lexer.
Position
;
547
var start = _lexer.
Position
;
614
var start = _lexer.
Position
;
670
var start = _lexer.
Position
;
747
var afterQuestionPos = _lexer.
Position
;
801
var afterInnerOpenParen = _lexer.
Position
;
903
var pos = _lexer.
Position
;
965
var start = _lexer.
Position
;
992
if (_lexer.
Position
== _lexer.Text.Length)
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] == '\\');
1684
var start = _lexer.
Position
;
1688
while (_lexer.
Position
< _lexer.Text.Length &&
1689
_lexer.Text[_lexer.
Position
] is var ch &&
1702
bestPosition = _lexer.
Position
;
1722
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1723
var start = _lexer.
Position
;
1744
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1745
Debug.Assert(_lexer.Text[_lexer.
Position
].Value is '<' or '\'');
1747
var afterBackslashPosition = _lexer.
Position
;
1763
var afterBackslashPosition = _lexer.
Position
- @"k".Length;
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'));
1954
var start = _lexer.
Position
;
1984
if (_lexer.Text.Length - _lexer.
Position
< "{x}".Length)