36 references to Loop
System.Text.RegularExpressions.Generator (36)
RegexGenerator.Emitter.cs (7)
2911case RegexNodeKind.Loop: 4297Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}"); 4317Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}"); 5478RegexNodeKind.Loop or RegexNodeKind.Lazyloop => node.M == 0 && node.N == 1 ? $"Optional ({(node.Kind is RegexNodeKind.Loop ? "greedy" : "lazy")})." : $"Loop {DescribeLoop(node, rm)}{direction}.", 5568RegexNodeKind.Atomic when node.Child(0).Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop or RegexNodeKind.Alternate => true, 5629RegexNodeKind.Loop => rm.Analysis.IsAtomicByAncestor(node) ? "greedily and atomically" : "greedily",
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (15)
264case RegexNodeKind.Loop: 453if ((existingChild.Kind is RegexNodeKind.Alternate or RegexNodeKind.BackreferenceConditional or RegexNodeKind.ExpressionConditional or RegexNodeKind.Loop or RegexNodeKind.Lazyloop) && 493goto case RegexNodeKind.Loop; 494case RegexNodeKind.Loop: 543RegexNodeKind.Loop or RegexNodeKind.Lazyloop => ReduceLoops(), 767Debug.Assert(Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop); 783if (kind == RegexNodeKind.Loop) 1417case RegexNodeKind.Loop or RegexNodeKind.Lazyloop when node.M > 0: 1862if (node.Kind == RegexNodeKind.Loop) 1939Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop); 2080case RegexNodeKind.Loop or RegexNodeKind.Lazyloop when subsequent.M > 0: 2289case RegexNodeKind.Loop: 2395case RegexNodeKind.Loop or RegexNodeKind.Lazyloop: 2714var result = new RegexNode(lazy ? RegexNodeKind.Lazyloop : RegexNodeKind.Loop, Options, min, max); 2942case RegexNodeKind.Loop:
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNodeKind.cs (3)
32/// This is purely a representational optimization, equivalent to a <see cref="Loop"/> wrapped around a <see cref="One"/>. 37/// This is purely a representational optimization, equivalent to a <see cref="Loop"/> wrapped around a <see cref="Notone"/>. 41/// This is purely a representational optimization, equivalent to a <see cref="Loop"/> wrapped around a <see cref="Set"/>.
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (8)
226case RegexNodeKind.Loop or RegexNodeKind.Lazyloop when node.M > 0: 439case RegexNodeKind.Loop or RegexNodeKind.Lazyloop when node.M > 0: 493case RegexNodeKind.Loop or RegexNodeKind.Lazyloop when node.M > 0: 686case RegexNodeKind.Lazyloop or RegexNodeKind.Loop when node.M > 0: 1027case RegexNodeKind.Loop: 1201(nextChild.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop && nextChild.M >= 1)) 1279case RegexNodeKind.Loop or RegexNodeKind.Lazyloop when node.M >= 1: 1340case RegexNodeKind.Loop or RegexNodeKind.Lazyloop when leading && node.M >= 1:
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexTreeAnalyzer.cs (3)
50case RegexNodeKind.Loop or RegexNodeKind.Lazyloop when node.M != node.N: 75case RegexNodeKind.Loop: 111RegexNodeKind.Loop or RegexNodeKind.Lazyloop when node.N == 1 => true,