System\Text\RegularExpressions\Symbolic\SymbolicRegexNode.cs (21)
518public bool IsStar => _lower == 0 && _upper == int.MaxValue;
529public bool IsPlus => _lower == 1 && _upper == int.MaxValue;
570if (lower == 0 && upper == 1 && bodyContext._kind == SymbolicRegexNodeKind.Loop && bodyContext._lower == 0 && bodyContext._upper == 1)
834if (left._left.IsNullable && rl._kind == SymbolicRegexNodeKind.Loop && rl._lower == 0 && rl._upper == 1 && rl.IsLazy)
848if (ll._kind == SymbolicRegexNodeKind.Loop && ll._lower == 0 && ll._upper == 1 && ll.IsLazy)
1081if (_lower == _upper)
1086length *= _lower;
1182Debug.Assert(_lower == lengthSoFar);
1332if (loop._lower == 0)
1390int newlower = _lower is 0 or int.MaxValue ? _lower : _lower - 1;
1598result = builder.CreateLoop(_left.StripEffects(builder), IsLazy, _lower, _upper);
1682case SymbolicRegexNodeKind.Loop when _lower == 0 && _upper == 1:
2134return builder.CreateLoop(_left.Reverse(builder), IsLazy, _lower, _upper);
2340CreateLoop(builder, body, _lower, _upper, IsLazy);
2407return _lower;
2476Debug.Assert(current._lower >= 0 && current._upper > 0 && current._upper >= current._lower);
2481if (current._lower is 0 or int.MaxValue)
2502loopMultiplier = current._lower + 1;