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); }