System.Text.RegularExpressions.RegexNode.MakeQuantifier C# (CSharp) Method

MakeQuantifier() private method

private MakeQuantifier ( bool lazy, int min, int max ) : RegexNode
lazy bool
min int
max int
return RegexNode
        internal RegexNode MakeQuantifier(bool lazy, int min, int max)
        {
            RegexNode result;

            if (min == 0 && max == 0)
                return new RegexNode(Empty, _options);

            if (min == 1 && max == 1)
                return this;

            switch (_type)
            {
                case One:
                case Notone:
                case Set:

                    MakeRep(lazy ? Onelazy : Oneloop, min, max);
                    return this;

                default:
                    result = new RegexNode(lazy ? Lazyloop : Loop, _options, min, max);
                    result.AddChild(this);
                    return result;
            }
        }