diff --git a/scripts/PropertyAliases.zig b/scripts/PropertyAliases.zig index 383fae0f3748be04fe359d6a9cd1d96a0596e58b..99f71a003b94e4b89f55ca22f4af1f3dc5571038 100644 --- a/scripts/PropertyAliases.zig +++ b/scripts/PropertyAliases.zig @@ -19,11 +19,20 @@ pub usingnamespace common.Main(struct { pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void { _ = alloc; - var it = std.mem.tokenize(u8, line, "; "); + const end = std.mem.indexOfScalar(u8, line, '#') orelse line.len; + var it = std.mem.tokenize(u8, line[0..end], "; "); + const short = it.next().?; + const long = it.next().?; try writer.print(" .{{ \"{}\", \"{}\" }},\n", .{ - std.zig.fmtEscapes(it.next().?), - std.zig.fmtEscapes(it.next().?), + std.zig.fmtEscapes(short), + std.zig.fmtEscapes(long), }); + while (it.next()) |more| { + try writer.print(" .{{ \"{}\", \"{}\" }},\n", .{ + std.zig.fmtEscapes(more), + std.zig.fmtEscapes(long), + }); + } } }); diff --git a/src/property_aliases.zig b/src/property_aliases.zig index c53bda13a2ff55093518b2488f840a43dbd479b4..6c97916f6b34221dffd06f643e11a12b11c503df 100644 --- a/src/property_aliases.zig +++ b/src/property_aliases.zig @@ -19,6 +19,7 @@ pub const data = [_][2][]const u8{ .{ "lc", "Lowercase_Mapping" }, .{ "NFKC_CF", "NFKC_Casefold" }, .{ "scf", "Simple_Case_Folding" }, + .{ "sfc", "Simple_Case_Folding" }, .{ "slc", "Simple_Lowercase_Mapping" }, .{ "stc", "Simple_Titlecase_Mapping" }, .{ "suc", "Simple_Uppercase_Mapping" }, @@ -39,6 +40,8 @@ pub const data = [_][2][]const u8{ .{ "cjkIRG_USource", "kIRG_USource" }, .{ "cjkIRG_VSource", "kIRG_VSource" }, .{ "cjkRSUnicode", "kRSUnicode" }, + .{ "Unicode_Radical_Stroke", "kRSUnicode" }, + .{ "URS", "kRSUnicode" }, .{ "EqUIdeo", "Equivalent_Unified_Ideograph" }, .{ "isc", "ISO_Comment" }, .{ "JSN", "Jamo_Short_Name" }, @@ -131,6 +134,7 @@ pub const data = [_][2][]const u8{ .{ "Upper", "Uppercase" }, .{ "VS", "Variation_Selector" }, .{ "WSpace", "White_Space" }, + .{ "space", "White_Space" }, .{ "XIDC", "XID_Continue" }, .{ "XIDS", "XID_Start" }, .{ "XO_NFC", "Expands_On_NFC" },