2 writes to _currentToken
Microsoft.CodeAnalysis.Features (2)
EmbeddedLanguages\RegularExpressions\RegexParser.cs (2)
119_currentToken = _lexer.ScanNextToken(allowTrivia, _options); 476_currentToken = openBraceToken;
93 references to _currentToken
Microsoft.CodeAnalysis.Features (93)
EmbeddedLanguages\RegularExpressions\RegexParser.cs (93)
118var previous = _currentToken; 170Debug.Assert(_currentToken.Kind == RegexKind.EndOfFile); 172var root = new RegexCompilationUnit(expression, _currentToken); 268while (_currentToken.Kind == RegexKind.BarToken) 398if (_currentToken.Kind == RegexKind.EndOfFile) 403if (_currentToken.Kind == RegexKind.BarToken) 408if (_currentToken.Kind == RegexKind.CloseParenToken) 425return _currentToken.Kind switch 430RegexKind.OpenBraceToken => TryParseNumericQuantifier(current, _currentToken), 437if (_currentToken.Kind != RegexKind.QuestionToken) 523if (_currentToken.Kind == RegexKind.CommaToken) 525commaToken = _currentToken; 555if (_currentToken.Kind != RegexKind.CloseBraceToken) 573return _currentToken.Kind switch 578RegexKind.BackslashToken => ParseEscape(_currentToken, allowTriviaAfterEnd: true), 593var openBraceToken = _currentToken.With(kind: RegexKind.TextToken); 611var token = _currentToken.With(kind: RegexKind.TextToken).AddDiagnosticIfNone( 612new EmbeddedDiagnostic(FeaturesResources.Too_many_close_parens, _currentToken.GetSpan())); 656switch (_currentToken.Kind) 659return ParseGroupQuestion(openParenToken, _currentToken); 670switch (_currentToken.Kind) 678new EmbeddedDiagnostic(FeaturesResources.Not_enough_close_parens, GetTokenStartPositionSpan(_currentToken))); 729switch (_currentToken.Kind) 738openParenToken, questionToken, _currentToken); 757if (_currentToken.Kind != RegexKind.CloseParenToken) 777var innerOpenParenToken = _currentToken; 800if (_currentToken.Kind == RegexKind.CloseParenToken) 802innerCloseParenToken = _currentToken; 833if (_currentToken.Kind != RegexKind.CloseParenToken) 839innerCloseParenToken = _currentToken; 862if (_currentToken.Kind != RegexKind.EndOfFile) 915Debug.Assert(_currentToken.Kind == RegexKind.OpenParenToken); 947switch (_currentToken.Kind) 951openParenToken, questionToken, lessThanToken, _currentToken, 956openParenToken, questionToken, lessThanToken, _currentToken, 985if (_currentToken.Kind == RegexKind.MinusToken) 994GetTokenSpanIncludingEOF(_currentToken))); 1013if (_currentToken.Kind == RegexKind.MinusToken) 1031if ((openToken.Kind == RegexKind.LessThanToken && _currentToken.Kind == RegexKind.GreaterThanToken) || 1032(openToken.Kind == RegexKind.SingleQuoteToken && _currentToken.Kind == RegexKind.SingleQuoteToken)) 1034return _currentToken; 1037if (_currentToken.Kind == RegexKind.EndOfFile) 1047_currentToken.GetSpan())); 1062var minusToken = _currentToken; 1071GetTokenSpanIncludingEOF(_currentToken))); 1124openParenToken, questionToken, _currentToken, 1129openParenToken, questionToken, _currentToken, 1134openParenToken, questionToken, _currentToken, 1139openParenToken, questionToken, _currentToken, 1147switch (_currentToken.Kind) 1170openParenToken, questionToken, optionsToken, _currentToken, 1220var openBracketToken = _currentToken; 1227if (_currentToken.Kind == RegexKind.CaretToken) 1229caretToken = _currentToken; 1240while (_currentToken.Kind != RegexKind.EndOfFile) 1242Debug.Assert(_currentToken.VirtualChars.Length == 1); 1244if (_currentToken.Kind == RegexKind.CloseBracketToken && builder.Count > 0) 1263GetTokenStartPositionSpan(_currentToken))); 1284if (_currentToken.Kind == RegexKind.MinusToken && !_lexer.IsAt("]")) 1289if (_currentToken.Kind == RegexKind.OpenBracketToken) 1474if (_currentToken.Kind == RegexKind.BackslashToken && _lexer.Position < _lexer.Text.Length) 1476var backslashToken = _currentToken; 1481Debug.Assert(_currentToken.VirtualChars.Length == 1); 1483var nextChar = _currentToken.VirtualChars[0]; 1498GetSpan(backslashToken, _currentToken))); 1532_currentToken.Kind == RegexKind.MinusToken && 1544if (!afterRangeMinus && _currentToken.Kind == RegexKind.OpenBracketToken && _lexer.IsAt(":")) 1567Debug.Assert(_currentToken.Kind == RegexKind.OpenBracketToken); 1580if (_currentToken.Kind is not RegexKind.CloseBracketToken and not RegexKind.EndOfFile) 1602if (_currentToken.Kind == RegexKind.EndOfFile) 1610Debug.Assert(_currentToken.VirtualChars.Length == 1); 1611switch (_currentToken.VirtualChars[0].Value) 1648if (_currentToken.Kind == RegexKind.EndOfFile) 1656Debug.Assert(_currentToken.VirtualChars.Length == 1); 1657var ch = _currentToken.VirtualChars[0]; 1775var typeToken = _currentToken; 1811(_currentToken.Kind == RegexKind.LessThanToken || _currentToken.Kind == RegexKind.SingleQuoteToken)) 1813openToken = _currentToken; 1830((openToken.Kind == RegexKind.LessThanToken && _currentToken.Kind == RegexKind.GreaterThanToken) || 1831(openToken.Kind == RegexKind.SingleQuoteToken && _currentToken.Kind == RegexKind.SingleQuoteToken))) 1844Debug.Assert(_currentToken.VirtualChars.Length == 1); 1846var ch = _currentToken.VirtualChars[0]; 1891var typeToken = _currentToken; 1899var typeToken = _currentToken; 1910if (_currentToken.Kind == RegexKind.EndOfFile) 1918Debug.Assert(_currentToken.VirtualChars.Length == 1); 1920var ch = _currentToken.VirtualChars[0].Value; 1954_currentToken.GetSpan())); 1965var typeToken = _currentToken; 2006if (_currentToken.Kind != RegexKind.OpenBraceToken) 2012openBraceToken = _currentToken; 2017if (_currentToken.Kind != RegexKind.CloseBraceToken)