36 writes to Position
Microsoft.CodeAnalysis.Features (36)
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (11)
66Position++; 147Position++; 160Position++; 171Position++; 205Position++; 239Position++; 280Position++; 323Position++; 344Position++; 387Position++; 438Position++;
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)
49public readonly VirtualChar CurrentChar => Position < Text.Length ? Text[Position] : default; 52=> GetSubPattern(start, Position); 60if (Position == Text.Length) 68return CreateToken(GetKind(ch), trivia, Text.GetSubSequence(new TextSpan(Position - 1, 1))); 108while (Position < Text.Length) 132if (Position >= Text.Length) 139if (Text[Position] == '#') 141var start = Position; 144while (Position < Text.Length && 145Text[Position] != '\n') 156var start = Position; 157while (Position < Text.Length && 158Text[Position] != ')') 163if (Position == Text.Length) 167GetTextSpan(start, Position))); 182=> TextAt(this.Position, val); 202var start = Position; 203while (Position < Text.Length && IsBlank(Text[Position])) 208if (Position > start) 235var start = Position; 236while (Position < Text.Length && 242if (Position == start) 267if (Position == Text.Length) 276var start = Position; 278while (Position < Text.Length && this.CurrentChar is var ch && IsDecimalDigit(ch)) 295if (Position == start) 315if (Position == Text.Length) 320var start = Position; 321while (Position < Text.Length && RegexCharClass.IsBoundaryWordChar(this.CurrentChar)) 326if (Position == start) 341var start = Position; 342while (Position < Text.Length && IsOptionChar(this.CurrentChar)) 347return start == Position 376var start = Position; 385if (Position < Text.Length && IsHexChar(this.CurrentChar)) 394var length = Position - start; 399GetTextSpan(beforeSlash, Position))); 418var start = Position; 431if (Position < Text.Length && IsOctalDigit(this.CurrentChar)) 450Debug.Assert(Position - start > 0);
EmbeddedLanguages\RegularExpressions\RegexParser.cs (32)
169Debug.Assert(_lexer.Position == _lexer.Text.Length); 468var start = _lexer.Position; 527var start = _lexer.Position; 594var start = _lexer.Position; 650var start = _lexer.Position; 724var afterQuestionPos = _lexer.Position; 778var afterInnerOpenParen = _lexer.Position; 880var pos = _lexer.Position; 942var start = _lexer.Position; 969if (_lexer.Position == _lexer.Text.Length) 1474if (_currentToken.Kind == RegexKind.BackslashToken && _lexer.Position < _lexer.Text.Length) 1546var beforeBracketPos = _lexer.Position - 1; 1554var textChars = _lexer.GetSubPattern(beforeBracketPos, _lexer.Position); 1597Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1643Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1681Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1696Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1697var start = _lexer.Position; 1701while (_lexer.Position < _lexer.Text.Length && 1702_lexer.Text[_lexer.Position] is var ch && 1715bestPosition = _lexer.Position; 1735Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1736var start = _lexer.Position; 1757Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1758Debug.Assert(_lexer.Text[_lexer.Position].Value is '<' or '\''); 1760var afterBackslashPosition = _lexer.Position; 1776var afterBackslashPosition = _lexer.Position - @"k".Length; 1810if (_lexer.Position < _lexer.Text.Length && 1840Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1964Debug.Assert(_lexer.Text[_lexer.Position - 1] is var ch && (ch == 'P' || ch == 'p')); 1967var start = _lexer.Position; 1997if (_lexer.Text.Length - _lexer.Position < "{x}".Length)