1 write to _lexer
Microsoft.CodeAnalysis.Features (1)
EmbeddedLanguages\RegularExpressions\RegexParser.cs (1)
95_lexer = new RegexLexer(text);
101 references to _lexer
Microsoft.CodeAnalysis.Features (101)
EmbeddedLanguages\RegularExpressions\RegexParser.cs (101)
119_currentToken = _lexer.ScanNextToken(allowTrivia, _options); 169Debug.Assert(_lexer.Position == _lexer.Text.Length); 179_lexer.Text, root, diagnostics.ToImmutable(), 468var start = _lexer.Position; 477_lexer.Position = start; 512var firstNumber = _lexer.TryScanNumber(); 527var start = _lexer.Position; 528secondNumberToken = _lexer.TryScanNumber(); 567_lexer.Position = position; 594var start = _lexer.Position; 650var start = _lexer.Position; 663_lexer.Position = start; 712? new TextSpan(_lexer.Text.Last().Span.End, 0) 718var optionsToken = _lexer.TryScanOptions(); 724var afterQuestionPos = _lexer.Position; 771_lexer.Position = afterQuestionPos - 1; 778var afterInnerOpenParen = _lexer.Position; 780var captureToken = _lexer.TryScanNumberOrCaptureName(); 825_lexer.Position = afterInnerOpenParen; 835_lexer.Position = afterInnerOpenParen; 865_lexer.Position--; 877_lexer.Position--; 878if (_lexer.IsAt("(?#")) 880var pos = _lexer.Position; 881var comment = _lexer.ScanComment(options: default); 883_lexer.Position = pos; 896else if (_lexer.IsAt("(?'")) 902else if (_lexer.IsAt("(?<")) 904if (!_lexer.IsAt("(?<!") && 905!_lexer.IsAt("(?<=")) 942var start = _lexer.Position; 961_lexer.Position = start; 969if (_lexer.Position == _lexer.Text.Length) 978var captureToken = _lexer.TryScanNumberOrCaptureName(); 1050_lexer.Position--; 1063var secondCapture = _lexer.TryScanNumberOrCaptureName(); 1284if (_currentToken.Kind == RegexKind.MinusToken && !_lexer.IsAt("]")) 1474if (_currentToken.Kind == RegexKind.BackslashToken && _lexer.Position < _lexer.Text.Length) 1506_lexer.Position--; 1525_lexer.Position--; 1533_lexer.IsAt("[")) 1544if (!afterRangeMinus && _currentToken.Kind == RegexKind.OpenBracketToken && _lexer.IsAt(":")) 1546var beforeBracketPos = _lexer.Position - 1; 1550var captureName = _lexer.TryScanCaptureName(); 1551if (captureName.HasValue && _lexer.IsAt(":]")) 1553_lexer.Position += 2; 1554var textChars = _lexer.GetSubPattern(beforeBracketPos, _lexer.Position); 1565_lexer.Position = beforeBracketPos; 1597Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1637_lexer.Position--; 1643Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1665_lexer.Position--; 1671_lexer.Position--; 1675_lexer.Position--; 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 && 1711_lexer.Position++; 1715bestPosition = _lexer.Position; 1723_lexer.GetSubPattern(start, bestPosition)).With(value: capVal); 1728_lexer.Position = start; 1735Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1736var start = _lexer.Position; 1738var number = _lexer.TryScanNumber(); 1751_lexer.Position = start; 1757Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1758Debug.Assert(_lexer.Text[_lexer.Position].Value is '<' or '\''); 1760var afterBackslashPosition = _lexer.Position; 1765_lexer.Position = afterBackslashPosition; 1776var afterBackslashPosition = _lexer.Position - @"k".Length; 1792_lexer.Position = afterBackslashPosition; 1810if (_lexer.Position < _lexer.Text.Length && 1820var captureToken = _lexer.TryScanNumberOrCaptureName(); 1840Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1849_lexer.Position--; 1850var octalDigits = _lexer.ScanOctalCharacters(_options); 1892var hexChars = _lexer.ScanHexCharacters(4); 1900var hexChars = _lexer.ScanHexCharacters(2); 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) 2013var category = _lexer.TryScanEscapeCategory();