293 references to RegexKind
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (4)
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (4)
25using RegexToken = EmbeddedSyntaxToken<RegexKind>; 26using RegexTrivia = EmbeddedSyntaxTrivia<RegexKind>; 302case RegexKind.CommentTrivia: 303case RegexKind.WhitespaceTrivia:
Microsoft.CodeAnalysis.Features (289)
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexBraceMatcher.cs (3)
19using RegexToken = EmbeddedSyntaxToken<RegexKind>; 20using RegexTrivia = EmbeddedSyntaxTrivia<RegexKind>; 79if (trivia?.Kind != RegexKind.CommentTrivia)
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexClassifier.cs (3)
19using RegexToken = EmbeddedSyntaxToken<RegexKind>; 20using RegexTrivia = EmbeddedSyntaxTrivia<RegexKind>; 97if (trivia.Kind == RegexKind.CommentTrivia &&
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexDocumentHighlighter.cs (5)
20using RegexToken = EmbeddedSyntaxToken<RegexKind>; 88if (captureToken.Kind == RegexKind.NumberToken) 128if (node.Kind is RegexKind.BackreferenceEscape or 129RegexKind.CaptureEscape or 130RegexKind.KCaptureEscape)
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexEmbeddedCompletionProvider.cs (4)
24using RegexToken = EmbeddedSyntaxToken<RegexKind>; 191case RegexKind.BackslashToken: 194case RegexKind.OpenBracketToken: 197case RegexKind.OpenParenToken:
EmbeddedLanguages\RegularExpressions\RegexHelpers.cs (6)
15using RegexToken = EmbeddedSyntaxToken<RegexKind>; 16using RegexTrivia = EmbeddedSyntaxTrivia<RegexKind>; 23public static RegexToken CreateToken(RegexKind kind, ImmutableArray<RegexTrivia> leadingTrivia, VirtualCharSequence virtualChars) 26public static RegexToken CreateMissingToken(RegexKind kind) 29public static RegexTrivia CreateTrivia(RegexKind kind, VirtualCharSequence virtualChars) 32public static RegexTrivia CreateTrivia(RegexKind kind, VirtualCharSequence virtualChars, ImmutableArray<EmbeddedDiagnostic> diagnostics)
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (38)
17using RegexToken = EmbeddedSyntaxToken<RegexKind>; 18using RegexTrivia = EmbeddedSyntaxTrivia<RegexKind>; 33/// cref="RegexTextNode"/>s in a row (each containing a <see cref="RegexKind.TextToken"/> a 60return CreateToken(RegexKind.EndOfFile, trivia, VirtualCharSequence.Empty); 69private static RegexKind GetKind(VirtualChar ch) 72'|' => RegexKind.BarToken, 73'*' => RegexKind.AsteriskToken, 74'+' => RegexKind.PlusToken, 75'?' => RegexKind.QuestionToken, 76'{' => RegexKind.OpenBraceToken, 77'}' => RegexKind.CloseBraceToken, 78'\\' => RegexKind.BackslashToken, 79'[' => RegexKind.OpenBracketToken, 80']' => RegexKind.CloseBracketToken, 81'.' => RegexKind.DotToken, 82'^' => RegexKind.CaretToken, 83'$' => RegexKind.DollarToken, 84'(' => RegexKind.OpenParenToken, 85')' => RegexKind.CloseParenToken, 86',' => RegexKind.CommaToken, 87':' => RegexKind.ColonToken, 88'=' => RegexKind.EqualsToken, 89'!' => RegexKind.ExclamationToken, 90'<' => RegexKind.LessThanToken, 91'>' => RegexKind.GreaterThanToken, 92'-' => RegexKind.MinusToken, 93'\'' => RegexKind.SingleQuoteToken, 94_ => RegexKind.TextToken, 148return CreateTrivia(RegexKind.CommentTrivia, GetSubPatternToCurrentPos(start)); 166return CreateTrivia(RegexKind.CommentTrivia, GetSubPatternToCurrentPos(start), diagnostics); 170return CreateTrivia(RegexKind.CommentTrivia, GetSubPatternToCurrentPos(start)); 208return CreateTrivia(RegexKind.WhitespaceTrivia, GetSubPatternToCurrentPos(start)); 240var token = CreateToken(RegexKind.EscapeCategoryToken, [], GetSubPatternToCurrentPos(start)); 294var token = CreateToken(RegexKind.NumberToken, [], GetSubPatternToCurrentPos(start)); 325var token = CreateToken(RegexKind.CaptureNameToken, [], GetSubPatternToCurrentPos(start)); 343: CreateToken(RegexKind.OptionsToken, ImmutableArray<RegexTrivia>.Empty, GetSubPatternToCurrentPos(start)); 386RegexKind.TextToken, [], GetSubPatternToCurrentPos(start)); 447RegexKind.TextToken, [], GetSubPatternToCurrentPos(start));
EmbeddedLanguages\RegularExpressions\RegexNode.cs (2)
9internal abstract class RegexNode : EmbeddedSyntaxNode<RegexKind, RegexNode> 11protected RegexNode(RegexKind kind) : base(kind)
EmbeddedLanguages\RegularExpressions\RegexNodes.cs (96)
12using RegexAlternatingSequenceList = EmbeddedSeparatedSyntaxNodeList<RegexKind, RegexNode, RegexSequenceNode>; 13using RegexNodeOrToken = EmbeddedSyntaxNodeOrToken<RegexKind, RegexNode>; 14using RegexToken = EmbeddedSyntaxToken<RegexKind>; 19: base(RegexKind.CompilationUnit) 22Debug.Assert(endOfFileToken.Kind == RegexKind.EndOfFile); 55internal sealed class RegexSequenceNode(ImmutableArray<RegexExpressionNode> children) : RegexExpressionNode(RegexKind.Sequence) 74: base(RegexKind.Text) 76Debug.Assert(textToken.Kind == RegexKind.TextToken); 101RegexKind kind, RegexToken openBracketToken, RegexSequenceNode components, RegexToken closeBracketToken) 104Debug.Assert(openBracketToken.Kind == RegexKind.OpenBracketToken); 106Debug.Assert(closeBracketToken.Kind == RegexKind.CloseBracketToken); 121RegexToken openBracketToken, RegexSequenceNode components, RegexToken closeBracketToken) : RegexBaseCharacterClassNode(RegexKind.CharacterClass, openBracketToken, components, closeBracketToken) 145: base(RegexKind.NegatedCharacterClass, openBracketToken, components, closeBracketToken) 147Debug.Assert(caretToken.Kind == RegexKind.CaretToken); 176: base(RegexKind.CharacterClassRange) 179Debug.Assert(minusToken.Kind == RegexKind.MinusToken); 214: base(RegexKind.CharacterClassSubtraction) 216Debug.Assert(minusToken.Kind == RegexKind.MinusToken); 244protected RegexExpressionNode(RegexKind kind) 255protected RegexPrimaryExpressionNode(RegexKind kind) 267: base(RegexKind.Wildcard) 269Debug.Assert(dotToken.Kind == RegexKind.DotToken); 293protected RegexQuantifierNode(RegexKind kind) 306: base(RegexKind.ZeroOrMoreQuantifier) 309Debug.Assert(asteriskToken.Kind == RegexKind.AsteriskToken); 338: base(RegexKind.OneOrMoreQuantifier) 341Debug.Assert(plusToken.Kind == RegexKind.PlusToken); 370: base(RegexKind.ZeroOrOneQuantifier) 373Debug.Assert(questionToken.Kind == RegexKind.QuestionToken); 404: base(RegexKind.LazyQuantifier) 407Debug.Assert(quantifier.Kind != RegexKind.LazyQuantifier); 408Debug.Assert(questionToken.Kind == RegexKind.QuestionToken); 437RegexKind kind, RegexPrimaryExpressionNode expression, RegexToken openBraceToken, RegexToken firstNumberToken, RegexToken closeBraceToken) 441Debug.Assert(openBraceToken.Kind == RegexKind.OpenBraceToken); 442Debug.Assert(firstNumberToken.Kind == RegexKind.NumberToken); 443Debug.Assert(closeBraceToken.Kind == RegexKind.CloseBraceToken); 460RegexPrimaryExpressionNode expression, RegexToken openBraceToken, RegexToken numberToken, RegexToken closeBraceToken) : RegexNumericQuantifierNode(RegexKind.ExactNumericQuantifier, expression, openBraceToken, numberToken, closeBraceToken) 487: base(RegexKind.OpenRangeNumericQuantifier, expression, openBraceToken, firstNumberToken, closeBraceToken) 489Debug.Assert(commaToken.Kind == RegexKind.CommaToken); 521: base(RegexKind.ClosedRangeNumericQuantifier, expression, openBraceToken, firstNumberToken, closeBraceToken) 523Debug.Assert(commaToken.Kind == RegexKind.CommaToken); 524Debug.Assert(secondNumberToken.Kind == RegexKind.NumberToken); 555public RegexAnchorNode(RegexKind kind, RegexToken anchorToken) 558Debug.Assert(anchorToken.Kind is RegexKind.DollarToken or RegexKind.CaretToken); 583: base(RegexKind.Alternation) 587Debug.Assert(sequenceList.NodesAndTokens[i].Kind == RegexKind.BarToken); 608protected RegexGroupingNode(RegexKind kind, RegexToken openParenToken, RegexToken closeParenToken) 611Debug.Assert(openParenToken.Kind == RegexKind.OpenParenToken); 612Debug.Assert(closeParenToken.Kind == RegexKind.CloseParenToken); 627: base(RegexKind.SimpleGrouping, openParenToken, closeParenToken) 655protected RegexQuestionGroupingNode(RegexKind kind, RegexToken openParenToken, RegexToken questionToken, RegexToken closeParenToken) 658Debug.Assert(questionToken.Kind == RegexKind.QuestionToken); 670protected RegexOptionsGroupingNode(RegexKind kind, RegexToken openParenToken, RegexToken questionToken, RegexToken optionsToken, RegexToken closeParenToken) 683RegexToken openParenToken, RegexToken questionToken, RegexToken optionsToken, RegexToken closeParenToken) : RegexOptionsGroupingNode(RegexKind.SimpleOptionsGrouping, openParenToken, questionToken, optionsToken, closeParenToken) 709: base(RegexKind.NestedOptionsGrouping, openParenToken, questionToken, optionsToken, closeParenToken) 711Debug.Assert(colonToken.Kind == RegexKind.ColonToken); 746: base(RegexKind.NonCapturingGrouping, openParenToken, questionToken, closeParenToken) 748Debug.Assert(colonToken.Kind == RegexKind.ColonToken); 782: base(RegexKind.PositiveLookaheadGrouping, openParenToken, questionToken, closeParenToken) 784Debug.Assert(equalsToken.Kind == RegexKind.EqualsToken); 818: base(RegexKind.NegativeLookaheadGrouping, openParenToken, questionToken, closeParenToken) 820Debug.Assert(exclamationToken.Kind == RegexKind.ExclamationToken); 849RegexKind kind, RegexToken openParenToken, RegexToken questionToken, 853Debug.Assert(lessThanToken.Kind == RegexKind.LessThanToken); 868: base(RegexKind.PositiveLookbehindGrouping, openParenToken, questionToken, lessThanToken, closeParenToken) 870Debug.Assert(equalsToken.Kind == RegexKind.EqualsToken); 905: base(RegexKind.NegativeLookbehindGrouping, openParenToken, questionToken, lessThanToken, closeParenToken) 907Debug.Assert(exclamationToken.Kind == RegexKind.ExclamationToken); 942: base(RegexKind.AtomicGrouping, openParenToken, questionToken, closeParenToken) 944Debug.Assert(greaterThanToken.Kind == RegexKind.GreaterThanToken); 979: base(RegexKind.CaptureGrouping, openParenToken, questionToken, closeParenToken) 1021: base(RegexKind.BalancingGrouping, openParenToken, questionToken, closeParenToken) 1023Debug.Assert(minusToken.Kind == RegexKind.MinusToken); 1064RegexKind kind, RegexToken openParenToken, RegexToken questionToken, 1084: base(RegexKind.ConditionalCaptureGrouping, openParenToken, questionToken, result, closeParenToken) 1086Debug.Assert(innerOpenParenToken.Kind == RegexKind.OpenParenToken); 1087Debug.Assert(innerCloseParenToken.Kind == RegexKind.CloseParenToken); 1127: base(RegexKind.ConditionalExpressionGrouping, openParenToken, questionToken, result, closeParenToken) 1157protected RegexEscapeNode(RegexKind kind, RegexToken backslashToken) : base(kind) 1159Debug.Assert(backslashToken.Kind == RegexKind.BackslashToken); 1171protected RegexTypeEscapeNode(RegexKind kind, RegexToken backslashToken, RegexToken typeToken) 1186: base(RegexKind.SimpleEscape, backslashToken, typeToken) 1188Debug.Assert(typeToken.Kind == RegexKind.TextToken); 1208internal sealed class RegexAnchorEscapeNode(RegexToken backslashToken, RegexToken typeToken) : RegexTypeEscapeNode(RegexKind.AnchorEscape, backslashToken, typeToken) 1227internal sealed class RegexCharacterClassEscapeNode(RegexToken backslashToken, RegexToken typeToken) : RegexTypeEscapeNode(RegexKind.CharacterClassEscape, backslashToken, typeToken) 1246internal sealed class RegexControlEscapeNode(RegexToken backslashToken, RegexToken typeToken, RegexToken controlToken) : RegexTypeEscapeNode(RegexKind.ControlEscape, backslashToken, typeToken) 1268internal sealed class RegexHexEscapeNode(RegexToken backslashToken, RegexToken typeToken, RegexToken hexText) : RegexTypeEscapeNode(RegexKind.HexEscape, backslashToken, typeToken) 1290internal sealed class RegexUnicodeEscapeNode(RegexToken backslashToken, RegexToken typeToken, RegexToken hexText) : RegexTypeEscapeNode(RegexKind.UnicodeEscape, backslashToken, typeToken) 1313RegexToken backslashToken, RegexToken openToken, RegexToken captureToken, RegexToken closeToken) : RegexEscapeNode(RegexKind.CaptureEscape, backslashToken) 1340RegexToken openToken, RegexToken captureToken, RegexToken closeToken) : RegexTypeEscapeNode(RegexKind.KCaptureEscape, backslashToken, typeToken) 1366internal sealed class RegexOctalEscapeNode(RegexToken backslashToken, RegexToken octalText) : RegexEscapeNode(RegexKind.OctalEscape, backslashToken) 1390internal sealed class RegexBackreferenceEscapeNode(RegexToken backslashToken, RegexToken numberToken) : RegexEscapeNode(RegexKind.BackreferenceEscape, backslashToken) 1415: base(RegexKind.CategoryEscape, backslashToken) 1417Debug.Assert(openBraceToken.Kind == RegexKind.OpenBraceToken); 1418Debug.Assert(closeBraceToken.Kind == RegexKind.CloseBraceToken);
EmbeddedLanguages\RegularExpressions\RegexParser.CaptureInfoAnalyzer.cs (7)
20using RegexToken = EmbeddedSyntaxToken<RegexKind>; 85case RegexKind.CaptureGrouping: 90case RegexKind.BalancingGrouping: 95case RegexKind.ConditionalExpressionGrouping: 104case RegexKind.SimpleGrouping: 108case RegexKind.NestedOptionsGrouping: 185if (token.Kind == RegexKind.NumberToken)
EmbeddedLanguages\RegularExpressions\RegexParser.cs (124)
20using RegexAlternatingSequenceList = EmbeddedSeparatedSyntaxNodeList<RegexKind, RegexNode, RegexSequenceNode>; 21using RegexNodeOrToken = EmbeddedSyntaxNodeOrToken<RegexKind, RegexNode>; 22using RegexToken = EmbeddedSyntaxToken<RegexKind>; 169Debug.Assert(_currentToken.Kind == RegexKind.EndOfFile); 267while (_currentToken.Kind == RegexKind.BarToken) 313if (current.Kind != RegexKind.Text) 383RegexKind.TextToken, startTextNode.TextToken.LeadingTrivia, totalText))); 392if (next.Kind == RegexKind.Text) 418if (_currentToken.Kind == RegexKind.EndOfFile) 423if (_currentToken.Kind == RegexKind.BarToken) 428if (_currentToken.Kind == RegexKind.CloseParenToken) 439if (current.Kind == RegexKind.SimpleOptionsGrouping) 447RegexKind.AsteriskToken => ParseZeroOrMoreQuantifier(current), 448RegexKind.PlusToken => ParseOneOrMoreQuantifier(current), 449RegexKind.QuestionToken => ParseZeroOrOneQuantifier(current), 450RegexKind.OpenBraceToken => TryParseNumericQuantifier(current, _currentToken), 457if (_currentToken.Kind != RegexKind.QuestionToken) 543if (_currentToken.Kind == RegexKind.CommaToken) 575if (_currentToken.Kind != RegexKind.CloseBraceToken) 595RegexKind.DotToken => ParseWildcard(), 596RegexKind.CaretToken => ParseStartAnchor(), 597RegexKind.DollarToken => ParseEndAnchor(), 598RegexKind.BackslashToken => ParseEscape(_currentToken, allowTriviaAfterEnd: true), 599RegexKind.OpenBracketToken => ParseCharacterClass(), 600RegexKind.OpenParenToken => ParseGrouping(inConditionalExpression: false), 601RegexKind.CloseParenToken => ParseUnexpectedCloseParenToken(), 602RegexKind.OpenBraceToken => ParsePossibleUnexpectedNumericQuantifier(lastExpression), 603RegexKind.AsteriskToken or RegexKind.PlusToken or RegexKind.QuestionToken => ParseUnexpectedQuantifier(lastExpression), 613var openBraceToken = _currentToken.With(kind: RegexKind.TextToken); 631var token = _currentToken.With(kind: RegexKind.TextToken).AddDiagnosticIfNone( 647return new RegexTextNode(token.With(kind: RegexKind.TextToken)); 653return new RegexAnchorNode(RegexKind.EndAnchor, ConsumeCurrentToken(allowTrivia: true)); 659return new RegexAnchorNode(RegexKind.StartAnchor, ConsumeCurrentToken(allowTrivia: true)); 678case RegexKind.QuestionToken: 692case RegexKind.CloseParenToken: 697return CreateMissingToken(RegexKind.CloseParenToken).AddDiagnosticIfNone( 725=> token.Kind == RegexKind.EndOfFile 731return token.Kind == RegexKind.EndOfFile 754case RegexKind.LessThanToken: 758case RegexKind.SingleQuoteToken: 763case RegexKind.OpenParenToken: 767case RegexKind.ColonToken: 770case RegexKind.EqualsToken: 773case RegexKind.ExclamationToken: 776case RegexKind.GreaterThanToken: 780if (_currentToken.Kind != RegexKind.CloseParenToken) 812if (capture.Kind == RegexKind.NumberToken) 823if (_currentToken.Kind == RegexKind.CloseParenToken) 835innerCloseParenToken = CreateMissingToken(RegexKind.CloseParenToken); 856if (_currentToken.Kind != RegexKind.CloseParenToken) 885if (_currentToken.Kind != RegexKind.EndOfFile) 938Debug.Assert(_currentToken.Kind == RegexKind.OpenParenToken); 972case RegexKind.EqualsToken: 977case RegexKind.ExclamationToken: 1006captureToken = CreateMissingToken(RegexKind.CaptureNameToken); 1008if (_currentToken.Kind == RegexKind.MinusToken) 1026if (capture.Kind == RegexKind.NumberToken && (int)capture.Value == 0) 1036if (_currentToken.Kind == RegexKind.MinusToken) 1054if ((openToken.Kind == RegexKind.LessThanToken && _currentToken.Kind == RegexKind.GreaterThanToken) || 1055(openToken.Kind == RegexKind.SingleQuoteToken && _currentToken.Kind == RegexKind.SingleQuoteToken)) 1060if (_currentToken.Kind == RegexKind.EndOfFile) 1077openToken.Kind == RegexKind.LessThanToken 1078? RegexKind.GreaterThanToken : RegexKind.SingleQuoteToken); 1099secondCapture = CreateMissingToken(RegexKind.CaptureNameToken); 1123if (captureToken.Kind == RegexKind.NumberToken) 1172case RegexKind.CloseParenToken: 1179case RegexKind.ColonToken: 1185CreateMissingToken(RegexKind.CloseParenToken).AddDiagnosticIfNone( 1197=> currentToken.Kind == RegexKind.TextToken && currentToken.VirtualChars.Length == 1 && currentToken.VirtualChars[0].Value == ch; 1244Debug.Assert(openBracketToken.Kind == RegexKind.OpenBracketToken); 1245var caretToken = CreateMissingToken(RegexKind.CaretToken); 1246var closeBracketToken = CreateMissingToken(RegexKind.CloseBracketToken); 1250if (_currentToken.Kind == RegexKind.CaretToken) 1263while (_currentToken.Kind != RegexKind.EndOfFile) 1267if (_currentToken.Kind == RegexKind.CloseBracketToken && builder.Count > 0) 1298if (left.Kind is RegexKind.CharacterClassEscape or RegexKind.CategoryEscape || 1307if (_currentToken.Kind == RegexKind.MinusToken && !_lexer.IsAt("]")) 1312if (_currentToken.Kind == RegexKind.OpenBracketToken) 1363case RegexKind.SimpleEscape: 1368case RegexKind.ControlEscape: 1384case RegexKind.OctalEscape: 1388case RegexKind.HexEscape: 1392case RegexKind.UnicodeEscape: 1396case RegexKind.Text: 1400case RegexKind.Sequence: 1491if (_currentToken.Kind == RegexKind.BackslashToken && _lexer.Position < _lexer.Text.Length) 1533backslashToken, ConsumeCurrentToken(allowTrivia: false).With(kind: RegexKind.TextToken)); 1549_currentToken.Kind == RegexKind.MinusToken && 1560ConsumeCurrentToken(allowTrivia: false).With(kind: RegexKind.TextToken)); 1567if (_currentToken.Kind is not RegexKind.CloseBracketToken and not RegexKind.EndOfFile) 1589if (_currentToken.Kind == RegexKind.EndOfFile) 1594return new RegexSimpleEscapeNode(backslashToken, CreateMissingToken(RegexKind.TextToken)); 1635if (_currentToken.Kind == RegexKind.EndOfFile) 1640return new RegexSimpleEscapeNode(backslashToken, CreateMissingToken(RegexKind.TextToken)); 1709RegexKind.NumberToken, [], 1771return new RegexSimpleEscapeNode(backslashToken, typeToken.With(kind: RegexKind.TextToken)); 1790openToken = CreateMissingToken(RegexKind.LessThanToken); 1791capture = CreateMissingToken(RegexKind.CaptureNameToken); 1792closeToken = CreateMissingToken(RegexKind.GreaterThanToken); 1798(_currentToken.Kind == RegexKind.LessThanToken || _currentToken.Kind == RegexKind.SingleQuoteToken)) 1809? CreateMissingToken(RegexKind.CaptureNameToken) 1814closeToken = CreateMissingToken(RegexKind.GreaterThanToken); 1817((openToken.Kind == RegexKind.LessThanToken && _currentToken.Kind == RegexKind.GreaterThanToken) || 1818(openToken.Kind == RegexKind.SingleQuoteToken && _currentToken.Kind == RegexKind.SingleQuoteToken))) 1863var typeToken = ConsumeCurrentToken(allowTrivia: allowTriviaAfterEnd).With(kind: RegexKind.TextToken); 1897if (_currentToken.Kind == RegexKind.EndOfFile) 1902return new RegexControlEscapeNode(backslashToken, typeToken, CreateMissingToken(RegexKind.TextToken)); 1934var controlToken = ConsumeCurrentToken(allowTrivia: allowTriviaAfterEnd).With(kind: RegexKind.TextToken); 1944return new RegexControlEscapeNode(backslashToken, typeToken, CreateMissingToken(RegexKind.TextToken)); 1964typeToken = typeToken.With(kind: RegexKind.TextToken).AddDiagnosticIfNone(new EmbeddedDiagnostic( 1993if (_currentToken.Kind != RegexKind.OpenBraceToken) 2004if (_currentToken.Kind != RegexKind.CloseBraceToken) 2027return new RegexTextNode(token.With(kind: RegexKind.TextToken)); 2033current.Kind == RegexKind.SimpleOptionsGrouping)
EmbeddedLanguages\RegularExpressions\RegexTree.cs (1)
17ImmutableDictionary<int, TextSpan> captureNumbersToSpan) : EmbeddedSyntaxTree<RegexKind, RegexNode, RegexCompilationUnit>(text, root, diagnostics)