1 write to Text
Microsoft.CodeAnalysis.Features (1)
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (1)
45=> Text = text;
51 references to Text
Microsoft.CodeAnalysis.Features (51)
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (31)
47public readonly VirtualChar CurrentChar => Position < Text.Length ? Text[Position] : default; 53=> Text[start..end]; 58if (Position == Text.Length) 66return CreateToken(GetKind(ch), trivia, Text[(Position - 1)..Position]); 106while (Position < Text.Length) 130if (Position >= Text.Length) 137if (Text[Position] == '#') 142while (Position < Text.Length && 143Text[Position] != '\n') 155while (Position < Text.Length && 156Text[Position] != ')') 161if (Position == Text.Length) 177=> TextSpan.FromBounds(Text[startInclusive].Span.Start, Text[endExclusive - 1].Span.End); 186if (position + i >= Text.Length || 187Text[position + i] != val[i]) 201while (Position < Text.Length && IsBlank(Text[Position])) 234while (Position < Text.Length && IsEscapeCategoryChar(this.CurrentChar)) 261if (Position == Text.Length) 272while (Position < Text.Length && this.CurrentChar is var ch && IsDecimalDigit(ch)) 309if (Position == Text.Length) 315while (Position < Text.Length && RegexCharClass.IsBoundaryWordChar(this.CurrentChar)) 336while (Position < Text.Length && IsOptionChar(this.CurrentChar)) 374Debug.Assert(Text[beforeSlash] == '\\'); 375Debug.Assert(Text[beforeSlash + 1].Value is 'x' or 'u'); 379if (Position < Text.Length && IsHexChar(this.CurrentChar)) 417Debug.Assert(Text[beforeSlash] == '\\'); 418Debug.Assert(IsOctalDigit(Text[start])); 425if (Position < Text.Length && IsOctalDigit(this.CurrentChar))
EmbeddedLanguages\RegularExpressions\RegexParser.cs (20)
168Debug.Assert(_lexer.Position == _lexer.Text.Length); 178_lexer.Text, root, diagnostics.ToImmutable(), 299MergeTextNodes(_lexer.Text, builder, sequence); 732? new TextSpan(_lexer.Text[^1].Span.End, 0) 992if (_lexer.Position == _lexer.Text.Length) 1280MergeTextNodes(_lexer.Text, builder, contents); 1491if (_currentToken.Kind == RegexKind.BackslashToken && _lexer.Position < _lexer.Text.Length) 1584Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1630Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1668Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1683Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1688while (_lexer.Position < _lexer.Text.Length && 1689_lexer.Text[_lexer.Position] is var ch && 1722Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1744Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1745Debug.Assert(_lexer.Text[_lexer.Position].Value is '<' or '\''); 1797if (_lexer.Position < _lexer.Text.Length && 1827Debug.Assert(_lexer.Text[_lexer.Position - 1] == '\\'); 1951Debug.Assert(_lexer.Text[_lexer.Position - 1] is var ch && (ch == 'P' || ch == 'p')); 1984if (_lexer.Text.Length - _lexer.Position < "{x}".Length)