authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-10-05 01:51:14 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-10-05 01:51:14 -07:00
log68331c54c2275d4496e3017c1cc092641f34eb7a
treeafe4e5f010dd4b4282e10ddf23f080d04570ce63
parent8a57b2c91d1554bdf5016adc7d8e81a4bf166fd1

import more derived enums from PropertyValueAliases


19 files changed, 76 insertions(+), 612 deletions(-)

scripts/EastAsianWidth.zig+3-1
...@@ -7,10 +7,12 @@ pub usingnamespace common.Main(struct {...@@ -7,10 +7,12 @@ pub usingnamespace common.Main(struct {
7 pub const dest_file = "src/east_asian_width.zig";7 pub const dest_file = "src/east_asian_width.zig";
88
9 pub const dest_header =9 pub const dest_header =
10 \\const ucd = @import("./lib.zig");
11 \\
10 \\pub const EastAsianWidth = struct {12 \\pub const EastAsianWidth = struct {
11 \\ from: u21,13 \\ from: u21,
12 \\ to: u21,14 \\ to: u21,
13 \\ prop: enum { A, F, H, N, Na, W },15 \\ prop: ucd.EastAsianWidth,
14 \\};16 \\};
15 \\17 \\
16 \\pub const data = [_]EastAsianWidth{18 \\pub const data = [_]EastAsianWidth{
scripts/HangulSyllableType.zig+3-1
...@@ -7,10 +7,12 @@ pub usingnamespace common.Main(struct {...@@ -7,10 +7,12 @@ pub usingnamespace common.Main(struct {
7 pub const dest_file = "src/hangul_syllable_type.zig";7 pub const dest_file = "src/hangul_syllable_type.zig";
88
9 pub const dest_header =9 pub const dest_header =
10 \\const ucd = @import("./lib.zig");
11 \\
10 \\pub const HangulSyllableType = struct {12 \\pub const HangulSyllableType = struct {
11 \\ from: u21,13 \\ from: u21,
12 \\ to: u21,14 \\ to: u21,
13 \\ prop: enum { L, V, T, LV, LVT },15 \\ prop: ucd.HangulSyllableType,
14 \\};16 \\};
15 \\17 \\
16 \\pub const data = [_]HangulSyllableType{18 \\pub const data = [_]HangulSyllableType{
scripts/IndicPositionalCategory.zig+3-17
...@@ -7,25 +7,11 @@ pub usingnamespace common.Main(struct {...@@ -7,25 +7,11 @@ pub usingnamespace common.Main(struct {
7 pub const dest_file = "src/indic_positional_category.zig";7 pub const dest_file = "src/indic_positional_category.zig";
88
9 pub const dest_header =9 pub const dest_header =
10 \\const ucd = @import("./lib.zig");
11 \\
10 \\pub const IndicPositionalCategory = struct {12 \\pub const IndicPositionalCategory = struct {
11 \\ code: u21,13 \\ code: u21,
12 \\ category: enum {14 \\ category: ucd.IndicPositionalCategory,
13 \\ Right,
14 \\ Left,
15 \\ Visual_Order_Left,
16 \\ Left_And_Right,
17 \\ Top,
18 \\ Bottom,
19 \\ Top_And_Bottom,
20 \\ Top_And_Right,
21 \\ Top_And_Left,
22 \\ Top_And_Left_And_Right,
23 \\ Bottom_And_Right,
24 \\ Bottom_And_Left,
25 \\ Top_And_Bottom_And_Right,
26 \\ Top_And_Bottom_And_Left,
27 \\ Overstruck,
28 \\ },
29 \\};15 \\};
30 \\16 \\
31 \\pub const data = [_]IndicPositionalCategory{17 \\pub const data = [_]IndicPositionalCategory{
scripts/IndicSyllabicCategory.zig+3-37
...@@ -7,45 +7,11 @@ pub usingnamespace common.Main(struct {...@@ -7,45 +7,11 @@ pub usingnamespace common.Main(struct {
7 pub const dest_file = "src/indic_syllabic_category.zig";7 pub const dest_file = "src/indic_syllabic_category.zig";
88
9 pub const dest_header =9 pub const dest_header =
10 \\const ucd = @import("./lib.zig");
11 \\
10 \\pub const IndicSyllabicCategory = struct {12 \\pub const IndicSyllabicCategory = struct {
11 \\ code: u21,13 \\ code: u21,
12 \\ category: enum {14 \\ category: ucd.IndicSyllabicCategory,
13 \\ Bindu,
14 \\ Visarga,
15 \\ Avagraha,
16 \\ Nukta,
17 \\ Virama,
18 \\ Pure_Killer,
19 \\ Invisible_Stacker,
20 \\ Vowel_Independent,
21 \\ Vowel_Dependent,
22 \\ Vowel,
23 \\ Consonant_Placeholder,
24 \\ Consonant,
25 \\ Consonant_Dead,
26 \\ Consonant_With_Stacker,
27 \\ Consonant_Prefixed,
28 \\ Consonant_Preceding_Repha,
29 \\ Consonant_Initial_Postfixed,
30 \\ Consonant_Succeeding_Repha,
31 \\ Consonant_Subjoined,
32 \\ Consonant_Medial,
33 \\ Consonant_Final,
34 \\ Consonant_Head_Letter,
35 \\ Modifying_Letter,
36 \\ Tone_Letter,
37 \\ Tone_Mark,
38 \\ Gemination_Mark,
39 \\ Cantillation_Mark,
40 \\ Register_Shifter,
41 \\ Syllable_Modifier,
42 \\ Consonant_Killer,
43 \\ Non_Joiner,
44 \\ Joiner,
45 \\ Number_Joiner,
46 \\ Number,
47 \\ Brahmi_Joining_Number,
48 \\ },
49 \\};15 \\};
50 \\16 \\
51 \\pub const data = [_]IndicSyllabicCategory{17 \\pub const data = [_]IndicSyllabicCategory{
scripts/LineBreak.zig+3-8
...@@ -7,17 +7,12 @@ pub usingnamespace common.Main(struct {...@@ -7,17 +7,12 @@ pub usingnamespace common.Main(struct {
7 pub const dest_file = "src/line_break.zig";7 pub const dest_file = "src/line_break.zig";
88
9 pub const dest_header =9 pub const dest_header =
10 \\const ucd = @import("./lib.zig");
11 \\
10 \\pub const LineBreak = struct {12 \\pub const LineBreak = struct {
11 \\ from: u21,13 \\ from: u21,
12 \\ to: u21,14 \\ to: u21,
13 \\ category: enum {15 \\ category: ucd.LineBreak,
14 \\ BK, CM, CR, GL, LF, NL, SP, WJ, ZW, ZWJ,
15 \\ AI, AL, B2, BA, BB, CB, CJ, CL, CP, EB,
16 \\ EM, EX, H2, H3, HL, HY, ID, IN, IS, JL,
17 \\ JT, JV, NS, NU, OP, PO, PR, QU, RI, SA,
18 \\ SG, SY, XX,
19 \\ AK, VI, AS, VF, AP,
20 \\ },
21 \\};16 \\};
22 \\17 \\
23 \\pub const data = [_]LineBreak{18 \\pub const data = [_]LineBreak{
scripts/ScriptExtensions.zig+3-70
...@@ -7,78 +7,11 @@ pub usingnamespace common.Main(struct {...@@ -7,78 +7,11 @@ pub usingnamespace common.Main(struct {
7 pub const dest_file = "src/script_extensions.zig";7 pub const dest_file = "src/script_extensions.zig";
88
9 pub const dest_header =9 pub const dest_header =
10 \\const ucd = @import("./lib.zig");
11 \\
10 \\pub const ScriptExtension = struct {12 \\pub const ScriptExtension = struct {
11 \\ code: u21,13 \\ code: u21,
12 \\ scripts: []const enum {14 \\ scripts: []const ucd.Script,
13 \\ Beng,
14 \\ Deva,
15 \\ Dupl,
16 \\ Grek,
17 \\ Hani,
18 \\ Latn,
19 \\ Nand,
20 \\ Arab,
21 \\ Bopo,
22 \\ Bugi,
23 \\ Cprt,
24 \\ Cyrl,
25 \\ Geor,
26 \\ Gran,
27 \\ Gujr,
28 \\ Guru,
29 \\ Hira,
30 \\ Knda,
31 \\ Mong,
32 \\ Cakm,
33 \\ Kali,
34 \\ Buhd,
35 \\ Adlm,
36 \\ Copt,
37 \\ Rohg,
38 \\ Syrc,
39 \\ Thaa,
40 \\ Java,
41 \\ Linb,
42 \\ Glag,
43 \\ Perm,
44 \\ Shrd,
45 \\ Taml,
46 \\ Khoj,
47 \\ Mult,
48 \\ Kana,
49 \\ Phag,
50 \\ Yezi,
51 \\ Sylo,
52 \\ Mymr,
53 \\ Tale,
54 \\ Lina,
55 \\ Hano,
56 \\ Tagb,
57 \\ Tglg,
58 \\ Dogr,
59 \\ Kthi,
60 \\ Mahj,
61 \\ Hang,
62 \\ Yiii,
63 \\ Mlym,
64 \\ Orya,
65 \\ Telu,
66 \\ Mand,
67 \\ Mani,
68 \\ Phlp,
69 \\ Sogd,
70 \\ Tirh,
71 \\ Modi,
72 \\ Sind,
73 \\ Takr,
74 \\ Gong,
75 \\ Gonm,
76 \\ Sinh,
77 \\ Limb,
78 \\ Nkoo,
79 \\ Ougr,
80 \\ Cpmn,
81 \\ },
82 \\};15 \\};
83 \\16 \\
84 \\pub const data = [_]ScriptExtension{17 \\pub const data = [_]ScriptExtension{
scripts/Scripts.zig+3-165
...@@ -7,174 +7,12 @@ pub usingnamespace common.Main(struct {...@@ -7,174 +7,12 @@ pub usingnamespace common.Main(struct {
7 pub const dest_file = "src/scripts.zig";7 pub const dest_file = "src/scripts.zig";
88
9 pub const dest_header =9 pub const dest_header =
10 \\const ucd = @import("./lib.zig");
11 \\
10 \\pub const Scripts = struct {12 \\pub const Scripts = struct {
11 \\ from: u21,13 \\ from: u21,
12 \\ to: u21,14 \\ to: u21,
13 \\ script: enum {15 \\ script: ucd.ScriptLong,
14 \\ Common,
15 \\ Latin,
16 \\ Greek,
17 \\ Cyrillic,
18 \\ Armenian,
19 \\ Hebrew,
20 \\ Arabic,
21 \\ Syriac,
22 \\ Thaana,
23 \\ Devanagari,
24 \\ Bengali,
25 \\ Gurmukhi,
26 \\ Gujarati,
27 \\ Oriya,
28 \\ Tamil,
29 \\ Telugu,
30 \\ Kannada,
31 \\ Malayalam,
32 \\ Sinhala,
33 \\ Thai,
34 \\ Lao,
35 \\ Tibetan,
36 \\ Myanmar,
37 \\ Georgian,
38 \\ Hangul,
39 \\ Ethiopic,
40 \\ Cherokee,
41 \\ Canadian_Aboriginal,
42 \\ Ogham,
43 \\ Runic,
44 \\ Khmer,
45 \\ Mongolian,
46 \\ Hiragana,
47 \\ Katakana,
48 \\ Bopomofo,
49 \\ Han,
50 \\ Yi,
51 \\ Old_Italic,
52 \\ Gothic,
53 \\ Deseret,
54 \\ Inherited,
55 \\ Tagalog,
56 \\ Hanunoo,
57 \\ Buhid,
58 \\ Tagbanwa,
59 \\ Limbu,
60 \\ Tai_Le,
61 \\ Linear_B,
62 \\ Ugaritic,
63 \\ Shavian,
64 \\ Osmanya,
65 \\ Cypriot,
66 \\ Braille,
67 \\ Buginese,
68 \\ Coptic,
69 \\ New_Tai_Lue,
70 \\ Glagolitic,
71 \\ Tifinagh,
72 \\ Syloti_Nagri,
73 \\ Old_Persian,
74 \\ Kharoshthi,
75 \\ Balinese,
76 \\ Cuneiform,
77 \\ Phoenician,
78 \\ Phags_Pa,
79 \\ Nko,
80 \\ Sundanese,
81 \\ Lepcha,
82 \\ Ol_Chiki,
83 \\ Vai,
84 \\ Saurashtra,
85 \\ Kayah_Li,
86 \\ Rejang,
87 \\ Lycian,
88 \\ Carian,
89 \\ Lydian,
90 \\ Cham,
91 \\ Tai_Tham,
92 \\ Tai_Viet,
93 \\ Avestan,
94 \\ Egyptian_Hieroglyphs,
95 \\ Samaritan,
96 \\ Lisu,
97 \\ Bamum,
98 \\ Javanese,
99 \\ Meetei_Mayek,
100 \\ Imperial_Aramaic,
101 \\ Old_South_Arabian,
102 \\ Inscriptional_Parthian,
103 \\ Inscriptional_Pahlavi,
104 \\ Old_Turkic,
105 \\ Kaithi,
106 \\ Batak,
107 \\ Brahmi,
108 \\ Mandaic,
109 \\ Chakma,
110 \\ Meroitic_Cursive,
111 \\ Meroitic_Hieroglyphs,
112 \\ Miao,
113 \\ Sharada,
114 \\ Sora_Sompeng,
115 \\ Takri,
116 \\ Caucasian_Albanian,
117 \\ Bassa_Vah,
118 \\ Duployan,
119 \\ Elbasan,
120 \\ Grantha,
121 \\ Pahawh_Hmong,
122 \\ Khojki,
123 \\ Linear_A,
124 \\ Mahajani,
125 \\ Manichaean,
126 \\ Mende_Kikakui,
127 \\ Modi,
128 \\ Mro,
129 \\ Old_North_Arabian,
130 \\ Nabataean,
131 \\ Palmyrene,
132 \\ Pau_Cin_Hau,
133 \\ Old_Permic,
134 \\ Psalter_Pahlavi,
135 \\ Siddham,
136 \\ Khudawadi,
137 \\ Tirhuta,
138 \\ Warang_Citi,
139 \\ Ahom,
140 \\ Anatolian_Hieroglyphs,
141 \\ Hatran,
142 \\ Multani,
143 \\ Old_Hungarian,
144 \\ SignWriting,
145 \\ Adlam,
146 \\ Bhaiksuki,
147 \\ Marchen,
148 \\ Newa,
149 \\ Osage,
150 \\ Tangut,
151 \\ Masaram_Gondi,
152 \\ Nushu,
153 \\ Soyombo,
154 \\ Zanabazar_Square,
155 \\ Dogra,
156 \\ Gunjala_Gondi,
157 \\ Makasar,
158 \\ Medefaidrin,
159 \\ Hanifi_Rohingya,
160 \\ Sogdian,
161 \\ Old_Sogdian,
162 \\ Elymaic,
163 \\ Nandinagari,
164 \\ Nyiakeng_Puachue_Hmong,
165 \\ Wancho,
166 \\ Chorasmian,
167 \\ Dives_Akuru,
168 \\ Khitan_Small_Script,
169 \\ Yezidi,
170 \\ Cypro_Minoan,
171 \\ Old_Uyghur,
172 \\ Tangsa,
173 \\ Toto,
174 \\ Vithkuqi,
175 \\ Kawi,
176 \\ Nag_Mundari,
177 \\ },
178 \\};16 \\};
179 \\17 \\
180 \\pub const data = [_]Scripts{18 \\pub const data = [_]Scripts{
scripts/SpecialCasing.zig-1
...@@ -7,7 +7,6 @@ pub usingnamespace common.Main(struct {...@@ -7,7 +7,6 @@ pub usingnamespace common.Main(struct {
7 pub const dest_file = "src/special_casing.zig";7 pub const dest_file = "src/special_casing.zig";
88
9 pub const dest_header =9 pub const dest_header =
10 \\
11 \\pub const SpecialCasing = struct {10 \\pub const SpecialCasing = struct {
12 \\ code: u21,11 \\ code: u21,
13 \\ lower: []const u21,12 \\ lower: []const u21,
scripts/VerticalOrientation.zig+3-6
...@@ -7,15 +7,12 @@ pub usingnamespace common.Main(struct {...@@ -7,15 +7,12 @@ pub usingnamespace common.Main(struct {
7 pub const dest_file = "src/vertical_orientation.zig";7 pub const dest_file = "src/vertical_orientation.zig";
88
9 pub const dest_header =9 pub const dest_header =
10 \\const ucd = @import("./lib.zig");
11 \\
10 \\pub const VerticalOrientation = struct {12 \\pub const VerticalOrientation = struct {
11 \\ from: u21,13 \\ from: u21,
12 \\ to: u21,14 \\ to: u21,
13 \\ orientation: enum {15 \\ orientation: ucd.VerticalOrientation,
14 \\ R,
15 \\ U,
16 \\ Tr,
17 \\ Tu,
18 \\ },
19 \\};16 \\};
20 \\17 \\
21 \\pub const data = [_]VerticalOrientation{18 \\pub const data = [_]VerticalOrientation{
src/east_asian_width.zig+3-1
...@@ -5,10 +5,12 @@...@@ -5,10 +5,12 @@
5//5//
6// zig fmt: off6// zig fmt: off
77
8const ucd = @import("./lib.zig");
9
8pub const EastAsianWidth = struct {10pub const EastAsianWidth = struct {
9 from: u21,11 from: u21,
10 to: u21,12 to: u21,
11 prop: enum { A, F, H, N, Na, W },13 prop: ucd.EastAsianWidth,
12};14};
1315
14pub const data = [_]EastAsianWidth{16pub const data = [_]EastAsianWidth{
src/hangul_syllable_type.zig+3-1
...@@ -5,10 +5,12 @@...@@ -5,10 +5,12 @@
5//5//
6// zig fmt: off6// zig fmt: off
77
8const ucd = @import("./lib.zig");
9
8pub const HangulSyllableType = struct {10pub const HangulSyllableType = struct {
9 from: u21,11 from: u21,
10 to: u21,12 to: u21,
11 prop: enum { L, V, T, LV, LVT },13 prop: ucd.HangulSyllableType,
12};14};
1315
14pub const data = [_]HangulSyllableType{16pub const data = [_]HangulSyllableType{
src/indic_positional_category.zig+3-17
...@@ -5,25 +5,11 @@...@@ -5,25 +5,11 @@
5//5//
6// zig fmt: off6// zig fmt: off
77
8const ucd = @import("./lib.zig");
9
8pub const IndicPositionalCategory = struct {10pub const IndicPositionalCategory = struct {
9 code: u21,11 code: u21,
10 category: enum {12 category: ucd.IndicPositionalCategory,
11 Right,
12 Left,
13 Visual_Order_Left,
14 Left_And_Right,
15 Top,
16 Bottom,
17 Top_And_Bottom,
18 Top_And_Right,
19 Top_And_Left,
20 Top_And_Left_And_Right,
21 Bottom_And_Right,
22 Bottom_And_Left,
23 Top_And_Bottom_And_Right,
24 Top_And_Bottom_And_Left,
25 Overstruck,
26 },
27};13};
2814
29pub const data = [_]IndicPositionalCategory{15pub const data = [_]IndicPositionalCategory{
src/indic_syllabic_category.zig+3-37
...@@ -5,45 +5,11 @@...@@ -5,45 +5,11 @@
5//5//
6// zig fmt: off6// zig fmt: off
77
8const ucd = @import("./lib.zig");
9
8pub const IndicSyllabicCategory = struct {10pub const IndicSyllabicCategory = struct {
9 code: u21,11 code: u21,
10 category: enum {12 category: ucd.IndicSyllabicCategory,
11 Bindu,
12 Visarga,
13 Avagraha,
14 Nukta,
15 Virama,
16 Pure_Killer,
17 Invisible_Stacker,
18 Vowel_Independent,
19 Vowel_Dependent,
20 Vowel,
21 Consonant_Placeholder,
22 Consonant,
23 Consonant_Dead,
24 Consonant_With_Stacker,
25 Consonant_Prefixed,
26 Consonant_Preceding_Repha,
27 Consonant_Initial_Postfixed,
28 Consonant_Succeeding_Repha,
29 Consonant_Subjoined,
30 Consonant_Medial,
31 Consonant_Final,
32 Consonant_Head_Letter,
33 Modifying_Letter,
34 Tone_Letter,
35 Tone_Mark,
36 Gemination_Mark,
37 Cantillation_Mark,
38 Register_Shifter,
39 Syllable_Modifier,
40 Consonant_Killer,
41 Non_Joiner,
42 Joiner,
43 Number_Joiner,
44 Number,
45 Brahmi_Joining_Number,
46 },
47};13};
4814
49pub const data = [_]IndicSyllabicCategory{15pub const data = [_]IndicSyllabicCategory{
src/lib.zig+28
...@@ -40,6 +40,15 @@ pub const GeneralCategory = DerivedPropertyEnum("gc");...@@ -40,6 +40,15 @@ pub const GeneralCategory = DerivedPropertyEnum("gc");
40/// https://www.unicode.org/reports/tr44/#Bidi_Class_Values40/// https://www.unicode.org/reports/tr44/#Bidi_Class_Values
41pub const BidiClass = DerivedPropertyEnum("bc");41pub const BidiClass = DerivedPropertyEnum("bc");
4242
43pub const Script = DerivedPropertyEnum("sc");
44pub const ScriptLong = DerivedPropertyLongEnum("sc");
45pub const IndicSyllabicCategory = DerivedPropertyEnum("InSC");
46pub const HangulSyllableType = DerivedPropertyEnum("hst");
47pub const EastAsianWidth = DerivedPropertyEnum("ea");
48pub const VerticalOrientation = DerivedPropertyEnum("vo");
49pub const LineBreak = DerivedPropertyEnum("lb");
50pub const IndicPositionalCategory = DerivedPropertyEnum("InPC");
51
43fn DerivedPropertyEnum(comptime prop: []const u8) type {52fn DerivedPropertyEnum(comptime prop: []const u8) type {
44 var fields: []const std.builtin.Type.EnumField = &.{};53 var fields: []const std.builtin.Type.EnumField = &.{};
45 @setEvalBranchQuota(10_000);54 @setEvalBranchQuota(10_000);
...@@ -58,3 +67,22 @@ fn DerivedPropertyEnum(comptime prop: []const u8) type {...@@ -58,3 +67,22 @@ fn DerivedPropertyEnum(comptime prop: []const u8) type {
58 .is_exhaustive = true,67 .is_exhaustive = true,
59 } });68 } });
60}69}
70
71fn DerivedPropertyLongEnum(comptime prop: []const u8) type {
72 var fields: []const std.builtin.Type.EnumField = &.{};
73 @setEvalBranchQuota(10_000);
74 for (property_value_aliases.data) |item| {
75 if (!std.mem.eql(u8, item[0], prop)) continue;
76 if (fields.len > 0 and std.mem.eql(u8, fields[fields.len - 1].name, item[2])) continue;
77 fields = fields ++ &[_]std.builtin.Type.EnumField{.{
78 .name = item[2],
79 .value = fields.len,
80 }};
81 }
82 return @Type(.{ .Enum = .{
83 .tag_type = std.math.IntFittingRange(0, fields.len - 1),
84 .fields = fields,
85 .decls = &.{},
86 .is_exhaustive = true,
87 } });
88}
src/line_break.zig+3-8
...@@ -5,17 +5,12 @@...@@ -5,17 +5,12 @@
5//5//
6// zig fmt: off6// zig fmt: off
77
8const ucd = @import("./lib.zig");
9
8pub const LineBreak = struct {10pub const LineBreak = struct {
9 from: u21,11 from: u21,
10 to: u21,12 to: u21,
11 category: enum {13 category: ucd.LineBreak,
12 BK, CM, CR, GL, LF, NL, SP, WJ, ZW, ZWJ,
13 AI, AL, B2, BA, BB, CB, CJ, CL, CP, EB,
14 EM, EX, H2, H3, HL, HY, ID, IN, IS, JL,
15 JT, JV, NS, NU, OP, PO, PR, QU, RI, SA,
16 SG, SY, XX,
17 AK, VI, AS, VF, AP,
18 },
19};14};
2015
21pub const data = [_]LineBreak{16pub const data = [_]LineBreak{
src/script_extensions.zig+3-70
...@@ -5,78 +5,11 @@...@@ -5,78 +5,11 @@
5//5//
6// zig fmt: off6// zig fmt: off
77
8const ucd = @import("./lib.zig");
9
8pub const ScriptExtension = struct {10pub const ScriptExtension = struct {
9 code: u21,11 code: u21,
10 scripts: []const enum {12 scripts: []const ucd.Script,
11 Beng,
12 Deva,
13 Dupl,
14 Grek,
15 Hani,
16 Latn,
17 Nand,
18 Arab,
19 Bopo,
20 Bugi,
21 Cprt,
22 Cyrl,
23 Geor,
24 Gran,
25 Gujr,
26 Guru,
27 Hira,
28 Knda,
29 Mong,
30 Cakm,
31 Kali,
32 Buhd,
33 Adlm,
34 Copt,
35 Rohg,
36 Syrc,
37 Thaa,
38 Java,
39 Linb,
40 Glag,
41 Perm,
42 Shrd,
43 Taml,
44 Khoj,
45 Mult,
46 Kana,
47 Phag,
48 Yezi,
49 Sylo,
50 Mymr,
51 Tale,
52 Lina,
53 Hano,
54 Tagb,
55 Tglg,
56 Dogr,
57 Kthi,
58 Mahj,
59 Hang,
60 Yiii,
61 Mlym,
62 Orya,
63 Telu,
64 Mand,
65 Mani,
66 Phlp,
67 Sogd,
68 Tirh,
69 Modi,
70 Sind,
71 Takr,
72 Gong,
73 Gonm,
74 Sinh,
75 Limb,
76 Nkoo,
77 Ougr,
78 Cpmn,
79 },
80};13};
8114
82pub const data = [_]ScriptExtension{15pub const data = [_]ScriptExtension{
src/scripts.zig+3-165
...@@ -5,174 +5,12 @@...@@ -5,174 +5,12 @@
5//5//
6// zig fmt: off6// zig fmt: off
77
8const ucd = @import("./lib.zig");
9
8pub const Scripts = struct {10pub const Scripts = struct {
9 from: u21,11 from: u21,
10 to: u21,12 to: u21,
11 script: enum {13 script: ucd.ScriptLong,
12 Common,
13 Latin,
14 Greek,
15 Cyrillic,
16 Armenian,
17 Hebrew,
18 Arabic,
19 Syriac,
20 Thaana,
21 Devanagari,
22 Bengali,
23 Gurmukhi,
24 Gujarati,
25 Oriya,
26 Tamil,
27 Telugu,
28 Kannada,
29 Malayalam,
30 Sinhala,
31 Thai,
32 Lao,
33 Tibetan,
34 Myanmar,
35 Georgian,
36 Hangul,
37 Ethiopic,
38 Cherokee,
39 Canadian_Aboriginal,
40 Ogham,
41 Runic,
42 Khmer,
43 Mongolian,
44 Hiragana,
45 Katakana,
46 Bopomofo,
47 Han,
48 Yi,
49 Old_Italic,
50 Gothic,
51 Deseret,
52 Inherited,
53 Tagalog,
54 Hanunoo,
55 Buhid,
56 Tagbanwa,
57 Limbu,
58 Tai_Le,
59 Linear_B,
60 Ugaritic,
61 Shavian,
62 Osmanya,
63 Cypriot,
64 Braille,
65 Buginese,
66 Coptic,
67 New_Tai_Lue,
68 Glagolitic,
69 Tifinagh,
70 Syloti_Nagri,
71 Old_Persian,
72 Kharoshthi,
73 Balinese,
74 Cuneiform,
75 Phoenician,
76 Phags_Pa,
77 Nko,
78 Sundanese,
79 Lepcha,
80 Ol_Chiki,
81 Vai,
82 Saurashtra,
83 Kayah_Li,
84 Rejang,
85 Lycian,
86 Carian,
87 Lydian,
88 Cham,
89 Tai_Tham,
90 Tai_Viet,
91 Avestan,
92 Egyptian_Hieroglyphs,
93 Samaritan,
94 Lisu,
95 Bamum,
96 Javanese,
97 Meetei_Mayek,
98 Imperial_Aramaic,
99 Old_South_Arabian,
100 Inscriptional_Parthian,
101 Inscriptional_Pahlavi,
102 Old_Turkic,
103 Kaithi,
104 Batak,
105 Brahmi,
106 Mandaic,
107 Chakma,
108 Meroitic_Cursive,
109 Meroitic_Hieroglyphs,
110 Miao,
111 Sharada,
112 Sora_Sompeng,
113 Takri,
114 Caucasian_Albanian,
115 Bassa_Vah,
116 Duployan,
117 Elbasan,
118 Grantha,
119 Pahawh_Hmong,
120 Khojki,
121 Linear_A,
122 Mahajani,
123 Manichaean,
124 Mende_Kikakui,
125 Modi,
126 Mro,
127 Old_North_Arabian,
128 Nabataean,
129 Palmyrene,
130 Pau_Cin_Hau,
131 Old_Permic,
132 Psalter_Pahlavi,
133 Siddham,
134 Khudawadi,
135 Tirhuta,
136 Warang_Citi,
137 Ahom,
138 Anatolian_Hieroglyphs,
139 Hatran,
140 Multani,
141 Old_Hungarian,
142 SignWriting,
143 Adlam,
144 Bhaiksuki,
145 Marchen,
146 Newa,
147 Osage,
148 Tangut,
149 Masaram_Gondi,
150 Nushu,
151 Soyombo,
152 Zanabazar_Square,
153 Dogra,
154 Gunjala_Gondi,
155 Makasar,
156 Medefaidrin,
157 Hanifi_Rohingya,
158 Sogdian,
159 Old_Sogdian,
160 Elymaic,
161 Nandinagari,
162 Nyiakeng_Puachue_Hmong,
163 Wancho,
164 Chorasmian,
165 Dives_Akuru,
166 Khitan_Small_Script,
167 Yezidi,
168 Cypro_Minoan,
169 Old_Uyghur,
170 Tangsa,
171 Toto,
172 Vithkuqi,
173 Kawi,
174 Nag_Mundari,
175 },
176};14};
17715
178pub const data = [_]Scripts{16pub const data = [_]Scripts{
src/special_casing.zig-1
...@@ -5,7 +5,6 @@...@@ -5,7 +5,6 @@
5//5//
6// zig fmt: off6// zig fmt: off
77
8
9pub const SpecialCasing = struct {8pub const SpecialCasing = struct {
10 code: u21,9 code: u21,
11 lower: []const u21,10 lower: []const u21,
src/vertical_orientation.zig+3-6
...@@ -5,15 +5,12 @@...@@ -5,15 +5,12 @@
5//5//
6// zig fmt: off6// zig fmt: off
77
8const ucd = @import("./lib.zig");
9
8pub const VerticalOrientation = struct {10pub const VerticalOrientation = struct {
9 from: u21,11 from: u21,
10 to: u21,12 to: u21,
11 orientation: enum {13 orientation: ucd.VerticalOrientation,
12 R,
13 U,
14 Tr,
15 Tu,
16 },
17};14};
1815
19pub const data = [_]VerticalOrientation{16pub const data = [_]VerticalOrientation{