/// <summary> /// This is the only function that should be called from outside. /// It takes a RegexTree and creates a corresponding RegexCode. /// </summary> public static RegexCode Write(RegexTree tree) { var writer = new RegexWriter(); RegexCode code = writer.RegexCodeFromRegexTree(tree); #if DEBUG if (tree.Debug) { tree.Dump(); code.Dump(); } #endif return(code); }