35 references to Capture
System.Text.RegularExpressions.Generator (35)
parent\src\System\Text\RegularExpressions\RegexNode.cs (14)
372Debug.Assert(rootNode.Kind == RegexNodeKind.Capture); 542case RegexNodeKind.Capture: 974case RegexNodeKind.PositiveLookaround when ContainsKind(child, [RegexNodeKind.Capture]) is false: 1653case RegexNodeKind.Capture: 2093while (node.Kind is RegexNodeKind.Capture or RegexNodeKind.Concatenate) 2145while (loopChild.Kind is RegexNodeKind.Capture or RegexNodeKind.Concatenate) 2244if (node is { Kind: RegexNodeKind.Capture, N: -1 }) 2462while (node.Kind is RegexNodeKind.Capture or RegexNodeKind.Concatenate) 2481case RegexNodeKind.Capture: 2705case RegexNodeKind.Capture: 2803case RegexNodeKind.Capture: 2904case RegexNodeKind.Capture: 3043case RegexNodeKind.Capture: 3127while (child.Kind is RegexNodeKind.Capture or RegexNodeKind.Atomic)
parent\src\System\Text\RegularExpressions\RegexParser.cs (3)
277StartGroup(new RegexNode(RegexNodeKind.Capture, (_options & ~RegexOptions.IgnoreCase), 0, -1)); 833return new RegexNode(RegexNodeKind.Capture, _options, _autocap++, -1); 1007return new RegexNode(RegexNodeKind.Capture, _options, capnum, uncapnum);
parent\src\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:
parent\src\System\Text\RegularExpressions\RegexTreeAnalyzer.cs (2)
66case RegexNodeKind.Capture: 97RegexNodeKind.Capture => true,
RegexGenerator.Emitter.cs (6)
1625Debug.Assert(node.Kind == RegexNodeKind.Capture, "Every generated tree should begin with a capture node"); 2627Debug.Assert(node.Kind is RegexNodeKind.Capture, $"Unexpected type: {node.Kind}"); 3009case RegexNodeKind.Capture: 5594RegexNodeKind.Capture when node.M == -1 && node.N != -1 => $"Non-capturing balancing group. Uncaptures the {DescribeCapture(node.N, rm)}.", 5595RegexNodeKind.Capture when node.N != -1 => $"Balancing group. Captures the {DescribeCapture(node.M, rm)} and uncaptures the {DescribeCapture(node.N, rm)}.", 5596RegexNodeKind.Capture when node.N == -1 => $"{DescribeCapture(node.M, rm)}.",