40 references to Capture
System.Text.RegularExpressions (40)
System\Text\RegularExpressions\RegexCompiler.cs (3)
1432Debug.Assert(node.Kind == RegexNodeKind.Capture, "Every generated tree should begin with a capture node"); 2387Debug.Assert(node.Kind is RegexNodeKind.Capture, $"Unexpected type: {node.Kind}"); 2797case RegexNodeKind.Capture:
System\Text\RegularExpressions\RegexNode.cs (16)
243Debug.Assert(Kind == RegexNodeKind.Capture, "Every generated tree should begin with a capture node"); 302case RegexNodeKind.Capture: 372Debug.Assert(rootNode.Kind == RegexNodeKind.Capture); 495case RegexNodeKind.Capture: 919case RegexNodeKind.PositiveLookaround when ContainsKind(child, [RegexNodeKind.Capture]) is false: 1533case RegexNodeKind.Capture: 1973while (node.Kind is RegexNodeKind.Capture or RegexNodeKind.Concatenate) 2025while (loopChild.Kind is RegexNodeKind.Capture or RegexNodeKind.Concatenate) 2114if (node.Kind is RegexNodeKind.Capture) 2274while (node.Kind is RegexNodeKind.Capture or RegexNodeKind.Concatenate) 2293case RegexNodeKind.Capture: 2490case RegexNodeKind.Capture: 2548case RegexNodeKind.Capture: 2649case RegexNodeKind.Capture: 2788case RegexNodeKind.Capture: 3211case RegexNodeKind.Capture:
System\Text\RegularExpressions\RegexParser.cs (3)
277StartGroup(new RegexNode(RegexNodeKind.Capture, (_options & ~RegexOptions.IgnoreCase), 0, -1)); 763return new RegexNode(RegexNodeKind.Capture, _options, _autocap++, -1); 937return new RegexNode(RegexNodeKind.Capture, _options, capnum, uncapnum);
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (10)
85case RegexNodeKind.Capture: 455case RegexNodeKind.Capture: 492case RegexNodeKind.Capture: 683case RegexNodeKind.Capture: 1031case RegexNodeKind.Capture: 1138while (node.Kind is RegexNodeKind.Atomic or RegexNodeKind.Capture) 1155while (firstChild.Kind is RegexNodeKind.Atomic or RegexNodeKind.Capture) 1224while ((nextChild.Kind is RegexNodeKind.Atomic or RegexNodeKind.Capture or RegexNodeKind.Concatenate) || 1298case RegexNodeKind.Capture: 1361case RegexNodeKind.Capture:
System\Text\RegularExpressions\RegexTreeAnalyzer.cs (2)
70case RegexNodeKind.Capture: 101RegexNodeKind.Capture => true,
System\Text\RegularExpressions\RegexWriter.cs (2)
343case RegexNodeKind.Capture | BeforeChild: 347case RegexNodeKind.Capture | AfterChild:
System\Text\RegularExpressions\Symbolic\RegexNodeConverter.cs (4)
88case RegexNodeKind.Capture when node.N == -1: // N == -1 because balancing groups (which have N >= 0) aren't supported 183RegexNodeKind.Capture => SR.ExpressionDescription_BalancingGroup, 267Debug.Assert(node.Kind == RegexNodeKind.Capture && node.N == -1); 285Debug.Assert(rootResult.Count == 1 || root.Kind == RegexNodeKind.Concatenate || root.Kind == RegexNodeKind.Capture);