Ejemplo n.º 1
0
        public override string ToString()
        {
            if (Type == TypeEnum.EofAction)
            {
                return("EOF");
            }

            string s = null;

            if (Type == TypeEnum.Regex)
            {
                s = "/" + pattern.AsInternalRegex() + "/";
            }
            else
            {
                s = "\"" + pattern.AsPrintableString() + "\"";
            }

            if (!stringComparison.HasValue)
            {
                s += "?";
            }
            else if (StringComparison == StringCaseComparison.Insensitive)
            {
                s += "i";
            }

            return(s);
        }