private static IClassHandler CreateNamedClassHandler(bool positive, string name) { CharClassInfo info = CharClasses.GetInfo(name); switch (info.type) { case CharClassType.UnicodeGenralCategory: return(new GeneralCategoryHandler(info.name, (afh.Text.GeneralCategory)info.value, positive)); case CharClassType.UnicodeBlock: return(new UnicodeBlockHandler(info.name, (afh.Text.UnicodeBlock)info.value, positive)); case CharClassType.CLanguageCType: return(new CLangCTypeHandler(info.name, (afh.Text.CLangCType)info.value, positive)); default: __debug__.RegexParserAssert(false, "この種類の名前付きクラスには対応していません。"); return(null); } }
private static void RegisterClass(CharClassInfo info) { infos[info.name.ToLower()] = info; }