25 writes to Kind
System.Text.RegularExpressions.Generator (25)
parent\src\System\Text\RegularExpressions\RegexNode.cs (25)
53
Kind
= kind;
59
Kind
= kind;
66
Kind
= kind;
73
Kind
= kind;
80
Kind
= kind;
152
Kind
+= kind - RegexNodeKind.One;
172
Kind
+= RegexNodeKind.Oneloopatomic - RegexNodeKind.Oneloop;
179
Kind
+= RegexNodeKind.Oneloopatomic - RegexNodeKind.Onelazy;
189
Kind
= RegexNodeKind.Empty;
197
Kind
= RegexNodeKind.Multi;
208
Kind
= RegexNodeKind.Atomic;
228
Kind
= RegexNodeKind.Empty;
1018
Kind
= RegexNodeKind.Nothing;
1025
Kind
=
1035
Kind
=
1210
prev.
Kind
= RegexNodeKind.Set;
1497
node.
Kind
= RegexNodeKind.Empty;
1506
node.
Kind
= RegexNodeKind.Empty;
1511
node.
Kind
= RegexNodeKind.One;
1836
prev.
Kind
= RegexNodeKind.Multi;
1981
nextNode.
Kind
= RegexNodeKind.One;
2004
currentNode.
Kind
= nextNode.Kind;
2126
node.
Kind
-= RegexNodeKind.Onelazy - RegexNodeKind.Oneloop; // lazy to greedy
2290
Kind
= RegexNodeKind.Nothing;
3303
Kind
= RegexNodeKind.Multi;
290 references to Kind
System.Text.RegularExpressions.Generator (290)
parent\src\System\Text\RegularExpressions\RegexNode.cs (173)
89
Debug.Assert(
Kind
is RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or
95
new RegexNode(
Kind
, Options, Str!) :
96
new RegexNode(
Kind
, Options, Ch);
138
Kind
== RegexNodeKind.Concatenate &&
167
switch (
Kind
)
193
else if (
Kind
== RegexNodeKind.Oneloopatomic && N is >= 2 and <= MultiVsRepeaterLimit)
205
if (Parent is not {
Kind
: RegexNodeKind.Atomic })
233
Debug.Fail($"Unexpected type: {
Kind
}");
372
Debug.Assert(rootNode.
Kind
== RegexNodeKind.Capture);
427
switch (node.
Kind
)
440
if (node.Parent is {
Kind
: RegexNodeKind.Concatenate } parent)
518
switch (node.
Kind
)
545
if ((existingChild.
Kind
is RegexNodeKind.Alternate or RegexNodeKind.BackreferenceConditional or RegexNodeKind.ExpressionConditional or RegexNodeKind.Loop or RegexNodeKind.Lazyloop) &&
546
node.Parent is not {
Kind
: RegexNodeKind.Atomic }) // validate grandparent isn't atomic
568
if (node.
Kind
!= RegexNodeKind.ExpressionConditional) // ReduceExpressionConditional will have already applied ending backtracking removal
589
Debug.Assert(node.
Kind
is RegexNodeKind.Atomic or RegexNodeKind.Empty or RegexNodeKind.Loop or RegexNodeKind.Lazyloop);
591
if (node.
Kind
is RegexNodeKind.Atomic)
594
Debug.Assert(node.
Kind
is RegexNodeKind.Loop or RegexNodeKind.Lazyloop);
597
if (node.
Kind
is RegexNodeKind.Loop or RegexNodeKind.Lazyloop)
624
switch (
Kind
)
636
return
Kind
switch
659
Debug.Assert(
Kind
is RegexNodeKind.Alternate or RegexNodeKind.Concatenate);
662
0 => new RegexNode(
Kind
== RegexNodeKind.Alternate ? RegexNodeKind.Nothing : RegexNodeKind.Empty, Options),
676
Debug.Assert(
Kind
== RegexNodeKind.Group);
679
while (u.
Kind
== RegexNodeKind.Group)
704
Debug.Assert(
Kind
== RegexNodeKind.Atomic);
709
while (child.
Kind
== RegexNodeKind.Atomic)
715
switch (child.
Kind
)
759
if (branches[0].
Kind
== RegexNodeKind.Empty)
770
if (branches[i].
Kind
== RegexNodeKind.Empty)
851
(child.Child(0).
Kind
is RegexNodeKind.Empty || child.Child(1).
Kind
is RegexNodeKind.Empty); // can be transformed into a ? or ??
866
return child.
Kind
== RegexNodeKind.Empty ?
881
Debug.Assert(
Kind
is RegexNodeKind.Loop or RegexNodeKind.Lazyloop);
884
RegexNodeKind kind =
Kind
;
894
if (child.
Kind
!= kind)
899
switch (child.
Kind
)
913
switch (child.
Kind
)
960
switch (child.
Kind
)
965
child.MakeRep(u.
Kind
== RegexNodeKind.Lazyloop ? RegexNodeKind.Onelazy : RegexNodeKind.Oneloop, u.M, u.N);
1013
Debug.Assert(
Kind
is RegexNodeKind.Set or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy);
1026
Kind
== RegexNodeKind.Set ? RegexNodeKind.One :
1027
Kind
== RegexNodeKind.Setloop ? RegexNodeKind.Oneloop :
1028
Kind
== RegexNodeKind.Setloopatomic ? RegexNodeKind.Oneloopatomic :
1036
Kind
== RegexNodeKind.Set ? RegexNodeKind.Notone :
1037
Kind
== RegexNodeKind.Setloop ? RegexNodeKind.Notoneloop :
1038
Kind
== RegexNodeKind.Setloopatomic ? RegexNodeKind.Notoneloopatomic :
1073
Debug.Assert(
Kind
== RegexNodeKind.Alternate);
1086
if (node.
Kind
== RegexNodeKind.Alternate)
1089
if (node.
Kind
== RegexNodeKind.Alternate)
1092
if (node.
Kind
== RegexNodeKind.Alternate)
1100
if (node.
Kind
is RegexNodeKind.Alternate && node.ChildCount() == 2)
1102
if (node.Child(1).
Kind
is RegexNodeKind.Empty)
1106
else if (node.Child(0).
Kind
is RegexNodeKind.Empty)
1143
if (at.
Kind
== RegexNodeKind.Alternate)
1161
else if (at.
Kind
is RegexNodeKind.Set or RegexNodeKind.One)
1166
if (at.
Kind
== RegexNodeKind.Set)
1190
if (prev.
Kind
== RegexNodeKind.One)
1200
if (at.
Kind
== RegexNodeKind.One)
1217
else if (at.
Kind
== RegexNodeKind.Nothing)
1241
Debug.Assert(alternation.
Kind
== RegexNodeKind.Alternate);
1260
RegexNode required = startingNode.
Kind
== RegexNodeKind.Concatenate ? startingNode.Child(0) : startingNode;
1261
switch (required.
Kind
)
1281
RegexNode other = endingNode.
Kind
== RegexNodeKind.Concatenate ? endingNode.Child(0) : endingNode;
1282
if (required.
Kind
!= other.
Kind
||
1303
if (children[i].
Kind
== RegexNodeKind.Concatenate)
1316
if (alternation.Parent is RegexNode {
Kind
: RegexNodeKind.Atomic })
1341
Debug.Assert(node.
Kind
== RegexNodeKind.Alternate);
1350
switch (child.
Kind
)
1384
Debug.Assert(alternation.
Kind
== RegexNodeKind.Alternate);
1414
if (startingNode.
Kind
== RegexNodeKind.One)
1434
if (startingNode.
Kind
== RegexNodeKind.One)
1448
Debug.Assert(startingNode.
Kind
== RegexNodeKind.Multi);
1485
ProcessOneOrMulti(branch.
Kind
== RegexNodeKind.Concatenate ? branch.Child(0) : branch, startingSpan);
1493
if (node.
Kind
== RegexNodeKind.One)
1502
Debug.Assert(node.
Kind
== RegexNodeKind.Multi);
1523
if (alternation.Parent is RegexNode parent && parent.
Kind
== RegexNodeKind.Atomic)
1550
RegexNode branch =
Kind
== RegexNodeKind.Concatenate ? Child(0) : this;
1551
return branch.
Kind
is RegexNodeKind.One or RegexNodeKind.Multi ? branch : null;
1557
Debug.Assert(
Kind
is RegexNodeKind.One or RegexNodeKind.Multi || (IsOneFamily && M > 0));
1572
Debug.Assert(
Kind
is RegexNodeKind.Alternate);
1596
if (startingLiteralNode.IsOneFamily || startingLiteralNode.
Kind
is RegexNodeKind.Multi)
1640
switch (node.
Kind
)
1675
switch (node.
Kind
)
1742
Debug.Assert(
Kind
== RegexNodeKind.Concatenate);
1758
if (child.
Kind
== RegexNodeKind.Nothing)
1784
Debug.Assert(
Kind
== RegexNodeKind.Concatenate);
1801
if (at.
Kind
== RegexNodeKind.Concatenate &&
1820
else if (at.
Kind
is RegexNodeKind.Multi or RegexNodeKind.One)
1834
if (prev.
Kind
== RegexNodeKind.One)
1841
((at.
Kind
== RegexNodeKind.One) ? $"{prev.Str}{at.Ch}" : prev.Str + at.Str) :
1842
((at.
Kind
== RegexNodeKind.One) ? $"{at.Ch}{prev.Str}" : at.Str + prev.Str);
1844
else if (at.
Kind
== RegexNodeKind.Empty)
1867
Debug.Assert(
Kind
== RegexNodeKind.Concatenate);
1902
switch (currentNode.
Kind
)
1905
case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy when nextNode.
Kind
== currentNode.
Kind
&& currentNode.Ch == nextNode.Ch:
1906
case RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy when nextNode.
Kind
== currentNode.
Kind
&& currentNode.Str == nextNode.Str:
1908
currentNode.
Kind
is RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloopatomic)
1931
case RegexNodeKind.Oneloop or RegexNodeKind.Onelazy when nextNode.
Kind
== RegexNodeKind.One && currentNode.Ch == nextNode.Ch:
1932
case RegexNodeKind.Notoneloop or RegexNodeKind.Notonelazy when nextNode.
Kind
== RegexNodeKind.Notone && currentNode.Ch == nextNode.Ch:
1933
case RegexNodeKind.Setloop or RegexNodeKind.Setlazy when nextNode.
Kind
== RegexNodeKind.Set && currentNode.Str == nextNode.Str:
1948
nextNode.
Kind
== RegexNodeKind.Multi &&
1999
case RegexNodeKind.One when (nextNode.
Kind
is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy) && currentNode.Ch == nextNode.Ch:
2000
case RegexNodeKind.Notone when (nextNode.
Kind
is RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy) && currentNode.Ch == nextNode.Ch:
2001
case RegexNodeKind.Set when (nextNode.
Kind
is RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy) && currentNode.Str == nextNode.Str:
2004
currentNode.Kind = nextNode.
Kind
;
2014
case RegexNodeKind.Notone when nextNode.
Kind
== currentNode.
Kind
&& currentNode.Ch == nextNode.Ch:
2015
case RegexNodeKind.Set when nextNode.
Kind
== RegexNodeKind.Set && currentNode.Str == nextNode.Str:
2026
when nextNode.
Kind
== currentNode.
Kind
:
2069
if (
Kind
is not RegexNodeKind.Concatenate)
2093
while (node.
Kind
is RegexNodeKind.Capture or RegexNodeKind.Concatenate)
2099
switch (node.
Kind
)
2145
while (loopChild.
Kind
is RegexNodeKind.Capture or RegexNodeKind.Concatenate)
2156
if (loopChild.
Kind
is
2164
else if (node.
Kind
is RegexNodeKind.Loop or RegexNodeKind.Lazyloop)
2207
for (int b = node.
Kind
== RegexNodeKind.ExpressionConditional ? 1 : 0; b < alternateBranches; b++)
2221
Debug.Assert(
Kind
is RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround);
2229
if (
Kind
is RegexNodeKind.NegativeLookaround && ContainsKind(Child(0), [RegexNodeKind.Backreference, RegexNodeKind.BackreferenceConditional]) is false)
2244
if (node is {
Kind
: RegexNodeKind.Capture, N: -1 })
2275
if (
Kind
is RegexNodeKind.PositiveLookaround)
2277
if (((Options & RegexOptions.RightToLeft) == 0 && IsZeroWidthAssertion(child.
Kind
)) ||
2278
child.
Kind
is RegexNodeKind.Empty)
2283
else if (
Kind
is RegexNodeKind.NegativeLookaround)
2288
if (child.
Kind
is RegexNodeKind.Empty)
2313
if (node.
Kind
== kind)
2341
Debug.Assert(
Kind
== RegexNodeKind.BackreferenceConditional);
2359
Debug.Assert(
Kind
== RegexNodeKind.ExpressionConditional);
2377
if (condition.
Kind
== RegexNodeKind.PositiveLookaround && (condition.Options & RegexOptions.RightToLeft) == 0)
2402
Debug.Assert(loopNode.
Kind
is RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop);
2411
switch (literal.
Kind
)
2414
case RegexNodeKind.Set when loopNode.
Kind
is RegexNodeKind.Setloop && RegexCharClass.IsSubsetOf(literal.Str!, loopNode.Str!): // e.g. \d+[0-9]\s
2436
static bool CharInLoopSet(RegexNode loopNode, char ch) => loopNode.
Kind
switch
2462
while (node.
Kind
is RegexNodeKind.Capture or RegexNodeKind.Concatenate)
2476
switch (subsequent.
Kind
)
2516
switch (subsequent.
Kind
)
2532
switch (node.
Kind
)
2536
switch (subsequent.
Kind
)
2566
switch (subsequent.
Kind
)
2585
switch (subsequent.
Kind
)
2632
switch (subsequent.
Kind
)
2701
switch (parent?.
Kind
)
2738
public bool IsBacktrackingConstruct =>
Kind
switch
2788
Debug.Assert(node.
Kind
is not RegexNodeKind.Concatenate, "The existing logic assumes that the node itself isn't a concatenation.");
2799
switch (parent.
Kind
)
2841
switch (
Kind
)
2936
Debug.Fail($"Unknown node: {
Kind
}");
2954
switch (
Kind
)
3014
int i =
Kind
== RegexNodeKind.BackreferenceConditional ? 0 : 1;
3073
Debug.Fail($"Unknown node: {
Kind
}");
3105
Debug.Assert(
Kind
== RegexNodeKind.Concatenate, $"Expected Concatenate, got {
Kind
}");
3127
while (child.
Kind
is RegexNodeKind.Capture or RegexNodeKind.Atomic)
3133
if (child.
Kind
is RegexNodeKind.One)
3146
else if (child.
Kind
is RegexNodeKind.Multi)
3158
else if (child.
Kind
is RegexNodeKind.Set ||
3159
(child.
Kind
is RegexNodeKind.Setloop or RegexNodeKind.Setlazy or RegexNodeKind.Setloopatomic && child.M == child.N))
3168
vsb.Append((char)(twoChars[0] | 0x20), child.
Kind
is RegexNodeKind.Set ? 1 : child.M);
3170
else if (child.
Kind
is RegexNodeKind.Concatenate)
3190
else if (child.
Kind
is RegexNodeKind.Empty)
3195
else if (consumeZeroWidthNodes && IsZeroWidthAssertion(child.
Kind
))
3241
Debug.Assert(
Kind
== RegexNodeKind.Concatenate, $"Expected Concatenate, got {
Kind
}");
3243
static bool CanJoinLengthCheck(RegexNode node) => node.
Kind
switch
3297
case <= MultiVsRepeaterLimit when
Kind
== RegexNodeKind.One:
3310
switch (
Kind
)
3450
public bool IsSetFamily =>
Kind
is RegexNodeKind.Set or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy;
3453
public bool IsOneFamily =>
Kind
is RegexNodeKind.One or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy;
3456
public bool IsNotoneFamily =>
Kind
is RegexNodeKind.Notone or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy;
parent\src\System\Text\RegularExpressions\RegexParser.cs (6)
1075
if (_group!.
Kind
!= RegexNodeKind.ExpressionConditional || _group.ChildCount() > 0)
1217
if (result != null && result.
Kind
== RegexNodeKind.Backreference && (result.Options & RegexOptions.IgnoreCase) != 0)
2228
if (_group.
Kind
== RegexNodeKind.ExpressionConditional && _group.ChildCount() == 0)
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 (27)
80
switch (node.
Kind
)
114
int reps = node.
Kind
is RegexNodeKind.One ? 1 : Math.Min(node.M, MaxPrefixLength);
119
return node.
Kind
is RegexNodeKind.One || reps == node.N;
164
int reps = node.
Kind
is RegexNodeKind.Set ? 1 : Math.Min(node.M, MaxPrefixLength);
209
return node.
Kind
is RegexNodeKind.Set || reps == node.N;
360
switch (node.
Kind
)
489
switch (node.
Kind
)
598
switch (node.
Kind
)
950
switch (node.
Kind
)
959
return node.
Kind
is RegexNodeKind.One || node.M > 0 ? true : null;
977
return node.
Kind
is RegexNodeKind.Notone || node.M > 0 ? true : null;
996
node.
Kind
is RegexNodeKind.Set || node.M > 0 ? true :
1104
int branchStart = node.
Kind
is RegexNodeKind.BackreferenceConditional ? 0 : 1;
1118
Debug.Fail($"Unexpected node {node.
Kind
}");
1138
while (node.
Kind
is RegexNodeKind.Atomic or RegexNodeKind.Capture)
1142
if (node.
Kind
!= RegexNodeKind.Concatenate)
1155
while (firstChild.
Kind
is RegexNodeKind.Atomic or RegexNodeKind.Capture)
1159
if (firstChild.
Kind
is not (RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy) || firstChild.N != int.MaxValue)
1167
if (nextChild.
Kind
== RegexNodeKind.UpdateBumpalong)
1224
while ((nextChild.
Kind
is RegexNodeKind.Atomic or RegexNodeKind.Capture or RegexNodeKind.Concatenate) ||
1225
(nextChild.
Kind
is RegexNodeKind.Loop or RegexNodeKind.Lazyloop && nextChild.M >= 1))
1233
(nextChild.
Kind
is RegexNodeKind.Set || nextChild.M >= 1))
1277
switch (node.
Kind
)
1349
switch (node.
Kind
)
1358
return node.
Kind
;
1386
switch (tmpChild.
Kind
)
1416
if (node.Child(i).
Kind
is not (RegexNodeKind.Empty or RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround))
parent\src\System\Text\RegularExpressions\RegexTreeAnalyzer.cs (2)
55
switch (node.
Kind
)
86
bool treatChildAsAtomic = (isAtomicByAncestor | isAtomicBySelf) && node.
Kind
switch
RegexGenerator.cs (1)
373
if (node.
Kind
is RegexNodeKind.Backreference && (node.Options & RegexOptions.IgnoreCase) != 0)
RegexGenerator.Emitter.cs (81)
760
if (root.
Kind
is RegexNodeKind.Empty)
769
else if (root.
Kind
is RegexNodeKind.Nothing)
775
else if (root.
Kind
is RegexNodeKind.Multi or RegexNodeKind.One or RegexNodeKind.Notone or RegexNodeKind.Set)
784
writer.WriteLine($"int end = base.runtextpos = start {(!rtl ? "+" : "-")} {(root.
Kind
== RegexNodeKind.Multi ? root.Str!.Length : 1)};");
1503
Debug.Assert(target.LoopNode.
Kind
is RegexNodeKind.Setloop or RegexNodeKind.Setlazy or RegexNodeKind.Setloopatomic);
1625
Debug.Assert(node.
Kind
== RegexNodeKind.Capture, "Every generated tree should begin with a capture node");
1807
Debug.Assert(node.
Kind
is RegexNodeKind.Alternate, $"Unexpected type: {node.
Kind
}");
1907
switch (child.
Kind
)
1922
case RegexNodeKind.Concatenate when child.Child(0) == startingLiteralNode && (startingLiteralNode.
Kind
is RegexNodeKind.One or RegexNodeKind.Set or RegexNodeKind.Multi):
1932
child.Child(0).
Kind
is RegexNodeKind.Multi ?
1978
Debug.Assert(multi.
Kind
is RegexNodeKind.Multi, $"Expected a Multi node, got {multi.
Kind
}");
2205
Debug.Assert(node.
Kind
is RegexNodeKind.Backreference, $"Unexpected type: {node.
Kind
}");
2274
Debug.Assert(node.
Kind
is RegexNodeKind.BackreferenceConditional, $"Unexpected type: {node.
Kind
}");
2287
RegexNode? noBranch = node.Child(1) is {
Kind
: not RegexNodeKind.Empty } childNo ? childNo : null;
2447
Debug.Assert(node.
Kind
is RegexNodeKind.ExpressionConditional, $"Unexpected type: {node.
Kind
}");
2463
RegexNode? noBranch = node.Child(2) is {
Kind
: not RegexNodeKind.Empty } childNo ? childNo : null;
2627
Debug.Assert(node.
Kind
is RegexNodeKind.Capture, $"Unexpected type: {node.
Kind
}");
2720
Debug.Assert(node.
Kind
is RegexNodeKind.PositiveLookaround, $"Unexpected type: {node.
Kind
}");
2761
Debug.Assert(node.
Kind
is RegexNodeKind.NegativeLookaround, $"Unexpected type: {node.
Kind
}");
2891
switch (node.
Kind
)
2919
switch (node.
Kind
)
2956
switch (node.
Kind
)
3024
Debug.Fail($"Unexpected node type: {node.
Kind
}");
3030
Debug.Assert(node.
Kind
is RegexNodeKind.Atomic or RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround or RegexNodeKind.ExpressionConditional, $"Unexpected type: {node.
Kind
}");
3031
Debug.Assert(node.
Kind
is RegexNodeKind.ExpressionConditional ? node.ChildCount() >= 1 : node.ChildCount() == 1, $"Unexpected number of children: {node.ChildCount()}");
3033
Debug.Assert(node.
Kind
is RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround or RegexNodeKind.ExpressionConditional || rm.Analysis.MayBacktrack(node.Child(0)), "Expected lookaround/conditional or a child that may backtrack");
3060
Debug.Assert(node.
Kind
is RegexNodeKind.UpdateBumpalong, $"Unexpected type: {node.
Kind
}");
3072
Debug.Assert(node.
Kind
is RegexNodeKind.Concatenate, $"Unexpected type: {node.
Kind
}");
3120
else if (child.
Kind
is RegexNodeKind.Multi)
3131
int repeatCount = child.
Kind
is RegexNodeKind.One or RegexNodeKind.Notone or RegexNodeKind.Set ? 1 : child.M;
3189
if (next.
Kind
is not RegexNodeKind.UpdateBumpalong) // skip node types that don't have a semantic impact
3202
Debug.Assert(node.IsOneFamily || node.IsNotoneFamily || node.IsSetFamily, $"Unexpected type: {node.
Kind
}");
3246
Debug.Assert(node.
Kind
is RegexNodeKind.Boundary or RegexNodeKind.NonBoundary or RegexNodeKind.ECMABoundary or RegexNodeKind.NonECMABoundary, $"Unexpected kind: {node.
Kind
}");
3248
string negation = node.
Kind
is RegexNodeKind.Boundary or RegexNodeKind.ECMABoundary ? "!" : "";
3251
switch (node.
Kind
)
3286
Debug.Assert(node.
Kind
is RegexNodeKind.Beginning or RegexNodeKind.Start or RegexNodeKind.Bol or RegexNodeKind.End or RegexNodeKind.EndZ or RegexNodeKind.Eol, $"Unexpected type: {node.
Kind
}");
3290
switch (node.
Kind
)
3302
using (EmitBlock(writer, node.
Kind
== RegexNodeKind.Beginning ?
3352
Debug.Assert(node.
Kind
is RegexNodeKind.Multi, $"Unexpected type: {node.
Kind
}");
3401
Debug.Assert(node.
Kind
is RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop, $"Unexpected type: {node.
Kind
}");
3498
string condition = literalNode.
Kind
switch
3579
Debug.Assert(node.
Kind
is RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy, $"Unexpected type: {node.
Kind
}");
3680
node.
Kind
is RegexNodeKind.Notonelazy &&
3747
node.
Kind
is RegexNodeKind.Setlazy &&
3826
Debug.Assert(node.
Kind
is RegexNodeKind.Lazyloop, $"Unexpected type: {node.
Kind
}");
4132
Debug.Assert(node.IsOneFamily || node.IsNotoneFamily || node.IsSetFamily, $"Unexpected type: {node.
Kind
}");
4252
Debug.Assert(node.
Kind
is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic, $"Unexpected type: {node.
Kind
}");
4384
Debug.Assert(node.
Kind
is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic, $"Unexpected type: {node.
Kind
}");
4422
Debug.Assert(node.
Kind
is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.
Kind
}");
4426
Debug.Assert(!rm.Analysis.MayBacktrack(node.Child(0)), $"Expected non-backtracking node {node.
Kind
}");
4442
Debug.Assert(node.
Kind
is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.
Kind
}");
5064
if (node.
Kind
== RegexNodeKind.Multi)
5587
return node.
Kind
switch
5603
RegexNodeKind.Loop or RegexNodeKind.Lazyloop => node.M == 0 && node.N == 1 ? $"Optional ({(node.
Kind
is RegexNodeKind.Loop ? "greedy" : "lazy")})." : $"Loop {DescribeLoop(node, rm)}{direction}.",
5621
_ => $"Unknown node type {node.
Kind
}",
5767
bool skip = node.
Kind
switch
5771
RegexNodeKind.Concatenate when node.Parent is not {
Kind
: RegexNodeKind.Alternate or RegexNodeKind.BackreferenceConditional or RegexNodeKind.ExpressionConditional } => true,
5774
RegexNodeKind.Atomic when node.Child(0).
Kind
is RegexNodeKind.Loop or RegexNodeKind.Lazyloop or RegexNodeKind.Alternate => true,
5785
string tag = node.Parent?.
Kind
switch
5829
string style = node.
Kind
switch