49 references to Concatenate
System.Text.RegularExpressions.Generator (49)
RegexGenerator.Emitter.cs (5)
1920case RegexNodeKind.Concatenate when child.Child(0) == startingLiteralNode && (startingLiteralNode.Kind is RegexNodeKind.One or RegexNodeKind.Set or RegexNodeKind.Multi): 2907case RegexNodeKind.Concatenate: 3070Debug.Assert(node.Kind is RegexNodeKind.Concatenate, $"Unexpected type: {node.Kind}"); 5549RegexNodeKind.Concatenate => "Match a sequence of expressions.", 5723RegexNodeKind.Concatenate when node.Parent is not { Kind: RegexNodeKind.Alternate or RegexNodeKind.BackreferenceConditional or RegexNodeKind.ExpressionConditional } => true,
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (31)
138Kind == RegexNodeKind.Concatenate && 318case RegexNodeKind.Concatenate: 419case RegexNodeKind.Concatenate: 426if (node.Parent is { Kind: RegexNodeKind.Concatenate } parent) 496case RegexNodeKind.Concatenate when !rtl: 593RegexNodeKind.Concatenate => ReduceConcatenation(), 612Debug.Assert(Kind is RegexNodeKind.Alternate or RegexNodeKind.Concatenate); 1205RegexNode required = startingNode.Kind == RegexNodeKind.Concatenate ? startingNode.Child(0) : startingNode; 1226RegexNode other = endingNode.Kind == RegexNodeKind.Concatenate ? endingNode.Child(0) : endingNode; 1248if (children[i].Kind == RegexNodeKind.Concatenate) 1270var newConcat = new RegexNode(RegexNodeKind.Concatenate, alternation.Options); 1427ProcessOneOrMulti(branch.Kind == RegexNodeKind.Concatenate ? branch.Child(0) : branch, startingSpan); 1472var newConcat = new RegexNode(RegexNodeKind.Concatenate, startingNodeOptions); 1492RegexNode branch = Kind == RegexNodeKind.Concatenate ? Child(0) : this; 1594case RegexNodeKind.Concatenate: 1684Debug.Assert(Kind == RegexNodeKind.Concatenate); 1726Debug.Assert(Kind == RegexNodeKind.Concatenate); 1743if (at.Kind == RegexNodeKind.Concatenate && 1809Debug.Assert(Kind == RegexNodeKind.Concatenate); 2011if (Kind is not RegexNodeKind.Concatenate) 2035while (node.Kind is RegexNodeKind.Capture or RegexNodeKind.Concatenate) 2087while (loopChild.Kind is RegexNodeKind.Capture or RegexNodeKind.Concatenate) 2346while (node.Kind is RegexNodeKind.Capture or RegexNodeKind.Concatenate) 2364case RegexNodeKind.Concatenate: 2566case RegexNodeKind.Concatenate: 2651Debug.Assert(node.Kind is not RegexNodeKind.Concatenate, "The existing logic assumes that the node itself isn't a concatenation."); 2670case RegexNodeKind.Concatenate: 2754case RegexNodeKind.Concatenate: 2883case RegexNodeKind.Concatenate: 2960Debug.Assert(Kind == RegexNodeKind.Concatenate, $"Expected Concatenate, got {Kind}"); 3061Debug.Assert(Kind == RegexNodeKind.Concatenate, $"Expected Concatenate, got {Kind}");
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexParser.cs (3)
521_concatenation = new RegexNode(RegexNodeKind.Concatenate, _options); 2098_concatenation = new RegexNode(RegexNodeKind.Concatenate, _options); 2115_concatenation = new RegexNode(RegexNodeKind.Concatenate, _options);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (9)
212case RegexNodeKind.Concatenate: 363case RegexNodeKind.Concatenate: 497case RegexNodeKind.Concatenate: 696case RegexNodeKind.Concatenate: 1050case RegexNodeKind.Concatenate: 1142if (node.Kind != RegexNodeKind.Concatenate) 1224while ((nextChild.Kind is RegexNodeKind.Atomic or RegexNodeKind.Capture or RegexNodeKind.Concatenate) || 1309case RegexNodeKind.Concatenate: 1373case RegexNodeKind.Concatenate:
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexTreeAnalyzer.cs (1)
101RegexNodeKind.Concatenate => i == childCount - 1,