NoteCaptures() private method

private NoteCaptures ( int>.Dictionary caps, int capsize, int>.Dictionary capnames ) : void
caps int>.Dictionary
capsize int
capnames int>.Dictionary
return void
Beispiel #1
0
        /*
         * This static call constructs a flat concatenation node given
         * a replacement pattern.
         */
        internal static RegexReplacement ParseReplacement(string rep, Dictionary<int, int> caps, int capsize, Dictionary<string, int> capnames, RegexOptions op)
        {
            RegexParser p;
            RegexNode root;

            p = new RegexParser((op & RegexOptions.CultureInvariant) != 0 ? CultureInfo.InvariantCulture : CultureInfo.CurrentCulture);

            p._options = op;

            p.NoteCaptures(caps, capsize, capnames);
            p.SetPattern(rep);
            root = p.ScanReplacement();

            return new RegexReplacement(rep, root, caps);
        }