23 references to BackreferenceConditional
System.Text.RegularExpressions.Generator (23)
parent\src\System\Text\RegularExpressions\RegexNode.cs (9)
545
if ((existingChild.Kind is RegexNodeKind.Alternate or RegexNodeKind.
BackreferenceConditional
or RegexNodeKind.ExpressionConditional or RegexNodeKind.Loop or RegexNodeKind.Lazyloop) &&
559
case RegexNodeKind.
BackreferenceConditional
:
646
RegexNodeKind.
BackreferenceConditional
=> ReduceBackreferenceConditional(),
2196
case RegexNodeKind.Alternate or RegexNodeKind.
BackreferenceConditional
or RegexNodeKind.ExpressionConditional:
2229
if (Kind is RegexNodeKind.NegativeLookaround && ContainsKind(Child(0), [RegexNodeKind.Backreference, RegexNodeKind.
BackreferenceConditional
]) is false)
2341
Debug.Assert(Kind == RegexNodeKind.
BackreferenceConditional
);
2883
case RegexNodeKind.
BackreferenceConditional
:
3010
case RegexNodeKind.
BackreferenceConditional
:
3014
int i = Kind == RegexNodeKind.
BackreferenceConditional
? 0 : 1;
parent\src\System\Text\RegularExpressions\RegexParser.cs (5)
1029
return new RegexNode(RegexNodeKind.
BackreferenceConditional
, _options, capnum);
1043
return new RegexNode(RegexNodeKind.
BackreferenceConditional
, _options, tmpCapnum);
2253
if (_group!.Kind is RegexNodeKind.ExpressionConditional or RegexNodeKind.
BackreferenceConditional
)
2268
if (_group!.Kind is RegexNodeKind.ExpressionConditional or RegexNodeKind.
BackreferenceConditional
)
2272
if (_group.Kind == RegexNodeKind.
BackreferenceConditional
&& _group.ChildCount() > 2 || _group.ChildCount() > 3)
parent\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (2)
1102
case RegexNodeKind.
BackreferenceConditional
:
1104
int branchStart = node.Kind is RegexNodeKind.
BackreferenceConditional
? 0 : 1;
parent\src\System\Text\RegularExpressions\RegexTreeAnalyzer.cs (1)
94
RegexNodeKind.Alternate or RegexNodeKind.
BackreferenceConditional
or RegexNodeKind.ExpressionConditional => true,
RegexGenerator.Emitter.cs (6)
2274
Debug.Assert(node.Kind is RegexNodeKind.
BackreferenceConditional
, $"Unexpected type: {node.Kind}");
2996
case RegexNodeKind.
BackreferenceConditional
:
5619
RegexNodeKind.
BackreferenceConditional
=> $"Conditionally match one of two expressions depending on whether the {DescribeCapture(node.M, rm)} matched.",
5771
RegexNodeKind.Concatenate when node.Parent is not { Kind: RegexNodeKind.Alternate or RegexNodeKind.
BackreferenceConditional
or RegexNodeKind.ExpressionConditional } => true,
5791
RegexNodeKind.
BackreferenceConditional
when node.Parent.Child(0) == node => "Matched: ",
5792
RegexNodeKind.
BackreferenceConditional
when node.Parent.Child(1) == node => "Not Matched: ",