summaryrefslogtreecommitdiff
path: root/codegen/gbp.zig
diff options
context:
space:
mode:
Diffstat (limited to 'codegen/gbp.zig')
-rw-r--r--codegen/gbp.zig9
1 files changed, 6 insertions, 3 deletions
diff --git a/codegen/gbp.zig b/codegen/gbp.zig
index 895aa7a..1d06e9a 100644
--- a/codegen/gbp.zig
+++ b/codegen/gbp.zig
@@ -65,7 +65,8 @@ pub fn main() anyerror!void {
65 const indic_file = @embedFile("DerivedCoreProperties.txt"); 65 const indic_file = @embedFile("DerivedCoreProperties.txt");
66 var indic_reader = std.io.Reader.fixed(indic_file); 66 var indic_reader = std.io.Reader.fixed(indic_file);
67 67
68 while (indic_reader.takeDelimiterExclusive('\n')) |line| { 68 while (indic_reader.takeDelimiterInclusive('\n')) |took| {
69 const line = std.mem.trimRight(u8, took, "\n");
69 if (line.len == 0 or line[0] == '#') continue; 70 if (line.len == 0 or line[0] == '#') continue;
70 if (std.mem.indexOf(u8, line, "InCB") == null) continue; 71 if (std.mem.indexOf(u8, line, "InCB") == null) continue;
71 const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line; 72 const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line;
@@ -106,7 +107,8 @@ pub fn main() anyerror!void {
106 107
107 var gbp_reader = std.io.Reader.fixed(@embedFile("GraphemeBreakProperty.txt")); 108 var gbp_reader = std.io.Reader.fixed(@embedFile("GraphemeBreakProperty.txt"));
108 109
109 while (gbp_reader.takeDelimiterExclusive('\n')) |line| { 110 while (gbp_reader.takeDelimiterInclusive('\n')) |took| {
111 const line = std.mem.trimRight(u8, took, "\n");
110 if (line.len == 0 or line[0] == '#') continue; 112 if (line.len == 0 or line[0] == '#') continue;
111 const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line; 113 const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line;
112 114
@@ -146,7 +148,8 @@ pub fn main() anyerror!void {
146 148
147 var emoji_reader = std.io.Reader.fixed(@embedFile("emoji-data.txt")); 149 var emoji_reader = std.io.Reader.fixed(@embedFile("emoji-data.txt"));
148 150
149 while (emoji_reader.takeDelimiterExclusive('\n')) |line| { 151 while (emoji_reader.takeDelimiterInclusive('\n')) |took| {
152 const line = std.mem.trimRight(u8, took, "\n");
150 if (line.len == 0 or line[0] == '#') continue; 153 if (line.len == 0 or line[0] == '#') continue;
151 if (std.mem.indexOf(u8, line, "Extended_Pictographic") == null) continue; 154 if (std.mem.indexOf(u8, line, "Extended_Pictographic") == null) continue;
152 const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line; 155 const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line;