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)
477
_lexer.
Position
= start;
567
_lexer.
Position
= position;
663
_lexer.
Position
= start;
771
_lexer.
Position
= afterQuestionPos - 1;
825
_lexer.
Position
= afterInnerOpenParen;
835
_lexer.
Position
= afterInnerOpenParen;
865
_lexer.
Position
--;
877
_lexer.
Position
--;
883
_lexer.
Position
= pos;
961
_lexer.
Position
= start;
1050
_lexer.
Position
--;
1506
_lexer.
Position
--;
1525
_lexer.
Position
--;
1553
_lexer.
Position
+= 2;
1565
_lexer.
Position
= beforeBracketPos;
1637
_lexer.
Position
--;
1665
_lexer.
Position
--;
1671
_lexer.
Position
--;
1675
_lexer.
Position
--;
1711
_lexer.
Position
++;
1728
_lexer.
Position
= start;
1751
_lexer.
Position
= start;
1765
_lexer.
Position
= afterBackslashPosition;
1792
_lexer.
Position
= afterBackslashPosition;
1849
_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)
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
;
724
var afterQuestionPos = _lexer.
Position
;
778
var afterInnerOpenParen = _lexer.
Position
;
880
var pos = _lexer.
Position
;
942
var start = _lexer.
Position
;
969
if (_lexer.
Position
== _lexer.Text.Length)
1474
if (_currentToken.Kind == RegexKind.BackslashToken && _lexer.
Position
< _lexer.Text.Length)
1546
var beforeBracketPos = _lexer.
Position
- 1;
1554
var textChars = _lexer.GetSubPattern(beforeBracketPos, _lexer.
Position
);
1597
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1643
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1681
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1696
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1697
var start = _lexer.
Position
;
1701
while (_lexer.
Position
< _lexer.Text.Length &&
1702
_lexer.Text[_lexer.
Position
] is var ch &&
1715
bestPosition = _lexer.
Position
;
1735
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1736
var start = _lexer.
Position
;
1757
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1758
Debug.Assert(_lexer.Text[_lexer.
Position
].Value is '<' or '\'');
1760
var afterBackslashPosition = _lexer.
Position
;
1776
var afterBackslashPosition = _lexer.
Position
- @"k".Length;
1810
if (_lexer.
Position
< _lexer.Text.Length &&
1840
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] == '\\');
1964
Debug.Assert(_lexer.Text[_lexer.
Position
- 1] is var ch && (ch == 'P' || ch == 'p'));
1967
var start = _lexer.
Position
;
1997
if (_lexer.Text.Length - _lexer.
Position
< "{x}".Length)