Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup regex diagnostic output #1947

Merged
merged 10 commits into from
Jan 21, 2020
Prev Previous commit
Next Next commit
Tighten Boyer Moore debug output
  • Loading branch information
danmoseley committed Jan 21, 2020
commit 98a5e524c48d20f95b7f3fe93f331022a2fa59df
Original file line number Diff line number Diff line change
Expand Up @@ -357,16 +357,18 @@ public string Dump(string indent)

if (NegativeASCII != null)
{
sb.Append(indent + "Negative table\n");
sb.Append(indent + "Negative table: ");
for (int i = 0; i < NegativeASCII.Length; i++)
{
if (NegativeASCII[i] != Pattern.Length)
{
sb.Append(indent + " " + Regex.Escape(Convert.ToString((char)i, CultureInfo.InvariantCulture)) + " " + NegativeASCII[i].ToString(CultureInfo.InvariantCulture) + "\n");
sb.Append(" {" + Regex.Escape(Convert.ToString((char)i, CultureInfo.InvariantCulture)) + " " + NegativeASCII[i].ToString(CultureInfo.InvariantCulture) + "}");
danmoseley marked this conversation as resolved.
Show resolved Hide resolved
}
}
}

sb.Append("\n");
danmoseley marked this conversation as resolved.
Show resolved Hide resolved

return sb.ToString();
}
#endif
Expand Down