34 writes to Position
Microsoft.CodeAnalysis.Features (34)
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (11)
66
Position
++;
147
Position
++;
160
Position
++;
171
Position
++;
205
Position
++;
237
Position
++;
276
Position
++;
319
Position
++;
340
Position
++;
383
Position
++;
434
Position
++;
EmbeddedLanguages\RegularExpressions\RegexParser.cs (23)
477
_lexer.
Position
= start;
567
_lexer.
Position
= position;
663
_lexer.
Position
= start;
774
_lexer.
Position
= afterQuestionPos - 1;
828
_lexer.
Position
= afterInnerOpenParen;
838
_lexer.
Position
= afterInnerOpenParen;
868
_lexer.
Position
--;
880
_lexer.
Position
--;
886
_lexer.
Position
= pos;
964
_lexer.
Position
= start;
1053
_lexer.
Position
--;
1503
_lexer.
Position
--;
1522
_lexer.
Position
--;
1604
_lexer.
Position
--;
1632
_lexer.
Position
--;
1638
_lexer.
Position
--;
1642
_lexer.
Position
--;
1678
_lexer.
Position
++;
1695
_lexer.
Position
= start;
1718
_lexer.
Position
= start;
1732
_lexer.
Position
= afterBackslashPosition;
1759
_lexer.
Position
= afterBackslashPosition;
1816
_lexer.
Position
--;
72 references to Position
Microsoft.CodeAnalysis.Features (72)
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 && IsEscapeCategoryChar(this.CurrentChar))
239
if (
Position
== start)
263
if (
Position
== Text.Length)
272
var start =
Position
;
274
while (
Position
< Text.Length && this.CurrentChar is var ch && IsDecimalDigit(ch))
291
if (
Position
== start)
311
if (
Position
== Text.Length)
316
var start =
Position
;
317
while (
Position
< Text.Length && RegexCharClass.IsBoundaryWordChar(this.CurrentChar))
322
if (
Position
== start)
337
var start =
Position
;
338
while (
Position
< Text.Length && IsOptionChar(this.CurrentChar))
343
return start ==
Position
372
var start =
Position
;
381
if (
Position
< Text.Length && IsHexChar(this.CurrentChar))
390
var length =
Position
- start;
395
GetTextSpan(beforeSlash,
Position
)));
414
var start =
Position
;
427
if (
Position
< Text.Length && IsOctalDigit(this.CurrentChar))
446
Debug.Assert(
Position
- start > 0);
EmbeddedLanguages\RegularExpressions\RegexParser.cs (30)
169
Debug.Assert(_lexer.
Position
== _lexer.Text.Length);
468
var start = _lexer.
Position
;
527
var start = _lexer.
Position
;
594
var start = _lexer.
Position
;
650
var start = _lexer.
Position
;
727
var afterQuestionPos = _lexer.
Position
;
781
var afterInnerOpenParen = _lexer.
Position
;
883
var pos = _lexer.
Position
;
945
var start = _lexer.
Position
;
972
if (_lexer.
Position
== _lexer.Text.Length)
1471
if (_currentToken.Kind == RegexKind.BackslashToken && _lexer.
Position
< _lexer.Text.Length)
1564
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1610
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1648
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1663
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1664
var start = _lexer.
Position
;
1668
while (_lexer.
Position
< _lexer.Text.Length &&
1669
_lexer.Text[_lexer.
Position
] is var ch &&
1682
bestPosition = _lexer.
Position
;
1702
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1703
var start = _lexer.
Position
;
1724
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1725
Debug.Assert(_lexer.Text[_lexer.
Position
].Value is '<' or '\'');
1727
var afterBackslashPosition = _lexer.
Position
;
1743
var afterBackslashPosition = _lexer.
Position
- @"k".Length;
1777
if (_lexer.
Position
< _lexer.Text.Length &&
1807
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1931
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] is var ch && (ch == 'P' || ch == 'p'));
1934
var start = _lexer.
Position
;
1964
if (_lexer.Text.Length - _lexer.
Position
< "{x}".Length)