diff --git a/scripts/EastAsianWidth.zig b/scripts/EastAsianWidth.zig index 4c1b50f8f1fe5375196fe01307a7fc797d470ebd..19629fc89dd1be32083955163d7c7511fccc8219 100644 --- a/scripts/EastAsianWidth.zig +++ b/scripts/EastAsianWidth.zig @@ -7,10 +7,12 @@ pub usingnamespace common.Main(struct { pub const dest_file = "src/east_asian_width.zig"; pub const dest_header = + \\const ucd = @import("./lib.zig"); + \\ \\pub const EastAsianWidth = struct { \\ from: u21, \\ to: u21, - \\ prop: enum { A, F, H, N, Na, W }, + \\ prop: ucd.EastAsianWidth, \\}; \\ \\pub const data = [_]EastAsianWidth{ diff --git a/scripts/HangulSyllableType.zig b/scripts/HangulSyllableType.zig index 7c480c23ce4a1540d84e67c7ae17a8fe38a291a4..f259da27d2eed0659b1cf2e32aa750a17afa2022 100644 --- a/scripts/HangulSyllableType.zig +++ b/scripts/HangulSyllableType.zig @@ -7,10 +7,12 @@ pub usingnamespace common.Main(struct { pub const dest_file = "src/hangul_syllable_type.zig"; pub const dest_header = + \\const ucd = @import("./lib.zig"); + \\ \\pub const HangulSyllableType = struct { \\ from: u21, \\ to: u21, - \\ prop: enum { L, V, T, LV, LVT }, + \\ prop: ucd.HangulSyllableType, \\}; \\ \\pub const data = [_]HangulSyllableType{ diff --git a/scripts/IndicPositionalCategory.zig b/scripts/IndicPositionalCategory.zig index e981f80e242b72b7e1e1696658e00a0dcd9345eb..5e1e22dd82bb02f08aa55c2149a036f3e2564c41 100644 --- a/scripts/IndicPositionalCategory.zig +++ b/scripts/IndicPositionalCategory.zig @@ -7,25 +7,11 @@ pub usingnamespace common.Main(struct { pub const dest_file = "src/indic_positional_category.zig"; pub const dest_header = + \\const ucd = @import("./lib.zig"); + \\ \\pub const IndicPositionalCategory = struct { \\ code: u21, - \\ category: enum { - \\ Right, - \\ Left, - \\ Visual_Order_Left, - \\ Left_And_Right, - \\ Top, - \\ Bottom, - \\ Top_And_Bottom, - \\ Top_And_Right, - \\ Top_And_Left, - \\ Top_And_Left_And_Right, - \\ Bottom_And_Right, - \\ Bottom_And_Left, - \\ Top_And_Bottom_And_Right, - \\ Top_And_Bottom_And_Left, - \\ Overstruck, - \\ }, + \\ category: ucd.IndicPositionalCategory, \\}; \\ \\pub const data = [_]IndicPositionalCategory{ diff --git a/scripts/IndicSyllabicCategory.zig b/scripts/IndicSyllabicCategory.zig index 6d505cf7ac81b60bd36e5afd967e418fbd995476..1c6cdd30b950b3117dee3eea980bb749682c04b1 100644 --- a/scripts/IndicSyllabicCategory.zig +++ b/scripts/IndicSyllabicCategory.zig @@ -7,45 +7,11 @@ pub usingnamespace common.Main(struct { pub const dest_file = "src/indic_syllabic_category.zig"; pub const dest_header = + \\const ucd = @import("./lib.zig"); + \\ \\pub const IndicSyllabicCategory = struct { \\ code: u21, - \\ category: enum { - \\ Bindu, - \\ Visarga, - \\ Avagraha, - \\ Nukta, - \\ Virama, - \\ Pure_Killer, - \\ Invisible_Stacker, - \\ Vowel_Independent, - \\ Vowel_Dependent, - \\ Vowel, - \\ Consonant_Placeholder, - \\ Consonant, - \\ Consonant_Dead, - \\ Consonant_With_Stacker, - \\ Consonant_Prefixed, - \\ Consonant_Preceding_Repha, - \\ Consonant_Initial_Postfixed, - \\ Consonant_Succeeding_Repha, - \\ Consonant_Subjoined, - \\ Consonant_Medial, - \\ Consonant_Final, - \\ Consonant_Head_Letter, - \\ Modifying_Letter, - \\ Tone_Letter, - \\ Tone_Mark, - \\ Gemination_Mark, - \\ Cantillation_Mark, - \\ Register_Shifter, - \\ Syllable_Modifier, - \\ Consonant_Killer, - \\ Non_Joiner, - \\ Joiner, - \\ Number_Joiner, - \\ Number, - \\ Brahmi_Joining_Number, - \\ }, + \\ category: ucd.IndicSyllabicCategory, \\}; \\ \\pub const data = [_]IndicSyllabicCategory{ diff --git a/scripts/LineBreak.zig b/scripts/LineBreak.zig index 66a79014c0d4ad1b4f6966280136c976c0532954..5bbfd449c82af45dd4e63d40a07456c05fb71184 100644 --- a/scripts/LineBreak.zig +++ b/scripts/LineBreak.zig @@ -7,17 +7,12 @@ pub usingnamespace common.Main(struct { pub const dest_file = "src/line_break.zig"; pub const dest_header = + \\const ucd = @import("./lib.zig"); + \\ \\pub const LineBreak = struct { \\ from: u21, \\ to: u21, - \\ category: enum { - \\ BK, CM, CR, GL, LF, NL, SP, WJ, ZW, ZWJ, - \\ AI, AL, B2, BA, BB, CB, CJ, CL, CP, EB, - \\ EM, EX, H2, H3, HL, HY, ID, IN, IS, JL, - \\ JT, JV, NS, NU, OP, PO, PR, QU, RI, SA, - \\ SG, SY, XX, - \\ AK, VI, AS, VF, AP, - \\ }, + \\ category: ucd.LineBreak, \\}; \\ \\pub const data = [_]LineBreak{ diff --git a/scripts/ScriptExtensions.zig b/scripts/ScriptExtensions.zig index 6ce18ce9bafb34dc0ea9e48c6d899df848a6f236..8df0a9aff5884efd82d090104080579d289cafd9 100644 --- a/scripts/ScriptExtensions.zig +++ b/scripts/ScriptExtensions.zig @@ -7,78 +7,11 @@ pub usingnamespace common.Main(struct { pub const dest_file = "src/script_extensions.zig"; pub const dest_header = + \\const ucd = @import("./lib.zig"); + \\ \\pub const ScriptExtension = struct { \\ code: u21, - \\ scripts: []const enum { - \\ Beng, - \\ Deva, - \\ Dupl, - \\ Grek, - \\ Hani, - \\ Latn, - \\ Nand, - \\ Arab, - \\ Bopo, - \\ Bugi, - \\ Cprt, - \\ Cyrl, - \\ Geor, - \\ Gran, - \\ Gujr, - \\ Guru, - \\ Hira, - \\ Knda, - \\ Mong, - \\ Cakm, - \\ Kali, - \\ Buhd, - \\ Adlm, - \\ Copt, - \\ Rohg, - \\ Syrc, - \\ Thaa, - \\ Java, - \\ Linb, - \\ Glag, - \\ Perm, - \\ Shrd, - \\ Taml, - \\ Khoj, - \\ Mult, - \\ Kana, - \\ Phag, - \\ Yezi, - \\ Sylo, - \\ Mymr, - \\ Tale, - \\ Lina, - \\ Hano, - \\ Tagb, - \\ Tglg, - \\ Dogr, - \\ Kthi, - \\ Mahj, - \\ Hang, - \\ Yiii, - \\ Mlym, - \\ Orya, - \\ Telu, - \\ Mand, - \\ Mani, - \\ Phlp, - \\ Sogd, - \\ Tirh, - \\ Modi, - \\ Sind, - \\ Takr, - \\ Gong, - \\ Gonm, - \\ Sinh, - \\ Limb, - \\ Nkoo, - \\ Ougr, - \\ Cpmn, - \\ }, + \\ scripts: []const ucd.Script, \\}; \\ \\pub const data = [_]ScriptExtension{ diff --git a/scripts/Scripts.zig b/scripts/Scripts.zig index ac28f5df8173bdb259ce161cb9a2812a7ff71e8e..6a4202f98ea40aba27ec10f5489c6c5b558bf88e 100644 --- a/scripts/Scripts.zig +++ b/scripts/Scripts.zig @@ -7,174 +7,12 @@ pub usingnamespace common.Main(struct { pub const dest_file = "src/scripts.zig"; pub const dest_header = + \\const ucd = @import("./lib.zig"); + \\ \\pub const Scripts = struct { \\ from: u21, \\ to: u21, - \\ script: enum { - \\ Common, - \\ Latin, - \\ Greek, - \\ Cyrillic, - \\ Armenian, - \\ Hebrew, - \\ Arabic, - \\ Syriac, - \\ Thaana, - \\ Devanagari, - \\ Bengali, - \\ Gurmukhi, - \\ Gujarati, - \\ Oriya, - \\ Tamil, - \\ Telugu, - \\ Kannada, - \\ Malayalam, - \\ Sinhala, - \\ Thai, - \\ Lao, - \\ Tibetan, - \\ Myanmar, - \\ Georgian, - \\ Hangul, - \\ Ethiopic, - \\ Cherokee, - \\ Canadian_Aboriginal, - \\ Ogham, - \\ Runic, - \\ Khmer, - \\ Mongolian, - \\ Hiragana, - \\ Katakana, - \\ Bopomofo, - \\ Han, - \\ Yi, - \\ Old_Italic, - \\ Gothic, - \\ Deseret, - \\ Inherited, - \\ Tagalog, - \\ Hanunoo, - \\ Buhid, - \\ Tagbanwa, - \\ Limbu, - \\ Tai_Le, - \\ Linear_B, - \\ Ugaritic, - \\ Shavian, - \\ Osmanya, - \\ Cypriot, - \\ Braille, - \\ Buginese, - \\ Coptic, - \\ New_Tai_Lue, - \\ Glagolitic, - \\ Tifinagh, - \\ Syloti_Nagri, - \\ Old_Persian, - \\ Kharoshthi, - \\ Balinese, - \\ Cuneiform, - \\ Phoenician, - \\ Phags_Pa, - \\ Nko, - \\ Sundanese, - \\ Lepcha, - \\ Ol_Chiki, - \\ Vai, - \\ Saurashtra, - \\ Kayah_Li, - \\ Rejang, - \\ Lycian, - \\ Carian, - \\ Lydian, - \\ Cham, - \\ Tai_Tham, - \\ Tai_Viet, - \\ Avestan, - \\ Egyptian_Hieroglyphs, - \\ Samaritan, - \\ Lisu, - \\ Bamum, - \\ Javanese, - \\ Meetei_Mayek, - \\ Imperial_Aramaic, - \\ Old_South_Arabian, - \\ Inscriptional_Parthian, - \\ Inscriptional_Pahlavi, - \\ Old_Turkic, - \\ Kaithi, - \\ Batak, - \\ Brahmi, - \\ Mandaic, - \\ Chakma, - \\ Meroitic_Cursive, - \\ Meroitic_Hieroglyphs, - \\ Miao, - \\ Sharada, - \\ Sora_Sompeng, - \\ Takri, - \\ Caucasian_Albanian, - \\ Bassa_Vah, - \\ Duployan, - \\ Elbasan, - \\ Grantha, - \\ Pahawh_Hmong, - \\ Khojki, - \\ Linear_A, - \\ Mahajani, - \\ Manichaean, - \\ Mende_Kikakui, - \\ Modi, - \\ Mro, - \\ Old_North_Arabian, - \\ Nabataean, - \\ Palmyrene, - \\ Pau_Cin_Hau, - \\ Old_Permic, - \\ Psalter_Pahlavi, - \\ Siddham, - \\ Khudawadi, - \\ Tirhuta, - \\ Warang_Citi, - \\ Ahom, - \\ Anatolian_Hieroglyphs, - \\ Hatran, - \\ Multani, - \\ Old_Hungarian, - \\ SignWriting, - \\ Adlam, - \\ Bhaiksuki, - \\ Marchen, - \\ Newa, - \\ Osage, - \\ Tangut, - \\ Masaram_Gondi, - \\ Nushu, - \\ Soyombo, - \\ Zanabazar_Square, - \\ Dogra, - \\ Gunjala_Gondi, - \\ Makasar, - \\ Medefaidrin, - \\ Hanifi_Rohingya, - \\ Sogdian, - \\ Old_Sogdian, - \\ Elymaic, - \\ Nandinagari, - \\ Nyiakeng_Puachue_Hmong, - \\ Wancho, - \\ Chorasmian, - \\ Dives_Akuru, - \\ Khitan_Small_Script, - \\ Yezidi, - \\ Cypro_Minoan, - \\ Old_Uyghur, - \\ Tangsa, - \\ Toto, - \\ Vithkuqi, - \\ Kawi, - \\ Nag_Mundari, - \\ }, + \\ script: ucd.ScriptLong, \\}; \\ \\pub const data = [_]Scripts{ diff --git a/scripts/SpecialCasing.zig b/scripts/SpecialCasing.zig index 6de212ca4cf5baa6b2954e67f1e260f399810a70..b37b84e2c2b5e9025836230e2136b8ce878d91b7 100644 --- a/scripts/SpecialCasing.zig +++ b/scripts/SpecialCasing.zig @@ -7,7 +7,6 @@ pub usingnamespace common.Main(struct { pub const dest_file = "src/special_casing.zig"; pub const dest_header = - \\ \\pub const SpecialCasing = struct { \\ code: u21, \\ lower: []const u21, diff --git a/scripts/VerticalOrientation.zig b/scripts/VerticalOrientation.zig index 287027e2868d7319104ac8615e3bd3decccc0d1e..b5cae101e72f47d297abdc9eb6b046e1aec4af1b 100644 --- a/scripts/VerticalOrientation.zig +++ b/scripts/VerticalOrientation.zig @@ -7,15 +7,12 @@ pub usingnamespace common.Main(struct { pub const dest_file = "src/vertical_orientation.zig"; pub const dest_header = + \\const ucd = @import("./lib.zig"); + \\ \\pub const VerticalOrientation = struct { \\ from: u21, \\ to: u21, - \\ orientation: enum { - \\ R, - \\ U, - \\ Tr, - \\ Tu, - \\ }, + \\ orientation: ucd.VerticalOrientation, \\}; \\ \\pub const data = [_]VerticalOrientation{ diff --git a/src/east_asian_width.zig b/src/east_asian_width.zig index 110682fe3d6a4e728312e6ef42b5ae205b95f303..5ddbce6f5fd6d1d7859dfff60a5bc44597a2c925 100644 --- a/src/east_asian_width.zig +++ b/src/east_asian_width.zig @@ -5,10 +5,12 @@ // // zig fmt: off +const ucd = @import("./lib.zig"); + pub const EastAsianWidth = struct { from: u21, to: u21, - prop: enum { A, F, H, N, Na, W }, + prop: ucd.EastAsianWidth, }; pub const data = [_]EastAsianWidth{ diff --git a/src/hangul_syllable_type.zig b/src/hangul_syllable_type.zig index 10db520b539208abbadf99d1dbdf69f2cb66a0c9..c75fc387848deb80fed8ecd0734ed182c251bbec 100644 --- a/src/hangul_syllable_type.zig +++ b/src/hangul_syllable_type.zig @@ -5,10 +5,12 @@ // // zig fmt: off +const ucd = @import("./lib.zig"); + pub const HangulSyllableType = struct { from: u21, to: u21, - prop: enum { L, V, T, LV, LVT }, + prop: ucd.HangulSyllableType, }; pub const data = [_]HangulSyllableType{ diff --git a/src/indic_positional_category.zig b/src/indic_positional_category.zig index bb2e2a05ff82408d0b05a9d6393d8ed3810fa7f9..03a12f11952beb13ac689108938fc0040cef8684 100644 --- a/src/indic_positional_category.zig +++ b/src/indic_positional_category.zig @@ -5,25 +5,11 @@ // // zig fmt: off +const ucd = @import("./lib.zig"); + pub const IndicPositionalCategory = struct { code: u21, - category: enum { - Right, - Left, - Visual_Order_Left, - Left_And_Right, - Top, - Bottom, - Top_And_Bottom, - Top_And_Right, - Top_And_Left, - Top_And_Left_And_Right, - Bottom_And_Right, - Bottom_And_Left, - Top_And_Bottom_And_Right, - Top_And_Bottom_And_Left, - Overstruck, - }, + category: ucd.IndicPositionalCategory, }; pub const data = [_]IndicPositionalCategory{ diff --git a/src/indic_syllabic_category.zig b/src/indic_syllabic_category.zig index 3f44837795014bd4bfc5db94e6f298119f6e1390..39105195df6b8330779effccd870cb44cc19df3d 100644 --- a/src/indic_syllabic_category.zig +++ b/src/indic_syllabic_category.zig @@ -5,45 +5,11 @@ // // zig fmt: off +const ucd = @import("./lib.zig"); + pub const IndicSyllabicCategory = struct { code: u21, - category: enum { - Bindu, - Visarga, - Avagraha, - Nukta, - Virama, - Pure_Killer, - Invisible_Stacker, - Vowel_Independent, - Vowel_Dependent, - Vowel, - Consonant_Placeholder, - Consonant, - Consonant_Dead, - Consonant_With_Stacker, - Consonant_Prefixed, - Consonant_Preceding_Repha, - Consonant_Initial_Postfixed, - Consonant_Succeeding_Repha, - Consonant_Subjoined, - Consonant_Medial, - Consonant_Final, - Consonant_Head_Letter, - Modifying_Letter, - Tone_Letter, - Tone_Mark, - Gemination_Mark, - Cantillation_Mark, - Register_Shifter, - Syllable_Modifier, - Consonant_Killer, - Non_Joiner, - Joiner, - Number_Joiner, - Number, - Brahmi_Joining_Number, - }, + category: ucd.IndicSyllabicCategory, }; pub const data = [_]IndicSyllabicCategory{ diff --git a/src/lib.zig b/src/lib.zig index 08731a7f70571269aa5e3950780982418ad72791..7bb4edcf73243988f9ad640410727d68ae219da5 100644 --- a/src/lib.zig +++ b/src/lib.zig @@ -40,6 +40,15 @@ pub const GeneralCategory = DerivedPropertyEnum("gc"); /// https://www.unicode.org/reports/tr44/#Bidi_Class_Values pub const BidiClass = DerivedPropertyEnum("bc"); +pub const Script = DerivedPropertyEnum("sc"); +pub const ScriptLong = DerivedPropertyLongEnum("sc"); +pub const IndicSyllabicCategory = DerivedPropertyEnum("InSC"); +pub const HangulSyllableType = DerivedPropertyEnum("hst"); +pub const EastAsianWidth = DerivedPropertyEnum("ea"); +pub const VerticalOrientation = DerivedPropertyEnum("vo"); +pub const LineBreak = DerivedPropertyEnum("lb"); +pub const IndicPositionalCategory = DerivedPropertyEnum("InPC"); + fn DerivedPropertyEnum(comptime prop: []const u8) type { var fields: []const std.builtin.Type.EnumField = &.{}; @setEvalBranchQuota(10_000); @@ -58,3 +67,22 @@ fn DerivedPropertyEnum(comptime prop: []const u8) type { .is_exhaustive = true, } }); } + +fn DerivedPropertyLongEnum(comptime prop: []const u8) type { + var fields: []const std.builtin.Type.EnumField = &.{}; + @setEvalBranchQuota(10_000); + for (property_value_aliases.data) |item| { + if (!std.mem.eql(u8, item[0], prop)) continue; + if (fields.len > 0 and std.mem.eql(u8, fields[fields.len - 1].name, item[2])) continue; + fields = fields ++ &[_]std.builtin.Type.EnumField{.{ + .name = item[2], + .value = fields.len, + }}; + } + return @Type(.{ .Enum = .{ + .tag_type = std.math.IntFittingRange(0, fields.len - 1), + .fields = fields, + .decls = &.{}, + .is_exhaustive = true, + } }); +} diff --git a/src/line_break.zig b/src/line_break.zig index 9105829d70556418787f835614240fc6ac76fa4c..f395a167234001513780124285528c6f5e0d6897 100644 --- a/src/line_break.zig +++ b/src/line_break.zig @@ -5,17 +5,12 @@ // // zig fmt: off +const ucd = @import("./lib.zig"); + pub const LineBreak = struct { from: u21, to: u21, - category: enum { - BK, CM, CR, GL, LF, NL, SP, WJ, ZW, ZWJ, - AI, AL, B2, BA, BB, CB, CJ, CL, CP, EB, - EM, EX, H2, H3, HL, HY, ID, IN, IS, JL, - JT, JV, NS, NU, OP, PO, PR, QU, RI, SA, - SG, SY, XX, - AK, VI, AS, VF, AP, - }, + category: ucd.LineBreak, }; pub const data = [_]LineBreak{ diff --git a/src/script_extensions.zig b/src/script_extensions.zig index fb83d29378d62451c9b9c7e3540cd4bd86a6b8d7..db475ce0261d158a73d4c23a37ecde125461b5d1 100644 --- a/src/script_extensions.zig +++ b/src/script_extensions.zig @@ -5,78 +5,11 @@ // // zig fmt: off +const ucd = @import("./lib.zig"); + pub const ScriptExtension = struct { code: u21, - scripts: []const enum { - Beng, - Deva, - Dupl, - Grek, - Hani, - Latn, - Nand, - Arab, - Bopo, - Bugi, - Cprt, - Cyrl, - Geor, - Gran, - Gujr, - Guru, - Hira, - Knda, - Mong, - Cakm, - Kali, - Buhd, - Adlm, - Copt, - Rohg, - Syrc, - Thaa, - Java, - Linb, - Glag, - Perm, - Shrd, - Taml, - Khoj, - Mult, - Kana, - Phag, - Yezi, - Sylo, - Mymr, - Tale, - Lina, - Hano, - Tagb, - Tglg, - Dogr, - Kthi, - Mahj, - Hang, - Yiii, - Mlym, - Orya, - Telu, - Mand, - Mani, - Phlp, - Sogd, - Tirh, - Modi, - Sind, - Takr, - Gong, - Gonm, - Sinh, - Limb, - Nkoo, - Ougr, - Cpmn, - }, + scripts: []const ucd.Script, }; pub const data = [_]ScriptExtension{ diff --git a/src/scripts.zig b/src/scripts.zig index 3821470bf44acbe5703c0e5071e9781954eafb34..dc446b5ea4f7ea69a954561f82180b5c962e932c 100644 --- a/src/scripts.zig +++ b/src/scripts.zig @@ -5,174 +5,12 @@ // // zig fmt: off +const ucd = @import("./lib.zig"); + pub const Scripts = struct { from: u21, to: u21, - script: enum { - Common, - Latin, - Greek, - Cyrillic, - Armenian, - Hebrew, - Arabic, - Syriac, - Thaana, - Devanagari, - Bengali, - Gurmukhi, - Gujarati, - Oriya, - Tamil, - Telugu, - Kannada, - Malayalam, - Sinhala, - Thai, - Lao, - Tibetan, - Myanmar, - Georgian, - Hangul, - Ethiopic, - Cherokee, - Canadian_Aboriginal, - Ogham, - Runic, - Khmer, - Mongolian, - Hiragana, - Katakana, - Bopomofo, - Han, - Yi, - Old_Italic, - Gothic, - Deseret, - Inherited, - Tagalog, - Hanunoo, - Buhid, - Tagbanwa, - Limbu, - Tai_Le, - Linear_B, - Ugaritic, - Shavian, - Osmanya, - Cypriot, - Braille, - Buginese, - Coptic, - New_Tai_Lue, - Glagolitic, - Tifinagh, - Syloti_Nagri, - Old_Persian, - Kharoshthi, - Balinese, - Cuneiform, - Phoenician, - Phags_Pa, - Nko, - Sundanese, - Lepcha, - Ol_Chiki, - Vai, - Saurashtra, - Kayah_Li, - Rejang, - Lycian, - Carian, - Lydian, - Cham, - Tai_Tham, - Tai_Viet, - Avestan, - Egyptian_Hieroglyphs, - Samaritan, - Lisu, - Bamum, - Javanese, - Meetei_Mayek, - Imperial_Aramaic, - Old_South_Arabian, - Inscriptional_Parthian, - Inscriptional_Pahlavi, - Old_Turkic, - Kaithi, - Batak, - Brahmi, - Mandaic, - Chakma, - Meroitic_Cursive, - Meroitic_Hieroglyphs, - Miao, - Sharada, - Sora_Sompeng, - Takri, - Caucasian_Albanian, - Bassa_Vah, - Duployan, - Elbasan, - Grantha, - Pahawh_Hmong, - Khojki, - Linear_A, - Mahajani, - Manichaean, - Mende_Kikakui, - Modi, - Mro, - Old_North_Arabian, - Nabataean, - Palmyrene, - Pau_Cin_Hau, - Old_Permic, - Psalter_Pahlavi, - Siddham, - Khudawadi, - Tirhuta, - Warang_Citi, - Ahom, - Anatolian_Hieroglyphs, - Hatran, - Multani, - Old_Hungarian, - SignWriting, - Adlam, - Bhaiksuki, - Marchen, - Newa, - Osage, - Tangut, - Masaram_Gondi, - Nushu, - Soyombo, - Zanabazar_Square, - Dogra, - Gunjala_Gondi, - Makasar, - Medefaidrin, - Hanifi_Rohingya, - Sogdian, - Old_Sogdian, - Elymaic, - Nandinagari, - Nyiakeng_Puachue_Hmong, - Wancho, - Chorasmian, - Dives_Akuru, - Khitan_Small_Script, - Yezidi, - Cypro_Minoan, - Old_Uyghur, - Tangsa, - Toto, - Vithkuqi, - Kawi, - Nag_Mundari, - }, + script: ucd.ScriptLong, }; pub const data = [_]Scripts{ diff --git a/src/special_casing.zig b/src/special_casing.zig index f9914edc585e8aae11e9acd360f78b3b2b95e4bc..7da55473542fed9af28106f12e9e8ee0f25e1e20 100644 --- a/src/special_casing.zig +++ b/src/special_casing.zig @@ -5,7 +5,6 @@ // // zig fmt: off - pub const SpecialCasing = struct { code: u21, lower: []const u21, diff --git a/src/vertical_orientation.zig b/src/vertical_orientation.zig index 360ea4f103f59c687ddea9e499ec4c834138c8bd..e19db3b2032affa43d4acbf45318d62fab2ff118 100644 --- a/src/vertical_orientation.zig +++ b/src/vertical_orientation.zig @@ -5,15 +5,12 @@ // // zig fmt: off +const ucd = @import("./lib.zig"); + pub const VerticalOrientation = struct { from: u21, to: u21, - orientation: enum { - R, - U, - Tr, - Tu, - }, + orientation: ucd.VerticalOrientation, }; pub const data = [_]VerticalOrientation{